{% set version = "1.8.3" %}

{% set pytest_args = '--cov-fail-under=37' %}

{% if noarch_platform == "osx" %}
  # probably related to azure CI perms/paths, etc.
  {% set pytest_args = pytest_args ~ ' -k "not test_trash_topdir"' %}
{% endif %}

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

source:
  url: https://pypi.org/packages/source/s/send2trash/Send2Trash-{{ version }}.tar.gz
  sha256: b18e7a3966d99871aefeb00cfbcfdced55ce4871194810fc71f4aa484b953abf

build:
  number: 1
  noarch: python
  script: {{ PYTHON }} -m pip install . --no-deps -vv --no-build-isolation
  entry_points:
    - send2trash = send2trash.__main__:main

requirements:
  host:
    - __{{ noarch_platform }}
    - pip
    - python {{ python_min }}
    - setuptools >=40.6.0
  run:
    - __{{ noarch_platform }}
    - python >={{ python_min }}
    {% if noarch_platform == "osx" %}- pyobjc-framework-cocoa{% endif %}
    {% if noarch_platform == "win" %}- pywin32{% endif %}

test:
  source_files:
    - tests
  imports:
    - send2trash
  requires:
    - pip
    - pytest-cov
    - python {{ python_min }}
  commands:
    - pip check
    - send2trash -h
    - pytest -vv --cov=send2trash --cov-branch --cov-report=term-missing:skip-covered --no-cov-on-fail {{ pytest_args }}

about:
  home: https://github.com/arsenetar/send2trash
  license: BSD-3-Clause
  license_family: BSD
  license_file: LICENSE
  summary: Python library to natively send files to Trash (or Recycle bin) on all platforms.

extra:
  recipe-maintainers:
    - bollwyvl
