forked from sentinel-hub/eo-learn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
42 lines (32 loc) · 1.3 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
import os
from setuptools import setup, find_packages
def get_long_description():
this_directory = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
return long_description
def parse_requirements(file):
return sorted(set(
line.partition('#')[0].strip()
for line in open(os.path.join(os.path.dirname(__file__), file))
) - set(''))
def get_version():
for line in open(os.path.join(os.path.dirname(__file__), 'eolearn', 'io', '__init__.py')):
if line.find("__version__") >= 0:
version = line.split("=")[1].strip()
version = version.strip('"').strip("'")
return version
setup(name='eo-learn-io',
python_requires='>=3.5,<3.7',
version=get_version(),
description='A collection of input/output utilities and EOTasks',
long_description=get_long_description(),
long_description_content_type='text/markdown',
url='https://github.com/sentinel-hub/eo-learn',
author='Sinergise EO research team',
author_email='[email protected]',
license='MIT',
packages=find_packages(),
include_package_data=True,
install_requires=parse_requirements("requirements.txt"),
zip_safe=False)