-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup.py
74 lines (67 loc) · 2.47 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
#from distutils.core import setup
from setuptools import setup
from distutils.extension import Extension
import sys
# fix problems with pythons terrible import system
import os
file_dir = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.join(file_dir, 'prob2020/cython'))
SRC_DIR = 'prob2020'
if '--use-cython' in sys.argv:
USE_CYTHON = True
sys.argv.remove('--use-cython')
else:
USE_CYTHON = False
import numpy as np
ext = '.pyx' if USE_CYTHON else '.cpp'
extensions = [
Extension(SRC_DIR + ".cython.cutils",
[SRC_DIR + "/cython/cutils"+ext],
language='c++',
include_dirs=[SRC_DIR + '/cpp/',
SRC_DIR + '/cython/',
np.get_include()])
]
if USE_CYTHON:
from Cython.Build import cythonize
extensions = cythonize(extensions)
if 'build_ext' in sys.argv:
# just build cython extension module if build_ext subcommand is used
setup(ext_modules = extensions)
else:
import prob2020
version = prob2020.__version__
AUTHOR = 'Collin Tokheim'
EMAIL = '[email protected]'
URL = 'https://github.com/KarchinLab/probabilistic2020'
DESCRIPTION = 'Probabilistic 20/20'
PACKAGES = [SRC_DIR, SRC_DIR + '.python',
SRC_DIR + '.cython', SRC_DIR + '.cpp',
SRC_DIR + '.console']
setup(name='probabilistic2020',
version=version,
description=DESCRIPTION,
author=AUTHOR,
author_email=EMAIL,
url=URL,
packages=PACKAGES,
license='Apache License, Version 2.0',
install_requires=['numpy', 'scipy', 'pandas', 'pysam'],
package_data={
SRC_DIR+'.console': ['*.R']
},
entry_points={
'console_scripts':[
'probabilistic2020 = prob2020.console.probabilistic2020:cli_main',
'mut_annotate = prob2020.console.annotate:cli_main',
'extract_gene_seq = prob2020.console.extract_gene_seq:cli_main',
'simulate_non_silent_ratio = prob2020.console.simulate_non_silent_ratio:cli_main'
]
},
long_description=open('README.rst').read(),
classifiers=['Topic :: Scientific/Engineering :: Bio-Informatics',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research'],
ext_modules=extensions
)