Skip to content

Commit 2aac593

Browse files
CopilotDerThorsten
authored andcommitted
Add lakers-python recipe for emscripten-forge
Co-authored-by: DerThorsten <904752+DerThorsten@users.noreply.github.com>
1 parent 41ec05c commit 2aac593

File tree

3 files changed

+68
-0
lines changed

3 files changed

+68
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
export MATURIN_PYTHON_SYSCONFIGDATA_DIR=${PREFIX}/etc/conda/_sysconfigdata__emscripten_wasm32-emscripten.py
4+
${PYTHON} -m pip install . -vvv
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
context:
2+
name: lakers-python
3+
version: 0.5.0
4+
5+
package:
6+
name: ${{ name }}
7+
version: ${{ version }}
8+
9+
source:
10+
- url: https://pypi.io/packages/source/l/lakers-python/lakers_python-${{ version }}.tar.gz
11+
sha256: 19059fde5572409f061c3dfcaa12f1634572ff3622b45f81853d05bb67a37bc5
12+
13+
build:
14+
number: 0
15+
16+
requirements:
17+
build:
18+
- cross-python_${{ target_platform }}
19+
- cffi == 1.17.1
20+
- setuptools-rust
21+
- rust
22+
- maturin
23+
host:
24+
- python
25+
- cffi == 1.17.1
26+
run:
27+
- cffi == 1.17.1
28+
29+
tests:
30+
- script: pytester
31+
requirements:
32+
build:
33+
- pytester
34+
run:
35+
- pytester-run
36+
files:
37+
recipe:
38+
- test_import_lakers.py
39+
40+
about:
41+
summary: Python wrapper for the lakers crate (EDHOC implementation in Rust)
42+
license: BSD-3-Clause
43+
license_file: LICENSE
44+
homepage: https://github.com/openwsn-berkeley/lakers/
45+
repository: https://github.com/openwsn-berkeley/lakers/
46+
documentation: https://github.com/openwsn-berkeley/lakers/
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
def test_lakers_import():
2+
"""Test that lakers package can be imported successfully."""
3+
import lakers
4+
5+
# Test basic import and availability of key functions
6+
assert hasattr(lakers, 'EdhocInitiator'), "EdhocInitiator should be available"
7+
assert hasattr(lakers, 'p256_generate_key_pair'), "p256_generate_key_pair should be available"
8+
9+
# Test basic functionality
10+
# Generate a keypair
11+
key_pair = lakers.p256_generate_key_pair()
12+
assert key_pair is not None, "Key pair generation should work"
13+
14+
# Instantiate an initiator
15+
initiator = lakers.EdhocInitiator()
16+
assert initiator is not None, "EdhocInitiator should be instantiable"
17+
18+
print("lakers-python import and basic functionality test passed")

0 commit comments

Comments
 (0)