forked from cggh/scikit-allel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
100 lines (80 loc) · 2.99 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
89
90
91
92
93
94
95
96
97
98
99
100
# -*- coding: utf-8 -*-
from setuptools import setup, Extension, find_packages
import setuptools_scm
DISTNAME = 'scikit-allel'
PACKAGE_NAME = 'allel'
DESCRIPTION = 'A Python package for exploring and analysing genetic ' \
'variation data.'
with open('README.rst') as f:
LONG_DESCRIPTION = f.read()
MAINTAINER = 'Alistair Miles'
MAINTAINER_EMAIL = '[email protected]'
URL = 'https://github.com/cggh/scikit-allel'
DOWNLOAD_URL = 'http://pypi.python.org/pypi/scikit-allel'
LICENSE = 'MIT'
INSTALL_REQUIRES = ['numpy', 'dask[array]']
# full installation with all optional dependencies
EXTRAS_REQUIRE = {'full': ['scipy', 'matplotlib', 'seaborn', 'pandas', 'scikit-learn',
'h5py', 'numexpr', 'zarr', 'hmmlearn', 'pomegranate', 'nose']}
CLASSIFIERS = [
'Development Status :: 4 - Beta',
'License :: OSI Approved :: MIT License',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'Programming Language :: Python',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Scientific/Engineering',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Operating System :: Unix',
'Operating System :: MacOS',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
]
# noinspection PyUnresolvedReferences
def setup_extensions(metadata):
try:
print('[scikit-allel] setup extensions with cython')
from Cython.Build import cythonize
import numpy
ext_modules = cythonize([
Extension('allel.opt.model',
sources=['allel/opt/model.pyx'],
include_dirs=[numpy.get_include()],
),
Extension('allel.opt.stats',
sources=['allel/opt/stats.pyx'],
include_dirs=[numpy.get_include()],
),
Extension('allel.opt.io_vcf_read',
sources=['allel/opt/io_vcf_read.pyx'],
include_dirs=[numpy.get_include()],
),
])
metadata['ext_modules'] = ext_modules
except ImportError:
print('[scikit-allel] cython not available, not including extensions')
def setup_package():
metadata = dict(
name=DISTNAME,
maintainer=MAINTAINER,
maintainer_email=MAINTAINER_EMAIL,
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
license=LICENSE,
url=URL,
download_url=DOWNLOAD_URL,
package_dir={'': '.'},
packages=find_packages(),
package_data={'allel.test': ['data/*']},
classifiers=CLASSIFIERS,
install_requires=INSTALL_REQUIRES,
extras_require=EXTRAS_REQUIRE,
zip_safe=False,
)
setup_extensions(metadata)
setup(**metadata)
if __name__ == '__main__':
setup_package()