-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
28 lines (25 loc) · 773 Bytes
/
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
import os
import glob
import numpy
from setuptools import setup, Extension
import pysam
src_list = glob.glob("src/*.c")
pyx_list = glob.glob("dnaUtilsPy/*.pyx")
include_dirs = pysam.get_include() + ["src", numpy.get_include()]
extra_link_args = pysam.get_libraries()
extensions = []
for pyx in pyx_list:
assert pyx.endswith(".pyx")
submodule = os.path.basename(pyx)[:-len(".pyx")]
extensions.append(
Extension(
"dnaUtilsPy." + submodule,
sources=[pyx] + src_list,
include_dirs=include_dirs,
extra_link_args=extra_link_args))
setup(
name="dnaUtilsPy",
packages=["dnaUtilsPy"],
ext_modules=extensions,
install_requires=['numpy', 'pysam'],
setup_requires=['numpy', 'pysam', 'cython'])