{% set name = "pydantic-settings" %}
{% set version = "2.14.2" %}

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

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

build:
  number: 0
  script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation
  skip: true  # [py<310]

requirements:
  host:
    - pip
    - python
    - hatchling
  run:
    - python
    - pydantic >=2.7.0
    - python-dotenv >=0.21.0
    - typing-inspection >=0.4.0
  run_constrained:
    # yaml
    - pyyaml >=6.0.1
    # toml
    - tomli >=2.0.1
    # azure-key-vault
    - azure-keyvault-secrets >=4.8.0
    - azure-identity >=1.16.0
    # aws-secrets-manager
    - boto3>=1.35.0
    # gcp-secret-manager
    - google-cloud-secret-manager>=2.23.1

test:
  source_files:
    - tests
  imports:
    - pydantic_settings
  commands:
    - pip check
    # Missed module pytest_examples for test_docs.py
    # Broken output formatting in stdout for test_source_cli.py
    - python -m pytest -v tests --ignore=tests/test_docs.py --ignore=tests/test_source_cli.py  # [unix]
    # test_symlink_subdir failed on Windows with:
    # OSError: [WinError 1314] A required privilege is not held by the client
    - python -m pytest -v tests --ignore=tests/test_docs.py --ignore=tests/test_source_cli.py -k " not test_symlink_subdir"  # [win]
    - python -m pytest -vv tests --ignore=tests/test_docs.py  # [osx]
  requires:
    - pip
    - pytest
    - pytest-mock

about:
  home: https://github.com/pydantic/pydantic-settings
  summary: Settings management using Pydantic
  license: MIT
  license_family: MIT
  license_file: LICENSE
  description: |
    Pydantic Settings provides optional Pydantic features for loading a settings or config class from environment
    variables or secrets files.
  dev_url: https://github.com/pydantic/pydantic-settings
  doc_url: https://pydantic.dev/docs/validation/latest/concepts/pydantic_settings/

extra:
  recipe-maintainers:
    - jan-janssen
    - fhoehle
