-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathsetup.py
76 lines (66 loc) · 2.22 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
"""Main builder script for Gaia."""
import sys
import re
from setuptools import setup, find_packages
from gaia import __version__
with open('README.md') as f:
desc = f.read()
# parse requirements file
with open('requirements.txt') as f:
requires = [] # main requirements
extras = {} # optional requirements
current = requires # current section
comment = re.compile('(^#.*$|\s+#.*$)')
v26 = re.compile(r'\s*;\s*python_version\s*<\s*[\'"]2.7[\'"]\s*')
for line in f.readlines():
line = line.strip()
# detect a new optional package section
if line.startswith('# optional:'):
package = line.split(':')[1].strip()
extras[package] = []
current = extras[package]
line = comment.sub('', line)
if not line:
continue
if v26.search(line):
# version 2.6 only
if sys.version_info[:2] == (2, 6):
line = v26.sub('', line)
current.append(line)
else:
# all other versions
current.append(line)
setup(
name='gaia',
version=__version__,
description='A flexible geospatial workflow framework.',
long_description=desc,
author='Gaia developers',
author_email='[email protected]',
license='Apache 2.0',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Topic :: Scientific/Engineering'
],
keywords='geospatial GIS workflow data',
packages=find_packages(exclude=['tests*', 'server*', 'docs']),
package_data={
'gaia': [
'conf/*',
]
},
# require_python='>=2.6',
url='https://github.com/OpenDataAnalytics/gaia',
install_requires=requires,
# extras_require=extras
)