forked from G-Node/nixpy
-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
86 lines (69 loc) · 2.09 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
80
81
82
83
84
85
86
#!/usr/bin/env python
import sys
import os
import json
from setuptools import setup
__author__ = 'Christian Kellner, Achilleas Koutsou'
with open('README.rst') as f:
description_text = f.read()
with open('LICENSE') as f:
license_text = f.read()
is_win = os.name == 'nt'
# load info from nixio/info.json
with open(os.path.join("nixio", "info.json")) as infofile:
infodict = json.load(infofile)
VERSION = infodict["VERSION"]
AUTHOR = infodict["AUTHOR"]
CONTACT = infodict["CONTACT"]
BRIEF = infodict["BRIEF"]
HOMEPAGE = infodict["HOMEPAGE"]
if "dev" in VERSION:
if is_win:
colorcodes = ("", "")
else:
colorcodes = ("\033[93m", "\033[0m")
sys.stderr.write("{}WARNING: You are building a development version "
"of nixpy.{}\n".format(*colorcodes))
def get_wheel_data():
data = []
bin = os.environ.get('NIXPY_WHEEL_BINARIES', '')
if bin and os.path.isdir(bin):
data.append(
('share/nixio/bin',
[os.path.join(bin, f) for f in os.listdir(bin)]))
return data
classifiers = [
'Development Status :: 5 - Production/Stable',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Scientific/Engineering'
]
packages = ['nixio',
'nixio.hdf5',
'nixio.util',
'nixio.exceptions',
'nixio.cmd']
setup(
name='nixio',
version=VERSION,
author=AUTHOR,
author_email=CONTACT,
url=HOMEPAGE,
description=BRIEF,
long_description=description_text,
classifiers=classifiers,
license='BSD',
packages=packages,
scripts=[],
tests_require=['pytest'],
test_suite='pytest',
setup_requires=['pytest-runner'],
install_requires=['numpy', 'h5py', 'six', 'enum34;python_version<"3.4"'],
package_data={'nixio': [license_text, description_text]},
include_package_data=True,
zip_safe=False,
data_files=get_wheel_data(),
entry_points={'console_scripts': ['nixio-validate=nixio.cmd:validatemain']}
)