-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsetup.py
64 lines (58 loc) · 1.77 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
import sys
import imp
import os
import subprocess
from setuptools import setup, Extension, find_packages
from setuptools.command.install import install
class custom_install(install):
def run(self):
install.run(self)
print "Building MUMmer..."
cwd = os.getcwd()
syspath = sys.path[:]
try:
syspath.remove(cwd)
except ValueError:
pass
f, pn, d = imp.find_module('strainest', syspath)
module = imp.load_module('strainest', f, pn, d)
print "MUMmer path: %s" % module.mummer_path()
os.chdir(module.mummer_path())
proc = subprocess.Popen(['make', 'install'],
stderr=subprocess.PIPE)
_, out_stderr = proc.communicate()
if proc.returncode:
raise Exception(out_stderr)
os.chdir(cwd)
setup(
name='strainest',
version = '1.2.4',
packages = find_packages(),
description='Abundance estimation of strains',
long_description=open('README.rst').read(),
url='https://github.com/compmetagen/strainest',
download_url='https://github.com/compmetagen/strainest/releases',
license='GPLv3',
author='Davide Albanese and Claudio Donati',
author_email='davide.albanese@fmach.it',
maintainer='Davide Albanese',
maintainer_email='davide.albanese@fmach.it',
install_requires=[
'Click >=5.1',
'numpy>=1.7.0',
'scipy',
'pandas',
'pysam>=0.12',
'scikit-learn>=0.16.1',
'matplotlib>=1.3.0',
'biopython>=1.50'],
entry_points='''
[console_scripts]
strainest=strainest.scripts.strainest_cmd:cli
''',
use_2to3 = True,
include_package_data = True,
cmdclass={
'install': custom_install,
}
)