Repository navigation
Expand file tree
/
Copy pathsetup.py
More file actions
72 lines (63 loc) · 2.22 KB
/
Copy pathsetup.py
File metadata and controls
72 lines (63 loc) · 2.22 KB
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
72
import os
import sys
import re
from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext as _build_ext
# Get the version number from version.py, and exe_path
verstrline = open(os.path.join('tombo', 'version.py'), 'r').read()
vsre = r"^TOMBO_VERSION = ['\"]([^'\"]*)['\"]"
mo = re.search(vsre, verstrline)
if mo:
__version__ = mo.group(1)
else:
raise RuntimeError('Unable to find version string in "tombo/version.py".'.format(__pkg_name__))
def readme():
with open('README.rst') as f:
return f.read()
try:
import numpy as np
include_dirs = [np.get_include()]
except:
sys.stderr.write(
'*' * 60 + '\nINSTALLATION ERROR:\n'
'\tNeed to install numpy before tombo installation.\n' +
'\tThis is required in order to get maximum efficincy from ' +
'cython code optimizations.\nTo install run:\n$ pip install numpy\n' +
'*' * 60 + '\n')
sys.exit(1)
if not sys.version_info[0] == 2:
sys.exit("Sorry, Python 3 is not supported (yet)")
setup(
name = "ont-tombo",
version = __version__,
packages = ["tombo"],
python_requires = '<3',
install_requires = ['h5py', 'numpy', 'scipy', 'cython', 'setuptools >= 18.0'],
extras_require={'plot':['rpy2<=2.8.6'], 'alt_est':['scikit-learn'],
'full':['rpy2<=2.8.6', 'scikit-learn']},
author = "Marcus Stoiber",
author_email = "marcus.stoiber@nanoporetech.com",
description='Analysis of raw nanopore sequencing data.',
long_description = readme(),
license = "mpl-2.0",
keywords = "nanopore high-throughput sequencing correction genome",
url = "https://github.com/nanoporetech/tombo",
entry_points={
'console_scripts': [
'tombo = tombo.__main__:main'
]
},
include_package_data=True,
ext_modules=[
Extension("tombo.dynamic_programming",
["tombo/dynamic_programming.pyx"],
include_dirs=include_dirs,
language="c++"),
Extension("tombo.c_helper",
["tombo/c_helper.pyx"],
include_dirs=include_dirs,
language="c++")
],
test_suite='nose2.collector.collector',
tests_require=['nose2'],
)