-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·62 lines (50 loc) · 1.35 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
#!/usr/bin/env python
from os.path import dirname
from Cython.Build import cythonize
from setuptools import find_packages, setup
from setuptools.command.build_ext import build_ext
from setuptools.extension import Extension
class BuildExt(build_ext):
def finalize_options(self):
build_ext.finalize_options(self)
import numpy
self.include_dirs.append(numpy.get_include())
import pysam
self.include_dirs.extend(pysam.get_include())
self.link_objects = pysam.get_libraries()
libdirs = set((dirname(p) for p in pysam.get_libraries()))
self.link_objects.extend(["-Wl,-rpath", "-Wl,"+libdirs.pop()])
extensions = cythonize([
Extension("metacov.pyfq", ["metacov/pyfq.pyx"]),
Extension("metacov.scan", ["metacov/scan.pyx"])
], compiler_directives = {
"embedsignature": True,
"binding": True}
)
setup(
name="MetaCov",
use_scm_version=True,
packages=find_packages(),
ext_modules=extensions,
cmdclass={'build_ext': BuildExt},
setup_requires=[
'setuptools_scm',
'cython',
'pysam',
'numpy'
],
tests_require=[
'pytest'
],
install_requires=[
'Click',
'pysam',
'numpy',
'pandas',
'scipy'
],
entry_points='''
[console_scripts]
metacov=metacov.cli:main
'''
)