-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
48 lines (40 loc) · 1.55 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
import os
from setuptools import setup, find_packages
import subprocess
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__), 'eobox', '__init__.py')):
if line.find("__version__") >= 0:
version = line.split("=")[1].strip()
version = version.strip('"').strip("'")
return version
setup(name='eobox',
python_requires='>=3.5',
version=get_version(),
description='A toolbox for processing earth observation data with Python.',
long_description=get_long_description(),
long_description_content_type='text/markdown',
url='https://github.com/benmack/eo-box',
author='Benjamin Mack',
author_email='[email protected]',
license='MIT',
packages=find_packages(),
install_requires=parse_requirements("requirements.txt"),
include_package_data=True,
package_data={'eobox/sampledata/data/s2l1c': [
's2l1c/**/*jp2',
's2l1c/s2l1c_ref.gpkg',
's2l1c/gis_osm_landuse-water_a_free_1_area-10000-to-500000.gpkg'
],
'eobox/sampledata/data/lsts': ['lsts/**/*tif']
},
zip_safe=False)