{% set name = "cramjam" %}
{% set version = "2.6.2" %}

package:
  name: {{ name|lower }}
  version: {{ version }}

source:
  url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
  sha256: 1ffdc8d1381b5fee57b33b537e38fa7fd29e8d8f3b544dbab1d71dbfaaec3bef

build:
  number: 0
  #skip s390x as it lack maturin dependency
  skip: True # [py<37 or s390x] 
  script:
    - {{ PYTHON }} -m pip install . --no-deps --no-build-isolation -vv

requirements:
  build:
    - {{ compiler('rust') }}                 # [unix]
    - rust_win-64                            # [win]
    - {{ compiler('c') }}                    # [unix]
    - {{ compiler('m2w64_c') }}              # [win]
  host:
    - python
    - pip
    - setuptools
    - wheel
    - maturin 0.14.17
  run:
    - python

test:
  imports:
    - cramjam
  commands:
    - pip check
  requires:
    - pip

about:
  home: https://github.com/milesgranger/pyrus-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. 
    Allows for using algorithms such as Snappy, without any system dependencies.
    This is handy when being used in environments like AWS Lambda, 
    where installing packages like python-snappy becomes difficult because of 
    system level dependencies.
  dev_url: https://github.com/milesgranger/pyrus-cramjam
  doc_url: https://docs.rs/cramjam/latest/cramjam/

extra:
  recipe-maintainers:
    - martindurant
    - milesgranger
