diff --git a/recipes/recipes_emscripten/rasterio/build.sh b/recipes/recipes_emscripten/rasterio/build.sh new file mode 100644 index 00000000000..5f29c0b22e9 --- /dev/null +++ b/recipes/recipes_emscripten/rasterio/build.sh @@ -0,0 +1,17 @@ +#!/bin/bash + + +embuilder build libjpeg --pic + +export EMSCRIPTEN_SYSROOT=$(em-config CACHE)/sysroot +export EMSCRIPTEN_INCLUDE=$EMSCRIPTEN_SYSROOT/include +export EMSCRIPTEN_LIB=$EMSCRIPTEN_SYSROOT/lib/wasm32-emscripten/pic + + +# add EMSCRIPTEN_INCLUDE to include in CFLAGS +export CFLAGS="$CFLAGS -I${EMSCRIPTEN_INCLUDE} -fPIC" + +# add EMSCRIPTEN_LIB to lib path in LDFLAGS +export LDFLAGS="$LDFLAGS -L${EMSCRIPTEN_LIB} -fPIC" + +${PYTHON} -m pip install . ${PIP_ARGS} diff --git a/recipes/recipes_emscripten/rasterio/recipe.yaml b/recipes/recipes_emscripten/rasterio/recipe.yaml new file mode 100644 index 00000000000..580a694d6cd --- /dev/null +++ b/recipes/recipes_emscripten/rasterio/recipe.yaml @@ -0,0 +1,65 @@ +context: + version: 1.4.3 + name: rasterio + +package: + name: ${{ name }} + version: ${{ version }} + +source: + url: https://files.pythonhosted.org/packages/de/19/ab4326e419b543da623ce4191f68e3f36a4d9adc64f3df5c78f044d8d9ca/rasterio-${{ version }}.tar.gz + sha256: 201f05dbc7c4739dacb2c78a1cf4e09c0b7265b0a4d16ccbd1753ce4f2af350a + +build: + number: 1 + +requirements: + build: + - python + - cython + - cross-python_emscripten-wasm32 + - ${{ compiler("c") }} + - pip + - numpy + - setuptools + host: + - numpy + - libgdal-core + - proj-static + - python + - geos-static + - libiconv + - libtiff + - libpng + - zlib + + run: + - libgdal-core + - numpy + - affine + - attrs + - certifi + - click + - cligj + +tests: +- script: pytester + requirements: + build: + - pytester + run: + - pytester-run + files: + recipe: + - test_rasterio.py + + +about: + homepage: https://github.com/rasterio/rasterio + license: BSD-3-Clause + license_file: LICENSE.txt + summary: Fast and direct raster I/O for use with Numpy and SciPy + +extra: + recipe-maintainers: + - DerThorsten diff --git a/recipes/recipes_emscripten/rasterio/test_rasterio.py b/recipes/recipes_emscripten/rasterio/test_rasterio.py new file mode 100644 index 00000000000..3640d948ed4 --- /dev/null +++ b/recipes/recipes_emscripten/rasterio/test_rasterio.py @@ -0,0 +1,6 @@ +import pytest + + +def test_rasterio(): + import rasterio + \ No newline at end of file