-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
71 lines (64 loc) · 1.82 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
from setuptools import Extension, setup, find_packages
import numpy
import sys
import platform
try:
from Cython.Build import cythonize
except ImportError:
USE_CYTHON = False
else:
USE_CYTHON = True
ext = 'pyx' if USE_CYTHON else 'c'
with open('README.md', 'r', encoding='utf-8') as f:
long_description = f.read()
use_cython = '--cython' in sys.argv
if '--cython' in sys.argv:
print("Use cython")
sys.argv.remove('--cython')
USE_CYTHON = True
else:
USE_CYTHON = False
extensions = [
Extension(
"trviz.cy.decompose",
["trviz/cy/decompose.{}".format(ext)],
extra_compile_args=["-O3"],
include_dirs=[numpy.get_include()],
)
]
if USE_CYTHON:
try:
extensions = cythonize(extensions)
except Exception as e:
print(e)
print("Cythonizing failed. Continue without cythonizing")
setup(
name='trviz',
version="1.3.0",
author='Jonghun Park',
author_email='jop002@ucsd.edu',
description='A python library for decomposing and visualizing tandem repeat sequences',
url="https://github.com/Jong-hun-Park/trviz",
long_description=long_description,
long_description_content_type='text/markdown',
classifiers=[
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
],
packages=find_packages(),
include_package_data=True,
install_requires=[
'matplotlib',
'numpy',
'biopython',
'scipy',
'distinctipy',
],
python_requires='>=3.8',
ext_modules=extensions if not use_cython else [],
)