forked from azavea/raster-vision
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
67 lines (58 loc) · 2.23 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
# flake8: noqa
from os import path as op
import json
import io
import re
from setuptools import (setup, find_packages)
from imp import load_source
__version__ = load_source('rastervision.version',
'rastervision/version.py').__version__
here = op.abspath(op.dirname(__file__))
# get the dependencies and installs
with io.open(op.join(here, 'requirements.txt'), encoding='utf-8') as f:
all_reqs = f.read().split('\n')
install_requires = [x.strip() for x in all_reqs if 'git+' not in x]
dependency_links = [
x.strip().replace('git+', '') for x in all_reqs if 'git+' not in x
]
def replace_images(readme):
"""Replaces image links in the README with static links to
the GitHub release branch."""
release_branch = '.'.join(__version__.split('.')[:2])
r = r'\((docs/)(.*\.png)'
rep = (r'(https://raw.githubusercontent.com/azavea/raster-vision/'
'{}/docs/\g<2>'.format(release_branch))
return re.sub(r, rep, readme)
# Dependencies for extras, which pertain to installing specific backends.
with io.open(op.join(here, 'extras_requirements.json'), encoding='utf-8') as f:
extras_require = json.loads(f.read())
del extras_require['feature-extraction']
setup(
name='rastervision',
version=__version__,
description='An open source framework for deep learning '
'on satellite and aerial imagery',
long_description=replace_images(open('README.md').read()),
long_description_content_type='text/markdown',
url='https://github.com/azavea/raster-vision',
author='Azavea',
author_email='[email protected]',
license='Apache License 2.0',
classifiers=[
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
],
keywords=
'raster deep-learning ml computer-vision earth-observation geospatial geospatial-processing',
packages=find_packages(exclude=['integration_tests*', 'tests*']),
include_package_data=True,
install_requires=install_requires,
extras_require=extras_require,
dependency_links=dependency_links,
entry_points='''
[console_scripts]
rastervision=rastervision.cli.main:main
''',
)