{% set name = "anaconda-anon-usage" %}
{% set version = "0.7.5" %}
{% set sha256 = "7bddccd60f43e56946b21e7392fbcddff493d67ed299404be7222050fa6c7b51" %}
{% set number = 0 %}
# We don't support 3.8 anymore, but this package is unique in that we seek
# to support as wide a range of *existing* conda installations as practical
{% set python_min = "3.8" %}

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

source:
  url: https://github.com/anaconda/{{ name }}/archive/refs/tags/{{ version }}.tar.gz
  sha256: {{ sha256 }}

build:
  # Use a build number difference to ensure that the plugin
  # variant is slightly preferred by conda's solver.
  noarch: python
  number: {{ number + 100 }}  # [variant=="plugin"]
  number: {{ number }}        # [variant=="patch"]
  script_env:
   - NEED_SCRIPTS=no   # [variant=="plugin"]
   - NEED_SCRIPTS=yes  # [variant=="patch"]

requirements:
  host:
    - python {{ python_min }}
    - setuptools
    - wheel
    - pip
  run:
    - python >={{ python_min }}        # [variant=="plugin"]
    - python >={{ python_min }},<3.11  # [variant=="patch"]
  run_constrained:
    - conda >=23.7         # [variant=="plugin"]
    - conda >=4.11,<23.7   # [variant=="patch"]

test:
  requires:
    - python {{ python_min }}
    - conda >=23.7         # [variant=="plugin"]
    - conda >=4.11,<23.7   # [variant=="patch"]
    - pip
  imports:
    - anaconda_anon_usage
  commands:
    - pip check
    - conda info
    - conda info --json
    - python -m anaconda_anon_usage.install --expect  # [variant=="patch"]

about:
  home: https://github.com/anaconda/anaconda-anon-usage
  summary: basic anonymous telemetry for conda clients
  license: BSD-3-Clause
  license_family: BSD
  license_file: LICENSE
  dev_url: https://github.com/anaconda/anaconda-anon-usage/
  doc_url: https://github.com/anaconda/anaconda-anon-usage/
  description: |
        This package augments the request header data that conda delivers
        to package servers during index and package requests. Specifically,
        three randomly generated tokens are appended to the "user agent"
        that Conda already sends with each request.

extra:
  skip-lints:
    - avoid_noarch
