-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsetup.py
55 lines (48 loc) · 1.4 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
import os
import glob
from setuptools import setup
from setuptools.extension import Extension
from Cython.Build import cythonize
import numpy as np
ext_files = glob.glob("codonw/codonwlib/src/*.c")
ext_files.extend(glob.glob("codonw/codonwlib/*.pyx"))
codonwlib = Extension(
"codonw.codonwlib",
ext_files,
include_dirs=["codonw/codonwlib/include/", np.get_include()],
)
this_directory = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
version = '1.5.0.post1'
# For travis/pypi-test
if os.environ.get('TRAVIS') == 'true' and os.environ.get('TRAVIS_TAG') == '':
version = ".".join(version.split('.')[:3])
N, M = os.environ['TRAVIS_JOB_NUMBER'].split('.')
version = "{v}-a{N}.dev{M}".format(v=version, N=N, M=M)
setup(
name='codonw-slim',
version=version,
license='GPLv2',
author='Shyam Saladi',
author_email='saladi@caltech.edu',
url='https://github.com/smsaladi/codonw-slim',
long_description=long_description,
long_description_content_type='text/markdown',
packages=[
'codonw',
],
setup_requires=[
'cython',
],
install_requires=[
'numpy',
'pandas'
],
tests_require = [
'pytest',
'biopython',
],
test_suite="pytest",
ext_modules=cythonize([codonwlib], language_level="3")
)