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

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

source:
  url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
  sha256: 0e24171cf01021bc5dc17d6a9d4f33a048f09d62cc3f62541e95ef104588bda4
  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') }}
  host:
    - pip
    - python
    - gmp   # [not win]
  run:
    - python
    - gmp   # [not win]
test:
  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
  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
