{% set name = "pycryptodome" %}
{% set version = "3.12.0" %}

package:
  name: "{{ name|lower }}"
  version: "{{ version }}"

source:
  url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.zip
  sha256: 12c7343aec5a3b3df5c47265281b12b611f26ec9367b6129199d67da54b768c1
  patches:
    - 0001-Make-load_lib-CONDA_PREFIX-aware.patch

build:
  number: 0
  script: "{{ PYTHON }} -m pip install . --no-deps --ignore-installed --no-cache-dir -vvv "
  ignore_run_exports:
    - gmp  # [not win]
requirements:
  build:
    - {{ compiler('c') }}
    - m2-patch  # [win]
    - patch  # [not win]
    - git
  host:
    - pip
    - python
    - gmp   # [not win]
    - setuptools
    - wheel
  run:
    - python
    - gmp   # [not win]
test:
  requires:
    - pytest
    - pip
  commands:
    - pip check
  imports:
    - Crypto
    - Crypto.Cipher
    - Crypto.Hash
    - Crypto.IO
    - Crypto.Math
    - Crypto.Protocol
    - Crypto.PublicKey
    - Crypto.Random
    - Crypto.SelfTest
    - Crypto.SelfTest.Cipher
    - Crypto.SelfTest.Hash
    - Crypto.SelfTest.IO
    - Crypto.SelfTest.Math
    - Crypto.SelfTest.Protocol
    - Crypto.SelfTest.PublicKey
    - Crypto.SelfTest.Random
    - Crypto.SelfTest.Signature
    - Crypto.SelfTest.Util
    - Crypto.Signature
    - Crypto.Util

about:
  home: http://www.pycryptodome.org
  license: BSD-2-Clause AND Unlicense
  license_family: BSD
  license_file: LICENSE.rst
  summary: Cryptographic library for Python
  doc_url: https://www.pycryptodome.org/en/latest/
  dev_url: https://github.com/Legrandin/pycryptodome

extra:
  recipe-maintainers:
    - mariusvniekerk
