{% set name = "py-rattler" %}
{% set version = "0.25.0" %}

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

source:
  url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/{{ name.replace('-','_') }}-{{ version }}.tar.gz
  sha256: 62d282870d08404898cec16da39f6085964117d19ee2f6d4a15f3ae19bd07860

build:
  number: 0

outputs:
  - name: py-rattler
    build:
      skip: true  # [py<38]
    script: build_base.{{ 'sh' if unix else 'bat' }}
    requirements:
      build:
        - {{ stdlib("c") }}
        - {{ compiler('c') }}
        - {{ compiler('rust') }}
        - cargo-bundle-licenses
      host:
        - pip
        - python
        - python_abi
        - maturin >=1.9.0,<2
        - openssl {{ openssl }}  # [unix]
      run:
        - python
    test:
      imports:
        - rattler
      requires:
        - pip
        - abi3audit
      commands:
        - abi3audit %PREFIX%/Lib/site-packages/rattler/rattler.pyd -s -v --assume-minimum-abi3 3.8  # [win]
        - abi3audit $SP_DIR/rattler/rattler.abi3.so -s -v --assume-minimum-abi3 3.8  # [not win]
        - pip check

  - name: py_rattler
    build:
      noarch: generic
      skip: true  # [not (linux and x86_64 and py<38)]
    requirements:
      host:
        - python
        - setuptools
      run:
        - python
        - {{ pin_subpackage('py-rattler', max_pin='x.x.x') }}
    test:
      imports:
        - rattler
      requires:
        - pip
      commands:
        - pip check

about:
  home: https://github.com/conda/rattler
  license: BSD-3-Clause
  license_family: BSD
  license_file:
    - LICENSE
    - py-rattler/THIRDPARTY.yml
  summary: A blazing fast library to work with the conda ecosystem
  description: |
    Rattler is a library that provides common functionality used within the conda
    ecosystem. The goal of the library is to enable programs and other libraries to
    easily interact with the conda ecosystem without being dependent on Python. Its
    primary use case is as a library that you can use to provide conda related
    workflows in your own tools.
  dev_url: https://github.com/conda/rattler
  doc_url: https://rattler.prefix.dev/py-rattler

extra:
  feedstock-name: py-rattler
  recipe-maintainers:
    - baszalmstra
    - pavelzw
