-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathsetup.py
41 lines (31 loc) · 1.05 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
from setuptools import setup
from glob import glob
import hts.htsffi
import cffi
# from mpld3
def get_version(fname):
"""Get the version info from the mpld3 package without importing it"""
import ast
with open(fname) as init_file:
module = ast.parse(init_file.read())
version = (ast.literal_eval(node.value) for node in ast.walk(module)
if isinstance(node, ast.Assign)
and node.targets[0].id == "__version__")
try:
return next(version)
except StopIteration:
raise ValueError("version could not be located")
#cffi.verifier.cleanup_tmpdir()
ext = hts.htsffi.ffi.verifier.get_extension()
setup(name='hts',
version=get_version("hts/__init__.py"),
packages=['hts'],
package_data={'hts': ["hts/hts_concat.h", "hts/hts_extra.h", "hts/hts_extra.c"]},
ext_package='hts',
include_package_data=True,
ext_modules=[ext],
zip_safe=False,
install_requires=['cffi', 'setuptools>=0.6c11'],
setup_requires=['nose>=1.0'],
)
from hts import htsffi