{% set name = "conda-package-handling" %}
{% set version = "1.7.3" %}

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

source:
  url: https://github.com/conda/conda-package-handling/archive/{{ version }}.tar.gz
  sha256: 2a7cc4dc892d3581764710e869d36088291de86c7ebe0375c830a2910ef54bb6

build:
  number: 0
  script: {{ PYTHON }} -m pip install . --no-deps -vv
  entry_points:
    - cph = conda_package_handling.cli:main
  # HACK: case-sensitive mismatch in latest conda-build
  missing_dso_whitelist:
    - '*/VCRUNTIME140.dll'   # [win]
    - MSVCR90.dll     # [win]

requirements:
  build:
    - python                                 # [build_platform != target_platform]
    - cross-python_{{ target_platform }}     # [build_platform != target_platform]
    - cython                                 # [build_platform != target_platform]
    - {{ compiler('c') }}
  host:
    - python
    - pip
    - cython
    - _libarchive_static_for_cph
    - msinttypes  # [win and vc<14]
  run:
    - futures   # [py27]
    - python
    - six
    - tqdm

test:
  source_files:
    - tests
  requires:
    - mock
    - pytest
    - pytest-cov
    - pytest-mock
  imports:
    - conda_package_handling
    - conda_package_handling.archive_utils_cy
  commands:
    # This test is skipped until Dec 2019 which is weird. Skip for now.
    - pytest tests -k "not test_secure_refusal_to_extract_abs_paths"

about:
  home: https://github.com/conda/conda-package-handling
  license: BSD-3-Clause
  license_family: BSD
  license_file:
    - LICENSE
    - static_deps_licenses/bzip2.txt
    - static_deps_licenses/libarchive.txt
    - static_deps_licenses/zlib.txt
    - static_deps_licenses/zstd.txt
    - static_deps_licenses/msinttypes.txt  # [win and py27]
    - static_deps_licenses/libiconv.txt    # [osx]
  summary: Create and extract conda packages of various formats

extra:
  recipe-maintainers:
    - msarahan
    - beckermr
    - dbast
