{% set name = "maturin" %}
{% set version = "1.5.1" %}

package:
  name: {{ name }}-suite
  version: {{ version }}

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

build:
  number: 0
  skip: True  # [py<37]

outputs:
  - name: {{ name }}
    script: bld-win.bat                  # [win]
    script: build-unix.sh                # [not win]
    build:
      missing_dso_whitelist:
        - '$RPATH/ld64.so.1'  # [s390x]
    requirements:
      build:
        - {{ compiler('c') }}
        - {{ compiler('rust') }}     # [not win]
        - rust_win-64                # [win]
      host:
        - pip
        - python
        - setuptools
        - setuptools-rust >=1.4.0
        - wheel
        - tomli >=1.1.0               # [py<311]
      run:
        - python
        - tomli >=1.1.0               # [py<311]
    test:
      imports:
        - maturin
      requires:
        - pip
      commands:
        - maturin -V
        - maturin --help
        - maturin build --help
        - pip check

  - name: {{ name }}-gnu
    script: bld-win.bat
    build:
      skip: true  # [not win]
    requirements:
      build:
        - {{ compiler('m2w64_c') }}
        - rust-gnu_win-64
      host:
        - pip
        - python
        - setuptools
        - setuptools-rust >=1.4.0
        - wheel
        - tomli >=1.1.0                # [py<311]
      run:
        - python
        - tomli >=1.1.0                # [py<311]
    test:
      imports:
        - maturin
      requires:
        - pip
      commands:
        - maturin -V
        - maturin --help
        - maturin build --help
        - pip check

about:
  home: https://www.maturin.rs/
  license: MIT OR Apache-2.0
  license_family: MIT
  license_file: license-mit
  summary: >-
    Build and publish crates with pyo3, rust-cpython and cffi bindings as well as rust binaries as python packages
  description: |
    This project is meant as a zero configuration replacement for setuptools-rust and milksnake.
    It supports building wheels for python 3.5+ on windows, linux, mac and freebsd, can upload them to pypi and has basic pypy support.
  dev_url: https://github.com/PyO3/maturin
  doc_url: https://www.maturin.rs/

extra:
  recipe-maintainers:
    - apcamargo
