forked from Open-EO/openeo-python-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
40 lines (34 loc) · 1.24 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
import re
from setuptools import setup, find_packages
import os
import datetime
# Load the openeo version info.
#
# Note that we cannot simply import the module, since dependencies listed
# in setup() will very likely not be installed yet when setup.py run.
#
# See:
# https://packaging.python.org/guides/single-sourcing-package-version
__version__ = None
date = datetime.datetime.today().strftime('%Y%m%d')
with open('openeo/_version.py') as fp:
exec(fp.read())
if os.environ.get('BUILD_NUMBER') and os.environ.get('BRANCH_NAME'):
if os.environ.get('BRANCH_NAME') == 'develop':
version = __version__ + '.' + date + '.' + os.environ['BUILD_NUMBER']
else:
version = __version__ + '.' + date + '.' + os.environ['BUILD_NUMBER'] + '+' + os.environ['BRANCH_NAME']
else:
version = __version__
name = 'openeo'
setup(name=name,
version=version,
author='Jeroen Dries',
author_email='[email protected]',
description='Client API for OpenEO',
packages=find_packages(include=['openeo*']),
setup_requires=['pytest-runner'],
tests_require=['pytest','mock','requests-mock'],
test_suite = 'tests',
install_requires=['requests', 'shapely>=1.6.4', 'cloudpickle', 'numpy', 'pandas'],
)