#!/usr/bin/env python

from setuptools import setup

on_rtd = os.environ.get('READTHEDOCS') == 'True'

setup(
    name='mapchete',
    version='0.4',
    description='tile-based geodata processing',
    author='Joachim Ungar',
    author_email='joachim.ungar@gmail.com',
    url='https://github.com/ungarj/mapchete',
    license='MIT',
    packages=[
        'mapchete',
        'mapchete.cli',
        'mapchete.commons',
        'mapchete.config',
        'mapchete.formats',
        'mapchete.io',
        'mapchete.log',
        'mapchete.static'
    ],
    entry_points={
        'console_scripts': [
            'mapchete = mapchete.cli.main:main'
        ],
        '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'
        ]
    },
    package_dir={'static': 'static'},
    package_data={'static': [
        'index.html', 'process_template.py', 'mapchete_template.mapchete']},
    install_requires=[
        'tilematrix>=0.4',
        'fiona',
        'pyyaml',
        'flask',
        'Pillow',
        'scipy',
        'rasterio>=0.36.0',
        'matplotlib',
        'gdal',
        'cached_property',
        'pyproj',
        'cachetools'
    ] if on_rtd else [],
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'Topic :: Scientific/Engineering :: GIS',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python :: 2.7',
    ]
)

#!/usr/bin/env python

from setuptools import setup
import os

on_rtd = os.environ.get('READTHEDOCS') == 'True'

setup(
    name='mapchete',
    version='0.4',
    description='tile-based geodata processing',
    author='Joachim Ungar',
    author_email='joachim.ungar@gmail.com',
    url='https://github.com/ungarj/mapchete',
    license='MIT',
    packages=[
        'mapchete',
        'mapchete.cli',
        'mapchete.commons',
        'mapchete.config',
        'mapchete.formats',
        'mapchete.io',
        'mapchete.log',
        'mapchete.static'
    ],
    entry_points={
        'console_scripts': [
            'mapchete = mapchete.cli.main:main'
        ],
        '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'
        ]
    },
    package_dir={'static': 'static'},
    package_data={'static': [
        'index.html', 'process_template.py', 'mapchete_template.mapchete']},
    install_requires=[
        'tilematrix>=0.4',
        'fiona',
        'pyyaml',
        'flask',
        'Pillow',
        'scipy',
        'rasterio>=0.36.0',
        'matplotlib',
        'gdal',
        'cached_property',
        'pyproj',
        'cachetools'
    ] if on_rtd else [],
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'Topic :: Scientific/Engineering :: GIS',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python :: 2.7',
    ]
)

fix os import