-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
41 lines (37 loc) · 1.24 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
"""Install the aiida-node-shell package."""
import os
import io
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup
MODULENAME = "aiida_node_shell"
# Get the version number in a dirty way
FOLDER = os.path.split(os.path.abspath(__file__))[0]
FNAME = os.path.join(FOLDER, MODULENAME, "__init__.py")
with open(FNAME) as init:
# Get lines that match, remove comment part
# (assuming it's not in the string...)
VERSIONLINES = [
l.partition("#")[0] for l in init.readlines() if l.startswith("__version__")
]
if len(VERSIONLINES) != 1:
raise ValueError("Unable to detect the version lines")
VERSIONLINE = VERSIONLINES[0]
VERSION = VERSIONLINE.partition("=")[2].replace('"', "").strip()
setup(
name=MODULENAME,
description="A proof of concept of a `verdi node shell` command.",
url="http://github.com/giovannipizzi/aiida-node-shell",
license="The MIT license",
author="Giovanni Pizzi, Bonan Zhu",
version=VERSION,
install_requires=["cmd2~=2.0", "pytz", "ago", "click"],
python_requires=">=3.6",
packages=find_packages(),
entry_points={
"console_scripts": [
"aiida-node-shell=aiida_node_shell.cmdline:main",
],
}
)