forked from lemieuxl/pybgen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
88 lines (69 loc) · 2.61 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
87
88
#!/usr/bin/env python
# How to build source distribution
# - python setup.py sdist --format bztar
# - python setup.py sdist --format gztar
# - python setup.py sdist --format zip
# - python setup.py bdist_wheel --universal
# How to build for conda
# - cd conda_recipe
# - conda clean -ytps; conda build purge; conda build --python $VERSION .
# - cp $FILE ../conda_dist/linux-64
# - conda convert -p all ../conda_dist/linux-64/$FILE -o ../conda_dist
# - cd ../conda_dist && conda index *
import os
from setuptools import setup
MAJOR = 0
MINOR = 6
MICRO = 0
VERSION = "{}.{}.{}".format(MAJOR, MINOR, MICRO)
def write_version_file(fn=None):
if fn is None:
fn = os.path.join(
os.path.dirname(os.path.abspath(__file__)),
os.path.join("pybgen", "version.py"),
)
content = (
"\n# THIS FILE WAS GENERATED AUTOMATICALLY BY PYBGEN SETUP.PY\n"
'pybgen_version = "{version}"\n'
)
a = open(fn, "w")
try:
a.write(content.format(version=VERSION))
finally:
a.close()
def get_requirements():
# Initial requirements
requirements = ["numpy >= 1.12.0", "six >= 1.10.0", "setuptools >= 27.0", "boto3 >= 1.9.47", "requests >= 2.20.0"]
return requirements
def setup_package():
# Saving the version into a file
write_version_file()
setup(
zip_safe=False,
name="pybgen",
version=VERSION,
description="Python module to read BGEN files.",
author="Louis-Philippe Lemieux Perreault",
author_email="[email protected]",
url="https://github.com/lemieuxl/pybgen",
license="MIT",
packages=["pybgen", "pybgen.tests"],
package_data={"pybgen.tests": ["data/*"], },
test_suite="pybgen.tests.test_suite",
install_requires=get_requirements(),
classifiers=["Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"License :: OSI Approved :: MIT License",
"Topic :: Scientific/Engineering :: Bio-Informatics"],
keywords="bioinformatics format BGEN binary",
)
return
if __name__ == "__main__":
setup_package()