{% set name = "PyNaCl" %}
{% set version = "1.2.1" %}
{% set sha256 = "e0d38fa0a75f65f556fb912f2c6790d1fa29b7dd27a1d9cc5591b281321eaaa9" %}

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:
    - 0001-Fix-name-of-static-sodium-lib.patch  # [win]
    - 0002-Relax-timeout-on-test-s.patch        # [win and vc<14]

build:
  number: 0
  ignore_run_exports:  # [win]
    - libsodium        # [win]

requirements:
  host:
    - python
    - setuptools
    - cffi >=1.4.1
    - libsodium
    - msinttypes  # [win and vc<14]

  build:
    - m2-patch    # [win]
    - {{ compiler('c') }}

  run:
    - python
    - six
    - cffi >=1.4.1

test:
  imports:
    - nacl
    - nacl.bindings
    - nacl.pwhash
  requires:
    - pytest >=3.2.1
    - hypothesis >=3.27.0
  source_files:
    - tests/
  commands:
    - pytest

about:
  home: https://github.com/pyca/pynacl
  license: Apache-2.0
  license_family: Apache
  license_file: LICENSE
  summary: PyNaCl is a Python binding to the Networking and Cryptography library, a crypto library with the stated goal of improving usability, security and speed.
  description: |
    PyNaCl is a Python binding to the Networking and Cryptography library, a crypto library with the stated goal of improving usability, security and speed. It supports Python 2.7 and 3.3+ as well as PyPy 2.6+.
  doc_url: https://pynacl.readthedocs.io/en/latest/
  dev_url: https://github.com/pyca/pynacl

extra:
  recipe-maintainers:
    - CJ-Wright
