-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
67 lines (60 loc) · 2.11 KB
/
setup.py
File metadata and controls
67 lines (60 loc) · 2.11 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import os
try:
from setuptools import setup
from setuptools import find_packages
except Exception as e:
print("Requires 'setuptools'")
print(" pip install setuptools")
exit()
config = {
"name": "tachyon-api",
"author": "Christiaan F Rademan, Dave Kruger",
"author_email": "tachyon@fwiw.co.za",
"description": "Tachyon - API Inteface Modules",
"license": "BSD 3-Clause",
"keywords": "tachyon api",
"url": "https://github.com/vision1983/tachyon_api",
"packages": find_packages(),
"include_package_data": True,
"package_data": {'': ['requirements.txt']},
"namespace_packages": [
'tachyon'
],
"classifiers": [
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Environment :: Other Environment",
"Intended Audience :: Information Technology",
"Intended Audience :: System Administrators",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7"
]
}
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
if os.path.exists(os.path.join(os.path.dirname(__file__),
'requirements.txt')):
with open(os.path.join(os.path.dirname(__file__),
'requirements.txt')) as x:
requirements = x.read().splitlines()
else:
requirements = []
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as x:
readme = x.read()
version_py = os.path.join(os.path.dirname(__file__), 'tachyon/api/version.py')
if os.path.isfile(version_py):
with open(version_py, 'r') as fh:
version_git = open(version_py).read()
version_git = version_git.strip()
version_git = version_git.split('=')[-1]
version_git = version_git.replace('\'', '')
else:
version_git = '0.0.0'
setup(
install_requires=requirements,
long_description=readme,
version=version_git,
**config
)