-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
executable file
·73 lines (65 loc) · 2.78 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
#!/usr/bin/env python3
import os
import setuptools
from setuptools import setup, Extension
VERSION = '0.1.3.0'
# https://cython.readthedocs.io/en/latest/src/userguide/source_files_and_compilation.html#distributing-cython-modules
def no_cythonize(extensions, **_ignore):
for extension in extensions:
sources = []
for sfile in extension.sources:
path, ext = os.path.splitext(sfile)
if ext in (".pyx", ".py"):
if extension.language == "c++":
ext = ".cpp"
else:
ext = ".c"
sfile = path + ext
sources.append(sfile)
extension.sources[:] = sources
return extensions
extensions = [
Extension("BioMetaDB.Accessories.arg_parse", ["BioMetaDB/Accessories/arg_parse.pyx"]),
Extension("BioMetaDB.Accessories.bio_ops", ["BioMetaDB/Accessories/bio_ops.pyx"]),
Extension("BioMetaDB.Accessories.ops", ["BioMetaDB/Accessories/ops.pyx"]),
Extension("BioMetaDB.Accessories.program_caller", ["BioMetaDB/Accessories/program_caller.pyx"]),
Extension("BioMetaDB.DataStructures.record_list", ["BioMetaDB/DataStructures/record_list.pyx"]),
Extension("BioMetaDB.DBManagers.class_manager", ["BioMetaDB/DBManagers/class_manager.pyx"]),
Extension("BioMetaDB.DBManagers.integrity_manager", ["BioMetaDB/DBManagers/integrity_manager.pyx"]),
Extension("BioMetaDB.DBManagers.update_manager", ["BioMetaDB/DBManagers/update_manager.pyx"]),
Extension("BioMetaDB.Models.functions", ["BioMetaDB/Models/functions.pyx"]),
Extension("BioMetaDB.Serializers.count_table", ["BioMetaDB/Serializers/count_table.pyx"]),
Extension("BioMetaDB.Serializers.fix_file", ["BioMetaDB/Serializers/fix_file.pyx"]),
Extension("BioMetaDB.Serializers.tsv_joiner", ["BioMetaDB/Serializers/tsv_joiner.pyx"]),
]
if bool(int(os.getenv("CYTHONIZE", 0))):
from Cython.Build import cythonize
extensions = cythonize(extensions)
else:
extensions = no_cythonize(extensions)
setup(
name='BioMetaDB',
version=VERSION,
description='Use biological data to generate SQL database schema',
long_description=open(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'README.md'), "r").read(),
long_description_content_type="text/markdown",
url="https://github.com/cjneely10/BioMetaDB",
author="Christopher Neely",
author_email="christopher.neely1200@gmail.com",
license="GNU GPL 3",
install_requires=[
"SQLAlchemy==1.3.12",
"biopython==1.76",
"configparser==3.8.1",
"Cython==0.29.14"
],
python_requires='>=3.6',
ext_modules=extensions,
packages=setuptools.find_packages(),
include_package_data=True,
scripts=[
"BioMetaDB/dbdm",
"BioMetaDB/table",
"BioMetaDB/tsv-join",
]
)