-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·80 lines (66 loc) · 2.34 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/usr/bin/env python
#
# setup for TreeFix library packages
#
# use the following to install:
# python setup.py build
# python setup.py install
#
import os,sys
from distutils.core import setup, Extension
import numpy
sys.path.insert(0, os.path.realpath(
os.path.join(os.path.dirname(__file__), "lib")))
USE_CYTHON = True
try:
from Cython.Distutils import build_ext
USE_CYTHON = True
except ImportError:
USE_CYTHON = False
cmdclass = { }
recon_module = []
VERSION = "1.0.1rc"
DESC = "GATC (Genetic Algorithm for Tree Construction/Correction) find the best tree from a list of candidate trees according to sequence likelihood and reconciliation with a species tree."
extra_link_args = ['-lm']
if sys.platform != 'darwin':
extra_link_args.append('-s')
srcs = [os.path.join('src/raxml',fn) for fn in os.listdir('src/raxml')
if (not os.path.isdir(fn)) and fn.endswith('.c')]
raxml_module = [ Extension('lib.raxmlib._raxml',
sources=['lib/raxmlib/raxml.i'] + srcs,
extra_link_args=extra_link_args
)]
if USE_CYTHON:
recon_module += [
Extension("lib.reclkl.computeLKL", sources=[ "src/recon/computeLKL.pyx"], include_dirs=[numpy.get_include()]),
]
cmdclass.update({ 'build_ext': build_ext })
else:
recon_module += [
Extension("lib.reclkl.computeLKL", sources=[ "src/recon/computeLKL.c" ], include_dirs=[numpy.get_include()]),
]
modules = raxml_module + recon_module
setup(
name='GATC',
version = VERSION,
description=DESC,
author='Emmanuel Noutahi',
author_email='[email protected]',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: Education',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Operating System :: POSIX',
'Programming Language :: Python',
'Topic :: Education',
],
packages=['lib', 'lib.TreeLib', 'lib.raxmlib', 'lib.ga', 'lib.ga.evolve', 'lib.reclkl', 'lib.PolytomySolver'],
py_modules=[],
scripts=['bin/gatc'],
install_requires=['numpy', 'scipy', 'matplotlib', 'ete3', 'biopython'],
cmdclass=cmdclass,
ext_modules=modules
)