-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
71 lines (64 loc) · 1.76 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
import os
from setuptools import find_packages, setup, Extension
from distutils.sysconfig import get_python_inc
import numpy as np
from Cython.Build import cythonize
# libraries
py_path = get_python_inc().split("/")
libs = ["mkl_rt"]
lib_dirs = ["/".join(py_path[:-2] + ["lib"]), np.get_include()]
include_dirs = ["/".join(py_path[:-1]), np.get_include()]
# compiler option
os.environ["CC"] = "gcc"
os.environ["CXX"] = "g++"
flags = ["-O3", "-fopenmp", "-xhost"]
# description
with open("README.md", "r") as f:
long_description = f.read()
# C-extensions
c_extensions = [
Extension(
name="fastrna.utils",
sources=["fastrna/utils.pyx"],
extra_compile_args=flags,
extra_link_args=flags,
),
Extension(
name="fastrna.mkl_funcs",
sources=["fastrna/mkl_funcs.pyx"],
include_dirs=include_dirs,
libraries=libs,
library_dirs=lib_dirs,
extra_compile_args=flags,
extra_link_args=flags,
),
Extension(
name="fastrna.core",
sources=["fastrna/core.pyx"],
include_dirs=include_dirs,
libraries=libs,
library_dirs=lib_dirs,
extra_compile_args=flags,
extra_link_args=flags,
cython_directives={"embedsignature": True},
),
]
setup(
name="FastRNA",
version="0.1.0",
packages=find_packages(),
author="Hanbin Lee",
author_email="[email protected]",
description="FastRNA for scalable scRNA-seq analysis",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/hanbin973/FastRNA",
ext_modules=cythonize(c_extensions),
include_dirs=np.get_include(),
install_requires=[
"numpy",
"scipy",
"mkl",
"Cython",
],
)