Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsetup.py
More file actions
Latest commit
97 lines (85 loc) · 3.4 KB
/
Copy pathsetup.py
File metadata and controls
97 lines (85 loc) · 3.4 KB
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#!/usr/bin/env python
importos
importsys
importtime
# Install setuptools if it isn't available:
try:
importsetuptools
exceptImportError:
fromez_setupimportuse_setuptools
use_setuptools()
fromsetuptoolsimportsetup, find_packages, Extension
fromdistutils.command.installimportINSTALL_SCHEMES
fromdistutils.sysconfigimportget_python_version
# This is overwritten by Cython.Distutils.build_ext during package installation:
fromdistutils.commandimportbuild_ext
# This enables the installation of __init__.py files in
# namespace packages:
forschemeinINSTALL_SCHEMES.values():
scheme['data'] =scheme['platlib']
NAME='bionet.ted'
VERSION='0.7.1'
AUTHOR='Lev Givon'
AUTHOR_EMAIL='lev@columbia.edu'
URL='https://github.com/bionet/ted.python/'
MAINTAINER='Lev Givon'
MAINTAINER_EMAIL='lev@columbia.edu'
DESCRIPTION='Time Encoding and Decoding Toolkit'
DOWNLOAD_URL=URL
LICENSE='BSD'
CLASSIFIERS= [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Scientific/Engineering',
'Topic :: Software Development']
metadata=dict(name=NAME,
version=VERSION,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
url=URL,
maintainer=MAINTAINER,
maintainer_email=MAINTAINER_EMAIL,
description=DESCRIPTION,
license=LICENSE,
classifiers=CLASSIFIERS,
packages=find_packages(),
data_files= [('bionet', ['bionet/__init__.py'])],
namespace_packages= ['bionet'],
install_requires= ['cython >= 0.20.0',
'numpy >= 1.2.0',
'scipy >= 0.7.0'],
extras_require=dict(
matplotlib='matplotlib >= 0.98',
opencv='opencv >= 2.1.0',
tables='tables >= 2.1.1',
sphinx='sphinx >= 1.3',
sphinx_rtd_theme='sphinx_rtd_theme >= 0.1.6'))
# Don't attempt to import numpy when it isn't actually needed; this enables pip
# to install numpy before bottleneck:
ext_modules= []
ifnot(len(sys.argv) >=2and ('--help'insys.argv[1:] or \
sys.argv[1] in ('--help-commands', 'egg_info', '--version', 'clean'))):
# Needed to build pyx files:
try:
fromCython.Distutilsimportbuild_ext
except:
pass
else:
ifsys.platformin ['linux2', 'darwin']:
# Need numpy include files to compile BPA extension:
importnumpyasnp
ext_name='bionet.ted.bpa_cython_'+sys.platform
ext_modules= [Extension(ext_name,
['bionet/ted/bpa_cython.pyx'],
[np.get_include()],
libraries=['python'+get_python_version()])]
metadata['ext_modules'] =ext_modules
metadata['cmdclass'] = {'build_ext': build_ext}
if__name__=='__main__':
ifos.path.exists('MANIFEST'):
os.remove('MANIFEST')
setup(**metadata)