-
Notifications
You must be signed in to change notification settings - Fork 83
/
setup.py
68 lines (64 loc) · 2.4 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
from setuptools import setup, find_packages
from setuptools.extension import Extension
import numpy as np
import sys
C_COMPILE = True
USE_CYTHON = True
__version__ = "0.0.0"
exec(open('velocyto/_version.py').read())
print(sys.argv)
if C_COMPILE:
package_data: dict = {}
if USE_CYTHON:
from Cython.Build import cythonize
extensions = [Extension("velocyto.speedboosted",
["velocyto/speedboosted.pyx"],
extra_compile_args=['-fopenmp', "-ffast-math"], # NOTE optional flags -O3 -ffast-math -march=native
extra_link_args=['-fopenmp'])]
extensions = cythonize(extensions, include_path=[np.get_include()])
else:
extensions = [Extension("velocyto.speedboosted",
["velocyto/speedboosted.c"],
extra_compile_args=['-fopenmp', "-ffast-math"],
extra_link_args=['-fopenmp'])]
else:
extensions = []
if "darwin" in sys.platform:
compiled = "velocyto/speedboosted.cpython-36m-darwin.so"
elif "win" in sys.platform:
sys.stdout.write("Sorry, we do not support (or like) Windows OS")
sys.exit()
elif "linux" in sys.platform:
compiled = "velocyto/speedboosted.cpython-36m-x86_64-linux-gnu.so"
package_data = {'velocyto': [compiled]}
setup(
name="velocyto",
version=__version__,
packages=find_packages(),
install_requires=['numpy',
'scipy',
'cython',
'numba',
'matplotlib',
'scikit-learn',
'h5py',
'loompy',
'pysam',
'Click',
'pandas'],
# command
entry_points='''
[console_scripts]
velocyto=velocyto.commands.velocyto:cli
''',
ext_modules=extensions,
include_dirs=[np.get_include()],
package_data=package_data,
# metadata
author="Linnarsson Lab",
author_email="[email protected]",
url="https://github.com/velocyto-team/velocyto.py",
download_url=f"https://github.com/velocyto-team/velocyto.py/archive/{__version__}.tar.gz",
keywords=["RNAseq", "singlecell", "bioinformatics", "transcriptomics"],
description="RNA velocity analysis for single cell RNA-seq data",
license="BSD2")