{% set name = "pycryptodomex" %}
{% set version = "3.9.4" %}
{% set sha256 = "22d970cee5c096b9123415e183ae03702b2cd4d3ba3f0ced25c4e1aba3967167" %}

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

source:
  fn: {{ name }}-{{ version }}.tar.gz
  url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
  sha256: {{ sha256 }}
  patches:
    # ctypes.util.find_library() isn't CONDA_PREFIX aware :'(
    # https://github.com/ContinuumIO/anaconda-issues/issues/1716
    - 0001-Make-load_lib-CONDA_PREFIX-aware.patch  # [unix]

build:
  number: 0
  script: "{{ PYTHON }} -m pip install . --no-deps --ignore-installed -vvv "

requirements:
  build:
    - {{ compiler('c') }}
  host:
    - python
    - pip
  run:
    - python
    - gmp   # [not win]

test:
  imports:
    - Cryptodome
    - Cryptodome.Cipher
    - Cryptodome.Hash
    - Cryptodome.IO
    - Cryptodome.Math
    - Cryptodome.Protocol
    - Cryptodome.PublicKey
    - Cryptodome.Random
    - Cryptodome.SelfTest
    - Cryptodome.SelfTest.Cipher
    - Cryptodome.SelfTest.Hash
    - Cryptodome.SelfTest.IO
    - Cryptodome.SelfTest.Math
    - Cryptodome.SelfTest.Protocol
    - Cryptodome.SelfTest.PublicKey
    - Cryptodome.SelfTest.Random
    - Cryptodome.SelfTest.Signature
    - Cryptodome.SelfTest.Util
    - Cryptodome.Signature
    - Cryptodome.Util
  requires:
    - psutil

about:
  home: http://www.pycryptodome.org
  license: Public Domain/BSD 2-Clause/OCB/MPIR
  license_file: LICENSE.rst
  summary: Cryptographic library for Python
  description: |
    PyCryptodome is a self-contained Python package of low-level cryptographic
    primitives.
  doc_url: https://www.pycryptodome.org/en/latest/
  dev_url: https://github.com/Legrandin/pycryptodome

extra:
  recipe-maintainers:
    - nehaljwani
