{% set name = "tqdm" %}
{% set version = "4.67.3" %}

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

source:
  url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
  sha256: 7d825f03f89244ef73f1d4ce193cb1774a8179fd96f31d7e1dcde62092b960bb

build:
  number: 1
  script: {{ PYTHON }} -m pip install . --no-deps --no-build-isolation -vv
  entry_points:
    - tqdm = tqdm.cli:main
  skip: true  # [py<37]

requirements:
  host:
    - python
    - pip
    - setuptools_scm >=3.4
    - setuptools >=42
    - toml
    - wheel
  run:
    - python
    - colorama  # [win]
  run_constrained:
    - ipywidgets >=6

{% set deselect_tests = "" %}
# E   FileNotFoundError: [WinError 2] The system cannot find the file specified
{% set deselect_tests = deselect_tests + " --deselect=tests/tests_main.py::test_pipes" %}  # [win]
# test_pandas_leave can raise AssertionError randomly on different platforms
{% set deselect_tests = deselect_tests + " --deselect=tests/tests_pandas.py::test_pandas_leave" %}


test:
  requires:
    - dask-core
    - pandas
    - numpy
    - pip
    - pytest >=6
    - pytest-timeout
    - pytest-xdist
    - pytest-asyncio >=0.24
    - rich
    - ripgrep
  source_files:
    - tests
    - pyproject.toml
  imports:
    - tqdm
  commands:
    - pip check
    - tqdm --help
    - tqdm -v | rg {{ version }}
    - pytest -k "not tests_perf" tests/ -W ignore::FutureWarning {{ deselect_tests }}

about:
  home: https://tqdm.github.io
  license: MPL-2.0 AND MIT
  license_family: MOZILLA
  license_file: LICENCE
  summary: A Fast, Extensible Progress Meter
  description: A Fast, Extensible Progress Bar for Python and CLI
  dev_url: https://github.com/tqdm/tqdm
  doc_url: https://tqdm.github.io

extra:
  recipe-maintainers:
    - casperdcl
    - pmlandwehr