Skip to content

Commit

Permalink
Bump recipes (#38)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
ryanking13 and pre-commit-ci[bot] authored Jun 25, 2024
1 parent 7416c84 commit 0ea28c1
Show file tree
Hide file tree
Showing 50 changed files with 730 additions and 365 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,14 +191,18 @@ jobs:
path: ./repodata/
retention-days: 15

- name: Compress build artifacts
run: |
tar -czvf packages.tar.gz repodata
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
./repodata/*.whl
./packages.tar.gz
test:
runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,8 @@ def pytest_collection_modifyitems(config, items):

def package_is_built(package_name):
return _package_is_built(package_name, pytest.pyodide_dist_dir)


requires_jspi = pytest.mark.xfail_browsers(
firefox="requires jspi", safari="requires jspi"
)
8 changes: 3 additions & 5 deletions packages/awkward-cpp/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
package:
name: awkward-cpp
version: "32"
version: "33"
top-level:
- awkward_cpp

source:
url: https://files.pythonhosted.org/packages/e4/64/f95efa6441d08284e760a394545d6ac3ede2811011d24f0797d786cb2570/awkward-cpp-32.tar.gz
sha256: ad8c5af86206fb0f434b16749cc5cca69a15a88e16ca43e91e56c5cca77421f0
url: https://files.pythonhosted.org/packages/7e/4f/058f320b0952d7a59fdaa5dbd96ec7c4485271178b2404f644a79ef8b095/awkward-cpp-33.tar.gz
sha256: 550adebccd329d18d02e95226d0b89698188fd33e44f07450942c692881927d8

build:
script: |
export CMAKE_ARGS="${CMAKE_ARGS} -DEMSCRIPTEN=1"
exports: requested

requirements:
Expand Down
8 changes: 5 additions & 3 deletions packages/biopython/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ package:
top-level:
- Bio
- BioSQL
requirements:
run:
- numpy
source:
sha256: 78e6bfb78de63034037afd35fe77cb6e0a9e5b62706becf78a7d922b16ed83f7
url: https://files.pythonhosted.org/packages/cc/d4/3d8848191a7a37187704c382e6dfda4d6a47d05a14cd64f004c55a3cd5a1/biopython-1.83.tar.gz
patches:
- "patches/0001-Remove-error-message-if-wheel-is-not-installed.patch"
requirements:
run:
- numpy
about:
home: https://biopython.org/
PyPI: https://pypi.org/project/biopython
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
From 434770dc707c5192159249d098e6dbc660fa6556 Mon Sep 17 00:00:00 2001
From: Hood Chatham <[email protected]>
Date: Thu, 20 Jun 2024 12:31:15 -0700
Subject: [PATCH] Remove error message if wheel is not installed

Since pypa/setuptools#4369 was merged, wheel is vendored into setuptools and no
longer needs to be installed for `bdist_wheel` to work.

Upstream PR:
https://github.com/biopython/biopython/pull/4749
---
setup.py | 9 ---------
1 file changed, 9 deletions(-)

diff --git a/setup.py b/setup.py
index 530b413a9..6cfc48de5 100644
--- a/setup.py
+++ b/setup.py
@@ -37,15 +37,6 @@ except ImportError:
"Try running: python -m ensurepip"
)

-if "bdist_wheel" in sys.argv:
- try:
- import wheel # noqa: F401
- except ImportError:
- sys.exit(
- "We need both setuptools AND wheel packages installed "
- "for bdist_wheel to work. Try running: pip install wheel"
- )
-

# Make sure we have the right Python version.
MIN_PY_VER = (3, 9)
--
2.34.1

11 changes: 11 additions & 0 deletions packages/cpp-exceptions-test2/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package:
name: cpp-exceptions-test2
version: "1.0"
tag:
- core
- pyodide.test
source:
path: src
build:
cxxflags: -fexceptions
ldflags: -fexceptions
13 changes: 13 additions & 0 deletions packages/cpp-exceptions-test2/src/cpp_exceptions_test2.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#include "Python.h"
#include <stdexcept>

extern "C" __attribute__((visibility("default"))) PyObject*
PyInit_cpp_exceptions_test2()
{
try {
throw std::runtime_error("something bad?");
} catch (const std::exception& e) {
PyErr_SetString(PyExc_ImportError, "oops");
}
return nullptr;
}
Empty file.
16 changes: 16 additions & 0 deletions packages/cpp-exceptions-test2/src/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from setuptools import Extension, setup

setup(
name="cpp-exceptions-test2",
version="1.0",
ext_modules=[
Extension(
name="cpp_exceptions_test2", # as it would be imported
# may include packages/namespaces separated by `.`
language="c++",
sources=[
"cpp_exceptions_test2.cpp"
], # all sources are compiled into a single binary file
),
],
)
16 changes: 16 additions & 0 deletions packages/crc32c/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package:
name: crc32c
version: "2.4"
top-level:
- crc32c
source:
url: https://files.pythonhosted.org/packages/6f/19/47ac8d1d5b81a83272fe56d4cf425274437fd619ed0af9a5f9805484748c/crc32c-2.4.tar.gz
sha256: d985c4d9b1a1fd16c593d83f8735a8e4e156790a95338a1e0b199aac51ca1e5e
about:
home: https://github.com/ICRAR/crc32c
PyPI: https://pypi.org/project/crc32c
summary: A python package implementing the crc32c algorithm in hardware and software
license: LGPL-2.1-or-later
extra:
recipe-maintainers:
- agriyakhetarpal
60 changes: 60 additions & 0 deletions packages/crc32c/test_crc32c.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Test suite for the crc32c Pyodide package, based on the original test suite:
# https://github.com/ICRAR/crc32c/blob/master/test/test_crc32c.py

import pytest
from pytest_pyodide import run_in_pyodide


@run_in_pyodide(packages=["crc32c"])
def test_zero(selenium):
import crc32c

assert crc32c.crc32c(b"") == 0


TEST_DATA = [
("Numbers1", b"123456789", 0xE3069283),
("Numbers2", b"23456789", 0xBFE92A83),
("Numbers3", b"1234567890", 0xF3DBD4FE),
("Phrase", b"The quick brown fox jumps over the lazy dog", 0x22620404),
(
"LongPhrase",
(
b"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc omni virtuti vitium contrario nomine opponitur. "
b"Conferam tecum, quam cuique verso rem subicias; Te ipsum, dignissimum maioribus tuis, voluptasne induxit, ut adolescentulus eriperes "
b"P. Conclusum est enim contra Cyrenaicos satis acute, nihil ad Epicurum. Duo Reges: constructio interrete. Tum Torquatus: Prorsus, inquit, assentior;\n"
b"Quando enim Socrates, qui parens philosophiae iure dici potest, quicquam tale fecit? Sed quid sentiat, non videtis. Haec quo modo conveniant, non "
b"sane intellego. Sed ille, ut dixi, vitiose. Dic in quovis conventu te omnia facere, ne doleas. Quod si ita se habeat, non possit beatam praestare "
b"vitam sapientia. Quis suae urbis conservatorem Codrum, quis Erechthei filias non maxime laudat? Primum divisit ineleganter; Huic mori optimum esse "
b"propter desperationem sapientiae, illi propter spem vivere."
),
0xFCB7575A,
),
]


@run_in_pyodide(packages=["crc32c"])
@pytest.mark.parametrize("name, val, checksum", TEST_DATA)
def test_all(selenium, name, val, checksum):
import crc32c

assert crc32c.crc32c(val) == checksum


@run_in_pyodide(packages=["crc32c"])
@pytest.mark.parametrize("name, val, checksum", TEST_DATA)
def test_piece_by_piece(selenium, name, val, checksum):
# The initial CRC value
c = 0

# A generator that yields each byte of the input value
# as a separate byte
def as_individual_bytes(val):
for byte in val:
yield bytes([byte])

for x in as_individual_bytes(val):
import crc32c

c = crc32c.crc32c(x, c)
assert c == checksum
10 changes: 2 additions & 8 deletions packages/cryptography/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,9 @@ source:
- patches/0001-Tell-rust-lang-libc-that-time_t-is-64-bits.patch
build:
script: |
export OPENSSL_INCLUDE_PATH=$(pkg-config --cflags-only-I --dont-define-prefix openssl)
export OPENSSL_LIBRARY_PATH=$(pkg-config --libs-only-L --dont-define-prefix openssl)
export OPENSSL_DIR=$WASM_LIBRARY_DIR
cflags: |
-Wno-implicit-function-declaration
$(OPENSSL_INCLUDE_PATH)
ldflags: |
$(OPENSSL_LIBRARY_PATH)
-Wl,--no-entry
# Allow linking to native libraries, otherwise libssl and libcrypto will be not linked to the final binary
export RUSTFLAGS="-Z link-native-libraries=yes"
requirements:
run:
- openssl
Expand Down
7 changes: 3 additions & 4 deletions packages/cvxpy-base/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package:
name: cvxpy-base
version: 1.5.0
version: 1.5.1
top-level:
- cvxpy
source:
# TODO: replace with cvxpy-base from PyPI after 1.5 release
url: https://github.com/cvxpy/cvxpy/archive/23f1eaa.zip
sha256: 4b2a0d982a810d0fdb9f189ab5faa4dbef39679921335e54d737e1b57c555673
url: https://files.pythonhosted.org/packages/f8/9b/27b36409e5bfba14bee4de65af0735ea3ce2db5b81d825f33cbfb51873fc/cvxpy_base-1.5.1.tar.gz
sha256: ba4c7cb018c6afac7b779f355b13a61aa5c8dccaad91fa805b98c68ae1b99325
requirements:
run:
# Dependencies that are needed to run the package
Expand Down
2 changes: 1 addition & 1 deletion packages/ffmpeg/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ build:
--disable-stripping \
--disable-programs \
--disable-pthreads \
--nm=emnm \
--nm="$PYODIDE_ROOT/emsdk/emsdk/upstream/bin/llvm-nm -g" \
--ar=emar --cc=emcc --cxx=em++ --objcc=emcc --dep-cc=emcc --ranlib=emranlib \
--enable-cross-compile \
--prefix=${WASM_LIBRARY_DIR}
Expand Down
16 changes: 16 additions & 0 deletions packages/lakers-python/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package:
name: lakers-python
version: 0.3.0
top-level:
- lakers
source:
url: https://files.pythonhosted.org/packages/29/93/5d70b035f987a48dd854c1afc21025fb8446aae4d43c685b68691175623c/lakers_python-0.3.0.tar.gz
sha256: 009fc5e31b5a9a276216ff43ffd097004396a2a9131359a1da35d464e599cd1c
requirements:
executable:
- rustup
about:
home: https://github.com/openwsn-berkeley/lakers/
PyPI: https://pypi.org/project/lakers-python/
summary: An implementation of EDHOC (RFC 9528)
license: BSD-3-Clause
25 changes: 25 additions & 0 deletions packages/lakers-python/test_lakers_python.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
from pytest_pyodide import run_in_pyodide


@run_in_pyodide(packages=["lakers-python"])
def test_lakers_python(selenium_standalone):
import lakers

# Running an exchange needs some keys and credentials; those are from the EDHOC test vectors.
R = bytes.fromhex(
"72cc4761dbd4c78f758931aa589d348d1ef874a7e303ede2f140dcf3e6aa4aac"
)
CRED_R = bytes.fromhex(
"A2026008A101A5010202410A2001215820BBC34960526EA4D32E940CAD2A234148DDC21791A12AFBCBAC93622046DD44F02258204519E257236B2A0CE2023F0931F1F386CA7AFDA64FCDE0108C224C51EABF6072"
)

initiator = lakers.EdhocInitiator()
responder = lakers.EdhocResponder(R, CRED_R)

message_1 = initiator.prepare_message_1()
responder.process_message_1(message_1)
_message_2 = responder.prepare_message_2(
lakers.CredentialTransfer.ByReference, None, None
)

# There's a lot more that can be tested, but if this runs through, we've covered the most critical kinds of operations.
12 changes: 6 additions & 6 deletions packages/libcst/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
package:
name: libcst
version: 1.3.1
version: 1.4.0
top-level:
- libcst
source:
url: https://files.pythonhosted.org/packages/f5/7e/11e25b1fc11bcad6b3f3a90fe515406387fe02e6b1ad36dea00ec125ca98/libcst-1.3.1.tar.gz
sha256: 03b1df1ae02456f1d465fcd5ead1d0d454bb483caefd8c8e6bde515ffdb53d1b
url: https://files.pythonhosted.org/packages/e4/bd/ff41d7a8efc4f60a61d903c3f9823565006f44f2b8b11c99701f552b0851/libcst-1.4.0.tar.gz
sha256: 449e0b16604f054fa7f27c3ffe86ea7ef6c409836fe68fe4e752a1894175db00
about:
home: ""
PyPI: https://pypi.org/project/libcst
summary:
A concrete syntax tree with AST-like properties for Python 3.0 through
3.12 programs.
license:
"All contributions towards LibCST are MIT licensed. Some Python files
have been derived from the standard library and are therefore PSF licensed. Modifications
All contributions towards LibCST are MIT licensed. Some Python files have
been derived from the standard library and are therefore PSF licensed. Modifications
on these files are dual licensed (both MIT and PSF). Some Python files have been
taken from dataclasses and are therefore Apache licensed. Modifications on these
files are licensed under Apache 2.0 license."
files are licensed under Apache 2.0 license.
extra:
recipe-maintainers:
- zsol
Expand Down
5 changes: 4 additions & 1 deletion packages/libnetcdf/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ requirements:
- libxml

build:
type: shared_library
type: static_library
script: |
export PATH=${WASM_LIBRARY_DIR}/bin:${PATH}
Expand All @@ -25,15 +25,18 @@ build:
# dap + byterange: no libcurl
emconfigure ./configure \
--host=none \
--prefix=${WASM_LIBRARY_DIR} \
--disable-doxygen \
--enable-netcdf-4 \
--disable-dap \
--disable-nczarr \
--disable-byterange \
--disable-dap-remote-tests \
--disable-examples \
--disable-utilities \
--disable-testsets \
--disable-shared \
CFLAGS="-fPIC -I${WASM_LIBRARY_DIR}/include -s USE_ZLIB=1" \
CXXFLAGS="-fPIC -I${WASM_LIBRARY_DIR}/include -s USE_ZLIB=1" \
LDFLAGS="-fPIC -s USE_ZLIB=1"
Expand Down
1 change: 1 addition & 0 deletions packages/libwebp/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ build:
-DWEBP_BUILD_WEBPINFO=OFF \
-DWEBP_BUILD_WEBPMUX=OFF \
-DWEBP_BUILD_EXTRAS=OFF \
-DWEBP_BUILD_ANIM_UTILS=OFF \
../
emmake make -j ${PYODIDE_JOBS:-3}
emmake make install
1 change: 1 addition & 0 deletions packages/lightgbm/test_lightgbm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from pytest_pyodide import run_in_pyodide


@pytest.mark.skip_pyproxy_check
@pytest.mark.driver_timeout(60)
@run_in_pyodide(packages=["lightgbm", "numpy"])
def test_train_predict(selenium):
Expand Down
4 changes: 4 additions & 0 deletions packages/netcdf4/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ build:
export PATH=${WASM_LIBRARY_DIR}/bin:${PATH}
export HDF5_DIR=${WASM_LIBRARY_DIR}
echo ${HDF5_DIR}
ldflags: |
-L$(WASM_LIBRARY_DIR)/lib
-lhdf5
-lhdf5_hl
about:
home: https://github.com/Unidata/netcdf4-python
PyPI: https://pypi.org/project/netcdf4
Expand Down
Loading

0 comments on commit 0ea28c1

Please sign in to comment.