{% set name = "conda-package-handling" %}
{% set version_match = load_file_regex(
  load_file="src/conda_package_handling/__init__.py",
  regex_pattern='^__version__ = "(.+)"') %}
{% set version = version_match[1] %}

package:
  name: {{ name }}
  version: {{ version }}

source:
  - path: ..

build:
  number: 0
  script: {{ PYTHON }} -m pip install . --no-deps -vv
  entry_points:
    - cph = conda_package_handling.cli:main
  # by skipping nooarch: python, tests run under build python

requirements:
  host:
    - python
    - pip
    - wheel
  run:
    - python
    - zstandard >=0.15
    - conda-package-streaming >=0.9.0

test:
  source_files:
    - tests
  requires:
    - mock
    - pytest
    - pytest-cov
    - pytest-mock
  imports:
    - conda_package_handling
    - conda_package_handling.api
  commands:
    - pytest -v --cov=conda_package_handling --color=yes tests/

about:
  home: https://github.com/conda/conda-package-handling
  dev_url: https://github.com/conda/conda-package-handling
  doc_url: https://conda.github.io/conda-package-handling/
  license: BSD-3-Clause
  license_family: BSD
  license_file: LICENSE
  summary: Create and extract conda packages of various formats.
  description: |
    `conda` and `conda-build` use `conda_package_handling.api` to create and extract
    conda packages. This package also provides the `cph` command line tool to
    extract, create, and convert between formats.

extra:
  recipe-maintainers:
    - dholth
    - jezdez
