{% set version = "4.19.1" %}

package:
  name: jsonschema-meta
  version: {{ version }}

source:
  url: https://pypi.io/packages/source/j/jsonschema/jsonschema-{{ version }}.tar.gz
  sha256: ec84cc37cfa703ef7cd4928db24f9cb31428a5d0fa77747b8b51a847458e0bbf

build:
  noarch: python
  number: 0

requirements:
  host:
    - python >=3.8
  run:
    - python >=3.8

outputs:
  - name: jsonschema
    build:
      noarch: python
      script: {{ PYTHON }} -m pip install . --no-deps -vv --no-build-isolation
      entry_points:
        - jsonschema = jsonschema.cli:main
    requirements:
      host:
        - hatch-fancy-pypi-readme
        - hatch-vcs
        - hatchling
        - pip
        - python >=3.8
      run:
        - attrs >=22.2.0
        - importlib_resources >=1.4.0
        - jsonschema-specifications >=2023.03.6
        - pkgutil-resolve-name >=1.3.10
        - python >=3.8
        - referencing >=0.28.4
        - rpds-py >=0.7.1
    test:
      requires:
        - pip
      imports:
        - jsonschema
      commands:
        - pip check
        - jsonschema --version
        - jsonschema --help
        - jsonschema --version | grep {{ version.replace(".", "\.") }}  # [unix]

  - name: jsonschema-with-format
    build:
      noarch: python
    requirements:
      host:
        - python >=3.8
      run:
        - {{ pin_subpackage('jsonschema', max_pin='x.x.x') }}
        - fqdn
        - idna
        - isoduration
        - jsonpointer >1.13
        - rfc3339-validator
        - rfc3987
        - uri-template
        - webcolors >=1.11
    test:
      requires:
        - pip
      imports:
        - jsonschema
      commands:
        - pip check

  - name: jsonschema-with-format-nongpl
    build:
      noarch: python
    requirements:
      host:
        - python >=3.8
      run:
        - {{ pin_subpackage('jsonschema', max_pin='x.x.x') }}
        - fqdn
        - idna
        - isoduration
        - jsonpointer >1.13
        - rfc3339-validator
        - rfc3986-validator >0.1.0
        - uri-template
        - webcolors >=1.11
    test:
      requires:
        - pip
      imports:
        - jsonschema
      commands:
        - pip check

  - name: jsonschema-with-all
    build:
      noarch: python
    requirements:
      host:
        - python >=3.8
      run:
        - {{ pin_subpackage('jsonschema-with-format-nongpl', max_pin='x.x.x') }}
        - {{ pin_subpackage('jsonschema-with-format', max_pin='x.x.x') }}
    test:
      files:
        - start_test.py
      source_files:
        - json
      requires:
        - flask
        - pip
        - pytest-cov
      imports:
        - jsonschema
      commands:
        - pip check
        # additional pytest args are set in start_test.py
        - python start_test.py --cov-fail-under=96 -k "not WrappedReferencingError_hashability"

about:
  home: https://github.com/python-jsonschema/jsonschema
  license: MIT
  license_file: COPYING
  summary: An implementation of JSON Schema validation for Python
  doc_url: https://python-jsonschema.readthedocs.org
  doc_source_url: https://github.com/python-jsonschema/jsonschema/blob/v{{ version }}/docs/index.rst
  dev_url: https://github.com/python-jsonschema/jsonschema

extra:
  feedstock-name: jsonschema
  recipe-maintainers:
    - minrk
    - ocefpaf
    - nehaljwani
    - bollwyvl
