{% set name = "conda-pypi" %}
{% set version = "0.11.0" %}

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

source:
  url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/conda_pypi-{{ version }}.tar.gz
  sha256: 9137327ffef74aaac7a95e5940b39e4bc333c77f05d22efeb199af6767e3b481

build:
  skip: true  # [py<310]
  # can't be noarch because we can't place EXTERNALLY-MANAGED in stdlib (first level is site-packages)
  # However, EXTERNALLY-MANAGED is temporarily disabled
  number: 0
  script:
    - set -x      # [unix]
    - "@ECHO ON"  # [win]
    - {{ PYTHON }} -m pip install . --no-deps --no-build-isolation -vv

requirements:
  host:
    - python
    - pip
    - hatchling >=1.26
    - hatch-vcs >=0.2.0
    - python-build
  run:
    - python
    - conda >=26.1.0
    - pip >=23.0.1
    - packaging
    - unearth
    - python-build
    - python-installer >=1.0
    - platformdirs
    - conda-index >=0.11.0
    - conda-package-streaming >=0.11

test:
  imports:
    - conda_pypi
    - conda_pypi.main
  requires:
    - pip
  commands:
    - python -m conda pypi --help  # Using 'conda pypi' directly on Windows fails due to the actual 'base' conda being found earlier than test-env's conda
    - pip check

about:
  home: https://github.com/conda/conda-pypi
  license: MIT
  license_family: MIT
  license_file: LICENSE
  summary: Better PyPI interoperability for the conda ecosystem
  dev_url: https://github.com/conda/conda-pypi
  doc_url: https://conda.github.io/conda-pypi

extra:
  recipe-maintainers:
    - danyeaw
    - ryanskeith
    - jaimergp
    - jezdez

skip-lints:
# conda-pypi needs pip and unearth for conversion
  - python_build_tool_in_run
  - python_build_tools_in_host
