# yaml-language-server: $schema=https://raw.githubusercontent.com/prefix-dev/recipe-format/main/schema.json
schema_version: 1

context:
  version: "8.7.0"
  python_max_check: "3.13"

recipe:
  name: importlib-metadata
  version: ${{ version }}

source:
  url: https://pypi.org/packages/source/i/importlib_metadata/importlib_metadata-${{ version }}.tar.gz
  sha256: d13b81ad223b890aa16c5471f2ac3056cf76c5f10f82d6f9292f0b415f389000

build:
  number: 1
  noarch: python

outputs:
  - package:
      name: importlib-metadata
    build:
      noarch: python
      script:
        # use uv _with_ default build isolation to avoid circular dependency from 
        # https://github.com/conda-forge/setuptools_scm-feedstock
        - uv pip install --python ${{ PYTHON }} . -v --no-deps --link-mode=copy
    requirements:
      host:
        - python ${{ python_min }}.*
        - uv
      run:
        - python >=${{ python_min }}
        - zipp >=3.20
    tests:
      - python:
          imports:
            - importlib_metadata
            - importlib_metadata._typing
          pip_check: true
          python_version:
            - ${{ python_min }}.*
            - ${{ python_max_check }}.*

  - package:
      name: importlib_metadata
    build:
      noarch: generic
    requirements:
      run:
        - ${{ pin_subpackage("importlib-metadata", exact=True) }}
    tests:
      - python:
          imports:
            - importlib_metadata
            - importlib_metadata._typing
          pip_check: true
          python_version:
            - ${{ python_min }}.*
            - ${{ python_max_check }}.*
      - files:
          source:
            - tests/
        requirements:
          run:
            - jaraco.test >=5.4
            - packaging
            - pyfakefs
            - pytest >=6,!=8.1.*
            - pytest-cov
            - python ${{ python_min }}.*
        script:
          - coverage run --source=importlib_metadata --branch -m pytest -vv --tb=long --color=yes
          - coverage report --show-missing --skip-covered --fail-under=90

about:
  homepage: https://github.com/python/importlib_metadata
  summary: A library to access the metadata for a Python package
  license: Apache-2.0
  license_file: LICENSE

extra:
  feedstock-name: importlib_metadata
  recipe-maintainers:
    - nehaljwani
    - nicoddemus
    - marcelotrevisani
