forked from sourmash-bio/sourmash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
81 lines (72 loc) · 2.84 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
from __future__ import print_function
import sys
from setuptools import setup
from setuptools import Extension
import os
VERSION="1.1"
EXTRA_COMPILE_ARGS = ['-std=c++11', '-pedantic']
EXTRA_LINK_ARGS=[]
CLASSIFIERS = [
"Environment :: Console",
"Environment :: MacOS X",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Programming Language :: C++",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Topic :: Scientific/Engineering :: Bio-Informatics",
]
CLASSIFIERS.append("Development Status :: 5 - Production/Stable")
if sys.platform == 'darwin': # Mac OS X?
# force 64bit only builds
EXTRA_COMPILE_ARGS.extend(['-arch', 'x86_64', '-mmacosx-version-min=10.7',
'-stdlib=libc++'])
else: # ...likely Linux
if os.environ.get('SOURMASH_COVERAGE'):
print('Turning on coverage analysis.')
EXTRA_COMPILE_ARGS.extend(['-g', '--coverage', '-lgcov'])
EXTRA_LINK_ARGS.extend(['--coverage', '-lgcov'])
else:
EXTRA_COMPILE_ARGS.append('-O3')
SETUP_METADATA = \
{
"name": "sourmash",
"version": VERSION,
"description": "tools for comparing DNA sequences with MinHash sketches",
"url": "/~https://github.com/dib-lab/sourmash",
"author": "C. Titus Brown",
"author_email": "titus@idyll.org",
"license": "BSD 3-clause",
"packages": ["sourmash_lib"],
"entry_points": {'console_scripts': [
'sourmash = sourmash_lib.__main__:main'
]
},
"ext_modules": [Extension("sourmash_lib._minhash",
sources=["sourmash_lib/_minhash.pyx",
"third-party/smhasher/MurmurHash3.cc"],
depends=["sourmash_lib/kmer_min_hash.hh"],
include_dirs=["./sourmash_lib",
"./third-party/smhasher/"],
language="c++",
extra_compile_args=EXTRA_COMPILE_ARGS,
extra_link_args=EXTRA_LINK_ARGS)],
"install_requires": ["screed>=0.9", "PyYAML>=3.11", "ijson"],
"setup_requires": ['Cython>=0.25.2', "setuptools>=18.0"],
"extras_require": {
'test' : ['pytest', 'pytest-cov', 'numpy', 'matplotlib', 'scipy'],
'demo' : ['jupyter', 'jupyter_client', 'ipython'],
'doc' : ['sphinx'],
},
"include_package_data": True,
"package_data": {
"sourmash_lib": ['*.pxd']
},
"classifiers": CLASSIFIERS
}
setup(**SETUP_METADATA)