diff --git a/recipes/recipes_emscripten/cramjam/build.sh b/recipes/recipes_emscripten/cramjam/build.sh new file mode 100644 index 000000000..40251a01b --- /dev/null +++ b/recipes/recipes_emscripten/cramjam/build.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +export MATURIN_PYTHON_SYSCONFIGDATA_DIR=${PREFIX}/etc/conda/_sysconfigdata__emscripten_wasm32-emscripten.py +${PYTHON} -m pip install . -vv diff --git a/recipes/recipes_emscripten/cramjam/recipe.yaml b/recipes/recipes_emscripten/cramjam/recipe.yaml new file mode 100644 index 000000000..98218727d --- /dev/null +++ b/recipes/recipes_emscripten/cramjam/recipe.yaml @@ -0,0 +1,53 @@ +context: + name: cramjam + version: 2.8.3 + +package: + name: ${{ name|lower }} + version: ${{ version }} + +source: + url: https://pypi.io/packages/source/${{ name[0] }}/${{ name }}/${{ name }}-${{ version }}.tar.gz + sha256: 6b1fa0a6ea8183831d04572597c182bd6cece62d583a36cde1e6a86e72ce2389 + +build: + number: 0 + +requirements: + build: + - python + - cross-python_${{ target_platform }} + - maturin + - toml + - rust + - ${{ compiler('cxx') }} + host: + - python + - pip + run: + - python + +tests: + - script: pytester + files: + recipe: + - test_cramjam.py + requirements: + build: + - pytester + run: + - pytester-run + +about: + homepage: https://github.com/milesgranger/cramjam + license: MIT + license_family: MIT + license_file: LICENSE + summary: python bindings to rust-implemented compression + description: | + Extremely thin Python bindings to de/compression algorithms in Rust. + documentation: https://docs.rs/cramjam + +extra: + recipe-maintainers: + - milesgranger diff --git a/recipes/recipes_emscripten/cramjam/test_cramjam.py b/recipes/recipes_emscripten/cramjam/test_cramjam.py new file mode 100644 index 000000000..167dbab1e --- /dev/null +++ b/recipes/recipes_emscripten/cramjam/test_cramjam.py @@ -0,0 +1,6 @@ +def test_cramjam(): + import cramjam + + compressed = cramjam.snappy.compress(b"bytes") + decompressed = cramjam.snappy.decompress(compressed) + assert bytes(decompressed) == b"bytes"