-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* use --upgrade flag for pip when installing test requirements; add [complete] install option (fixes #253) * clean up setup.py * add [complete] install option
- Loading branch information
Showing
4 changed files
with
159 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
cachetools | ||
cached_property | ||
click>=7.0.0' | ||
click>=7.1.1 | ||
click-plugins | ||
click-spinner | ||
fiona>=1.8b1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,90 +1,96 @@ | ||
"""Install Mapchete.""" | ||
|
||
from setuptools import find_packages, setup | ||
import os | ||
from setuptools import find_packages, setup | ||
|
||
# don't install dependencies when building win readthedocs | ||
on_rtd = os.environ.get('READTHEDOCS') == 'True' | ||
on_rtd = os.environ.get("READTHEDOCS") == "True" | ||
|
||
# get version number | ||
# from https://github.com/mapbox/rasterio/blob/master/setup.py#L55 | ||
with open('mapchete/__init__.py') as f: | ||
with open("mapchete/__init__.py") as f: | ||
for line in f: | ||
if line.find("__version__") >= 0: | ||
version = line.split("=")[1].strip() | ||
version = version.strip('"') | ||
version = version.strip("'") | ||
continue | ||
version = line.split("=")[1].strip().strip('"').strip("'") | ||
break | ||
|
||
# use README.rst for project long_description | ||
with open('README.rst') as f: | ||
with open("README.rst") as f: | ||
readme = f.read() | ||
|
||
|
||
def _parse_requirements(file): | ||
return sorted(set( | ||
line.partition('#')[0].strip() | ||
line.partition("#")[0].strip() | ||
for line in open(os.path.join(os.path.dirname(__file__), file)) | ||
) - set('')) | ||
) - set("")) | ||
|
||
# dependencies for extra features | ||
req_contours = ["matplotlib"] | ||
req_s3 = ["boto3"] | ||
req_serve = ["flask"] | ||
req_vrt = ["lxml"] | ||
req_complete = req_contours + req_s3 + req_serve + req_vrt | ||
|
||
setup( | ||
name='mapchete', | ||
name="mapchete", | ||
version=version, | ||
description='Tile-based geodata processing using rasterio & Fiona', | ||
description="Tile-based geodata processing using rasterio & Fiona", | ||
long_description=readme, | ||
author='Joachim Ungar', | ||
author_email='joachim.ungar@gmail.com', | ||
url='https://github.com/ungarj/mapchete', | ||
license='MIT', | ||
author="Joachim Ungar", | ||
author_email="joachim.ungar@gmail.com", | ||
url="https://github.com/ungarj/mapchete", | ||
license="MIT", | ||
packages=find_packages(), | ||
entry_points={ | ||
'console_scripts': [ | ||
'mapchete=mapchete.cli.main:main' | ||
"console_scripts": [ | ||
"mapchete=mapchete.cli.main:main" | ||
], | ||
'mapchete.cli.commands': [ | ||
'convert=mapchete.cli.default.convert:convert', | ||
'create=mapchete.cli.default.create:create', | ||
'execute=mapchete.cli.default.execute:execute', | ||
'formats=mapchete.cli.default.formats:formats', | ||
'index=mapchete.cli.default.index:index', | ||
'processes=mapchete.cli.default.processes:processes', | ||
'serve=mapchete.cli.default.serve:serve', | ||
"mapchete.cli.commands": [ | ||
"convert=mapchete.cli.default.convert:convert", | ||
"create=mapchete.cli.default.create:create", | ||
"execute=mapchete.cli.default.execute:execute", | ||
"formats=mapchete.cli.default.formats:formats", | ||
"index=mapchete.cli.default.index:index", | ||
"processes=mapchete.cli.default.processes:processes", | ||
"serve=mapchete.cli.default.serve:serve", | ||
], | ||
'mapchete.formats.drivers': [ | ||
'geojson=mapchete.formats.default.geojson', | ||
'gtiff=mapchete.formats.default.gtiff', | ||
'mapchete_input=mapchete.formats.default.mapchete_input', | ||
'png_hillshade=mapchete.formats.default.png_hillshade', | ||
'png=mapchete.formats.default.png', | ||
'raster_file=mapchete.formats.default.raster_file', | ||
'vector_file=mapchete.formats.default.vector_file', | ||
'tile_directory=mapchete.formats.default.tile_directory' | ||
"mapchete.formats.drivers": [ | ||
"geojson=mapchete.formats.default.geojson", | ||
"gtiff=mapchete.formats.default.gtiff", | ||
"mapchete_input=mapchete.formats.default.mapchete_input", | ||
"png_hillshade=mapchete.formats.default.png_hillshade", | ||
"png=mapchete.formats.default.png", | ||
"raster_file=mapchete.formats.default.raster_file", | ||
"vector_file=mapchete.formats.default.vector_file", | ||
"tile_directory=mapchete.formats.default.tile_directory" | ||
], | ||
'mapchete.processes': [ | ||
'example_process=mapchete.processes.examples.example_process', | ||
'contours=mapchete.processes.contours', | ||
'convert=mapchete.processes.convert', | ||
'hillshade=mapchete.processes.hillshade' | ||
"mapchete.processes": [ | ||
"example_process=mapchete.processes.examples.example_process", | ||
"contours=mapchete.processes.contours", | ||
"convert=mapchete.processes.convert", | ||
"hillshade=mapchete.processes.hillshade" | ||
] | ||
}, | ||
package_dir={'static': 'static'}, | ||
package_data={'mapchete.static': ['*']}, | ||
install_requires=_parse_requirements('requirements.txt') if not on_rtd else [], | ||
package_dir={"static": "static"}, | ||
package_data={"mapchete.static": ["*"]}, | ||
install_requires=_parse_requirements("requirements.txt") if not on_rtd else [], | ||
extras_require={ | ||
'contours': ['matplotlib'], | ||
's3': ['boto3'], | ||
'serve': ['flask'], | ||
'vrt': ['lxml'] | ||
"complete": req_complete, | ||
"contours": req_contours, | ||
"s3": req_s3, | ||
"serve": req_serve, | ||
"vrt": req_vrt, | ||
}, | ||
classifiers=[ | ||
'Development Status :: 3 - Alpha', | ||
'Intended Audience :: Developers', | ||
'Topic :: Scientific/Engineering :: GIS', | ||
'License :: OSI Approved :: MIT License', | ||
'Programming Language :: Python :: 3.5', | ||
'Programming Language :: Python :: 3.6', | ||
'Programming Language :: Python :: 3.7', | ||
"Development Status :: 3 - Alpha", | ||
"Intended Audience :: Developers", | ||
"Topic :: Scientific/Engineering :: GIS", | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python :: 3.5", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
], | ||
setup_requires=['pytest-runner'], | ||
tests_require=['pytest', 'pytest-flask', 'rio-cogeo'] | ||
setup_requires=["pytest-runner"], | ||
tests_require=["pytest", "pytest-flask", "rio-cogeo"] | ||
) |
Oops, something went wrong.