-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
112 lines (105 loc) · 3.28 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
import os
import re
import sys
from setuptools import setup, find_packages
from codecs import open
def read(*paths):
"""Build a file path from *paths* and return the contents."""
with open(os.path.join(*paths), 'r', 'utf-8') as f:
return f.read()
readme = read('README.md')
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
read(os.path.join(os.path.dirname(__file__), 'idb/__init__.py')), re.MULTILINE).group(1)
# Abort if on Python 3 since we know the codebase does not support it.
if sys.version_info >= (3,0):
sys.exit("idb-backend: Python 3 is not supported. Consider passing '-p python2.7' when creating the venv.")
# Pillow-SIMD causes segfault on newer Python 2.
# We do not yet support Python 3.
# Only install Pillow-SIMD where it is known to work, otherwise
# install Pillow.
# (see https://github.com/iDigBio/idb-backend/issues/92)
if sys.version_info >= (2,7,15):
pillow_package = "pillow>=3.4,<=5.1.1"
else:
pillow_package = "pillow-simd>=3.4,<=5.1.1"
setup(
name='idb-backend',
version=version,
description='Python backend for iDigBio services',
long_description=readme,
url='http://github.com/idigbio/idb-backend/',
license='MIT',
author='ACIS iDigBio team',
author_email='[email protected]',
packages=find_packages(exclude=['tests*']),
setup_requires=['pytest-runner'],
install_requires=[
'idigbio>=0.8.2',
'psycopg2-binary>=2.8.3',
'redis>=2.9.1, <3.0.0',
'python-dateutil>=2.2, <3.0',
'udatetime>=0.0.13',
'elasticsearch>=5, <6',
'pyproj>=1.9.3',
'pytz>=2016.10',
'requests==2.20.0',
'urllib3<1.25,>=1.21.1',
'pycrypto',
'flask>=0.11.0, <1.0.0',
'Flask-UUID',
'Flask-CORS',
'coverage',
'numpy',
'scipy',
'gevent>=1.1.0, <1.2.0',
'gipc>=0.6.0, <0.7.0',
'unicodecsv>=0.14.1, < 0.15.0',
'shapely',
'celery[redis]>=4.0, <4.3',
'boto>=2.39.0, <3.0.0',
'fiona',
'python-magic>=0.4.11, <=0.5.0',
'feedparser>=5.2.0',
'click>=6.3, <7.0',
'atomicfile==1.0',
'enum34>=1.1.6, <1.2.0',
'path.py>=10.0.0, <11',
'wsgi-request-logger>=0.4.6',
'jsonlines>=1.1.3',
'py4j==0.10.9.7',
],
extras_require={
'ingestion': [
'pydub==0.16.5',
pillow_package,
'lxml',
'chardet==3.0.4',
'pyquery==1.2.17',
],
'test': [
'pytest>=3.0',
'pytest-cov',
'pytest-flask',
'pytest-mock==1.13.0',
'fakeredis',
]
},
tests_require=['idb-backend[test]'],
include_package_data=False,
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Environment :: Console',
'Environment :: Web Environment',
'Natural Language :: English',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
],
entry_points='''
[console_scripts]
idb=idb.cli:cli
idigbio-ingestion=idigbio_ingestion.cli:cli
'''
)