Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions recipes/recipes_emscripten/pynacl/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

# Configure cross-compilation for PyNaCl's bundled libsodium
# PyNaCl builds its bundled libsodium and needs to know about cross-compilation

# Set environment variables that autotools/configure scripts recognize
export CHOST="wasm32-unknown-emscripten"

# PyNaCl specific environment variables for bundled libsodium
export LIBSODIUM_MAKE_ARGS=""
export LIBSODIUM_CONFIGURE_ARGS="--host=wasm32-unknown-emscripten"

# Build PyNaCl
$PYTHON -m pip install . $PIP_ARGS
56 changes: 56 additions & 0 deletions recipes/recipes_emscripten/pynacl/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
context:
name: pynacl
version: 1.6.0

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

source:
- url: https://pypi.io/packages/source/${{ name[0] }}/${{ name }}/${{ name }}-${{ version }}.tar.gz
sha256: cb36deafe6e2bce3b286e5d1f3e1c246e0ccdb8808ddb4550bb2792f2df298f2

build:
number: 0
script: build.sh

requirements:
build:
- ${{ compiler('c') }}
- cross-python_${{target_platform}}
- python
- pip
- make
- cffi
host:
- python
- cffi
- pip
run:
- cffi

tests:
- script: pytester
files:
recipe:
- test_import_pynacl.py
requirements:
build:
- pytester
run:
- pytester-run

about:
homepage: https://pynacl.readthedocs.io/
license: Apache-2.0
license_file: LICENSE
license_family: Apache
summary: Python binding to the Networking and Cryptography (NaCl) library
description: |
PyNaCl is a Python binding to the Networking and Cryptography library (NaCl).
These libraries have a stated goal of improving usability, security and speed.
documentation: https://pynacl.readthedocs.io/

extra:
recipe-maintainers:
- Copilot
8 changes: 8 additions & 0 deletions recipes/recipes_emscripten/pynacl/test_import_pynacl.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
def test_import_pynacl():
import nacl
import nacl.secret
import nacl.public
import nacl.utils
import nacl.hash
import nacl.signing
import nacl.encoding
Loading