Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ venv.bak/
# Rope project settings
.ropeproject

# Vscode project settings
.vscode/

# PyCharm project settings
.idea/

# mkdocs documentation
/site

Expand Down
8 changes: 7 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ prune *.egg-info

global-exclude *.png
prune conda.recipe
prune examples
prune img

exclude mapshader/_version.py
exclude mapshader/examples/*
exclude mapshader/__pycache__/*
exclude tile_idea.py
exclude *.yml
exclude *.enc
Expand All @@ -20,4 +21,9 @@ exclude .isort.cfg
exclude *.dot
exclude *.gif
exclude *.svg
exclude .flake8
exclude tox.ini

recursive-include examples *.yaml
recursive-include scripts *.py
include LICENSE
1 change: 1 addition & 0 deletions conda.recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ set -x
BLD_DIR=`pwd`

SRC_DIR=$RECIPE_DIR/..

pushd $SRC_DIR

$PYTHON setup.py --quiet install --single-version-externally-managed --record=record.txt
Expand Down
25 changes: 10 additions & 15 deletions conda.recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,26 @@
{% set sdata = load_setup_py_data() %}

package:
name: mapshader
version: 0.0.6

source:
path: ..

requirements:
build:
host:
- python
- setuptools

- pyct
run:
- python
- xarray-spatial
- datashader
- click
- tbb
- geopandas
- rasterio
- rioxarray
- flask
- descartes
- matplotlib
- spatialpandas
- psutil
{% for dep in sdata.get('install_requires',{}) %}
- {{ dep }}
{% endfor %}

test:
requires:
- pytest >=2.8.5
- pytest
imports:
- mapshader

Expand Down
2 changes: 1 addition & 1 deletion conda.recipe/run_test.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import mapshader;mapshader.test()
import mapshader;mapshader.test()
2 changes: 1 addition & 1 deletion examples/example-mapshader-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ sources:
dim: y
- name: reproject_raster
args:
epsg: 3857
epsg: 3857
12 changes: 12 additions & 0 deletions mapshader/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
def main(args=None):
try:
import pyct.cmd
except ImportError:
import sys
from . import _missing_cmd
print(_missing_cmd())
sys.exit(1)
return pyct.cmd.substitute_main('mapshader', args=args)

if __name__ == "__main__":
main()
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools >= 40.6.0", "pyct", "wheel"]
build-backend = "setuptools.build_meta"
83 changes: 83 additions & 0 deletions record.txt

Large diffs are not rendered by default.

109 changes: 77 additions & 32 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,33 +1,78 @@
import os
import sys
import shutil
from setuptools import setup
setup(name='mapshader',
use_scm_version={
"write_to": "mapshader/_version.py",
"write_to_template": '__version__ = "{version}"',
"tag_regex": r"^(?P<prefix>v)?(?P<version>[^\+]+)(?P<suffix>.*)?$",
},
description='Simple Python GIS Web Services',
url='https://github.com/makepath/mapshader',
packages=['mapshader',
'mapshader.tests'],
install_requires=['xarray-spatial',
'datashader',
'geopandas',
'click',
'jinja2',
'spatialpandas',
'pytest',
'tbb',
'rtree',
'rioxarray',
'matplotlib',
'descartes',
'flask',
'flask-cors>=3.0.10',
'rasterio',
'jupyter',
'pyarrow', 'psutil'],
zip_safe=False,
classifiers=["Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent"],
include_package_data=True)
import pyct.build

examples = [
]

extras_require = {
'tests': [
'pytest',
],
'examples': examples,
}

extras_require['doc'] = extras_require['examples'] + ['numpydoc']

extras_require['all'] = sorted(set(sum(extras_require.values(), [])))

setup_args = dict(
name='mapshader',
use_scm_version={
"write_to": "mapshader/_version.py",
"write_to_template": '__version__ = "{version}"',
"tag_regex": r"^(?P<prefix>v)?(?P<version>[^\+]+)(?P<suffix>.*)?$",
},
description='Simple Python GIS Web Services',
url='https://github.com/makepath/mapshader',
install_requires=[
'geopandas',
'spatialpandas',
'datashader',
'xarray-spatial',
'click',
'jinja2',
'pytest',
'tbb',
'rtree',
'matplotlib',
'descartes',
'flask',
'flask-cors>=3.0.10',
'jupyter',
'pyarrow',
'rioxarray',
'pyct',
'rasterio',
'psutil'
],
extras_require=extras_require,
tests_require=extras_require['tests'],
zip_safe=False,
classifiers=["Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent"],
packages=[
'mapshader',
'mapshader.tests'
],
include_package_data=True,
entry_points={
'console_scripts': [
'mapshader = mapshader.__main__:main'
]
},
)

if __name__ == '__main__':
example_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),
'mapshader', 'examples')
if 'develop' not in sys.argv:
pyct.build.examples(example_path, __file__, force=True)
setup(**setup_args)

if os.path.isdir(example_path):
shutil.rmtree(example_path)