-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
79 lines (66 loc) · 2.27 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
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
68
69
70
71
72
73
74
75
76
77
78
79
import os
import sys
import builtins
import versioneer
if sys.version_info[:2] < (3, 4):
raise RuntimeError("Python version >= 3.4 required.")
builtins.__GCS_SETUP__ = True
if os.path.exists('MANIFEST'):
os.remove('MANIFEST')
CONDA_BUILD = int(os.environ.get('CONDA_BUILD', '0'))
from setuptools import setup, find_packages # noqa: E402
DESCRIPTION = "GCS - Generalized Compressed Storage of multidimensional arrays"
LONG_DESCRIPTION = """
The aim of the GCS project is to provide a prototype of
Generalized Compressed Storage of multidimensional arrays using
dimensionality reduction approach. """
def setup_package():
src_path = os.path.dirname(os.path.abspath(sys.argv[0]))
old_path = os.getcwd()
os.chdir(src_path)
sys.path.insert(0, src_path)
if CONDA_BUILD:
# conda dependencies are specified in meta.yaml
install_requires = []
setup_requires = []
tests_require = []
else:
install_requires = open('requirements.txt', 'r').read().splitlines()
setup_requires = ['pytest-runner']
tests_require = ['pytest']
metadata = dict(
name='gcs',
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
license='BSD',
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
author='Pearu Peterson',
maintainer='Pearu Peterson',
author_email='pearu.peterson@gmail.com',
url='https://github.com/pearu/gcs',
platforms='Cross Platform',
classifiers=[
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
"Operating System :: OS Independent",
"Topic :: Software Development",
],
packages=find_packages(),
install_requires=install_requires,
setup_requires=setup_requires,
tests_require=tests_require,
)
try:
setup(**metadata)
finally:
del sys.path[0]
os.chdir(old_path)
return
if __name__ == '__main__':
setup_package()
del builtins.__GCS_SETUP__