{% set version = "1.8.2" %}

{% 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.io/packages/source/s/send2trash/Send2Trash-{{ version }}.tar.gz
  sha256: c132d59fa44b9ca2b1699af5c86f57ce9f4c5eb56629d5d55fbb7a35f84e2312

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

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

test:
  source_files:
    - tests
  imports:
    - send2trash
  requires:
    - pip
    - pytest-cov
  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
