Skip to content

Commit

Permalink
Merge branch 'emscripten-3.1.73' into bump-re2_2024.07.02_to_2024.07.…
Browse files Browse the repository at this point in the history
…3_for_emscripten-3.1.73
  • Loading branch information
DerThorsten authored Jan 31, 2025
2 parents c55662f + 339799f commit 7ed1ef2
Show file tree
Hide file tree
Showing 38 changed files with 322 additions and 131 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/build_recipes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,20 @@ jobs:
- name: Delete fortran
run: sudo apt-get remove gfortran -y

- name: apt-install playwright dependencies
run: |
sudo apt-get update -y && sudo apt-get install -y \
libwoff1 libvpx9 libevent-2.1-7t64 libopus0 libgstreamer-plugins-base1.0-0 \
libgstreamer-gl1.0-0 \
libgstreamer-plugins-bad1.0-0 \
libflite1 \
libavif16 \
libharfbuzz-icu0 \
libsecret-1-0 \
libhyphen0 \
libmanette-0.2-0 \
libgles2 \
gstreamer1.0-libav
################################################################
# CONFIG
################################################################
Expand All @@ -56,7 +70,7 @@ jobs:
environment-file: ci_env.yml
environment-name: ci
init-shell: bash
cache-environment: true
cache-environment: false
post-cleanup: 'all'

################################################################
Expand All @@ -66,7 +80,6 @@ jobs:
shell: bash -el {0}
run: |
cp $GITHUB_WORKSPACE/.github/workflows/.condarc $HOME
cp $GITHUB_WORKSPACE/conda_build_config.yaml $HOME
################################################################
# PUSH
Expand Down
2 changes: 1 addition & 1 deletion emci/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@


# rattler build related
RATTLER_CONDA_BUILD_CONFIG_PATH = os.path.join(REPO_ROOT, "conda_build_config.yaml")
RATTLER_CONDA_BUILD_CONFIG_PATH = os.path.join(REPO_ROOT, "variant.yaml")

CONDA_PREFIX = os.environ.get("CONDA_PREFIX")
if CONDA_PREFIX is None:
Expand Down
20 changes: 10 additions & 10 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,45 +19,45 @@ curl = "*"

[feature.feature_rattler_build.tasks.build-emscripten-compiler-pkg]
cmd = [
"rattler-build","build",
"rattler-build","build",
# format
"--package-format", "tar-bz2",
# channels
"-c", "https://repo.prefix.dev/emscripten-forge-dev",
"-c", "microsoft",
"-c", "conda-forge",
"--skip-existing", "all",
"-m", "conda_build_config.yaml",
"-m", "variant.yaml",
"--recipe",
"recipes/recipes/emscripten_emscripten-wasm32"
]

[feature.feature_rattler_build.tasks.build-cross-python-pkg]
cmd = [
"rattler-build","build",
"rattler-build","build",
# format
"--package-format", "tar-bz2",
# channels
"-c", "https://repo.prefix.dev/emscripten-forge-dev",
"-c", "microsoft",
"-c", "conda-forge",
"--skip-existing", "all",
"-m", "conda_build_config.yaml",
"-m", "variant.yaml",
"--recipe",
"recipes/recipes/cross-python_emscripten-wasm32"
]

[feature.feature_rattler_build.tasks.build-pytester-pkg]
cmd = [
"rattler-build","build",
"rattler-build","build",
# format
"--package-format", "tar-bz2",
# channels
"-c", "https://repo.prefix.dev/emscripten-forge-dev",
"-c", "microsoft",
"-c", "conda-forge",
"--skip-existing", "all",
"-m", "conda_build_config.yaml",
"-m", "variant.yaml",
"--recipe",
"recipes/recipes/pytester"
]
Expand All @@ -69,7 +69,7 @@ depends_on = ["build-emscripten-compiler-pkg", "build-cross-python-pkg", "build-

[feature.feature_rattler_build.tasks.build-emscripten-wasm32-pkg]
cmd = [
"rattler-build","build",
"rattler-build","build",
# format
"--package-format", "tar-bz2",
# channels
Expand All @@ -78,21 +78,21 @@ cmd = [
"-c", "conda-forge",
"--target-platform", "emscripten-wasm32",
"--skip-existing", "all",
"-m", "conda_build_config.yaml",
"-m", "variant.yaml",
"--recipe"
]

[feature.feature_rattler_build.tasks.build-pkg]
cmd = [
"rattler-build","build",
"rattler-build","build",
# format
"--package-format", "tar-bz2",
# channels
"-c", "https://repo.prefix.dev/emscripten-forge-dev",
"-c", "microsoft",
"-c", "conda-forge",
"--skip-existing", "all",
"-m", "conda_build_config.yaml",
"-m", "variant.yaml",
"--recipe"
]

Expand Down
15 changes: 14 additions & 1 deletion recipes/recipes/pytester/pytester/main_mount/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,21 @@

if __name__ == "__main__":

try:
retcode = pytest.main()
except Exception as e:
print(f"pytest failed with exception: {e}")
# get backtrace
exc_type, exc_value, exc_traceback = sys.exc_info()
import traceback
traceback.print_exception(exc_type, exc_value, exc_traceback)


retcode = pytest.ExitCode.INTERRUPTED
raise e



retcode = pytest.main()
if retcode != pytest.ExitCode.OK:
raise RuntimeError(f"pytest failed with return code: {retcode}")

Expand Down
4 changes: 2 additions & 2 deletions recipes/recipes/pytester/recipe.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
context:
version: '1.0.18'
version: '1.4.0'

source:
- path: bin
Expand All @@ -22,7 +22,7 @@ outputs:
- python
run:
- playwright
- pyjs_code_runner >=3.0.0
- pyjs_code_runner >= 3.1.1

- package:
name: pytester-run
Expand Down
4 changes: 2 additions & 2 deletions recipes/recipes_emscripten/argparse/recipe.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
context:
version: '3.1'
version: '3.2'

package:
name: cpp-argparse
version: ${{ version }}

source:
url: https://github.com/p-ranav/argparse/archive/v${{ version }}.tar.gz
sha256: d01733552ca4a18ab501ae8b8be878131baa32e89090fafdeef018ebfa4c6e46
sha256: 9dcb3d8ce0a41b2a48ac8baa54b51a9f1b6a2c52dd374e28cc713bab0568ec98

build:
number: 1
Expand Down
2 changes: 1 addition & 1 deletion recipes/recipes_emscripten/awkward-cpp/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ source:
sha256: 1f8b112a597bd2438794e1a721a63aa61869fa9598a17ac6bd811ad6f6400d06

build:
number: 0
number: 1

requirements:
build:
Expand Down
2 changes: 1 addition & 1 deletion recipes/recipes_emscripten/boost-cpp/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ source:
# - 0001-config-libcpp15.patch

build:
number: 0
number: 1

requirements:
build:
Expand Down
6 changes: 3 additions & 3 deletions recipes/recipes_emscripten/boost-histogram/recipe.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
context:
version: 1.5.0
version: 1.5.1

package:
name: boost-histogram
Expand All @@ -8,9 +8,9 @@ package:
source:
- url: https://pypi.io/packages/source/b/boost_histogram/boost_histogram-${{ version
}}.tar.gz
sha256: 0623f010e6c52e5d018767723959686090db07fc30f0d1d8475b5d663c5ddb2c
sha256: 6e0f3dbdf7ab60ca1c61d5caa4f3f9e6097461feb65c6dbb01302fd88b1be524
patches:
- patches/patch_allow_shared.patch
- patches/patch_allow_shared.patch

build:
number: 0
Expand Down
11 changes: 6 additions & 5 deletions recipes/recipes_emscripten/cryptography/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,23 @@ source:
- patches/0001-Tell-rust-lang-libc-that-time_t-is-64-bits.patch

build:
number: 3
number: 0

requirements:
build:
- "${{compiler('cxx')}}"
- cross-python_${{target_platform}}
- cffi == 1.15.1
- cffi
- openssl
- setuptools-rust
- rust

host:
- python
- openssl
- cffi == 1.15.1
- cffi
run:
- cffi == 1.15.1
- cffi
tests:
- script: pytester
requirements:
Expand All @@ -38,4 +39,4 @@ tests:
- pytester-run
files:
recipe:
- test_import_cryptography.py
- test_import_cryptography.py
4 changes: 2 additions & 2 deletions recipes/recipes_emscripten/fmt/recipe.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
context:
version: 11.1.2
version: 11.1.3

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

source:
url: https://github.com/fmtlib/fmt/archive/${{ version }}.tar.gz
sha256: d8773cf062cc806d4dd4df658111f15ba7a2c9c65db5084d2491696828b1eb97
sha256: 67cd23ea86ccc359693e2ce1ba8d1bab533c02d743c09b15f3131102d0c2fc1c

build:
number: 0
Expand Down
2 changes: 1 addition & 1 deletion recipes/recipes_emscripten/icu/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ source:
sha256: 818a80712ed3caacd9b652305e01afc7fa167e6f2e94996da44b90c2ab604ce1

build:
number: 0
number: 1

requirements:
build:
Expand Down
4 changes: 2 additions & 2 deletions recipes/recipes_emscripten/lfortran/recipe.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
context:
name: lfortran
version: 0.44.0
version: 0.45.0

package:
name: ${{ name }}
Expand All @@ -9,7 +9,7 @@ package:
source:
url: https://github.com/lfortran/lfortran/releases/download/v${{ version }}/${{
name }}-${{ version }}.tar.gz
sha256: 0d0f652b0a3c6b86fedfd25fe6f91c1f5e9743ab8fb8fe86faa978e0851d304c
sha256: 41ebda8ca5e51ebd7d2e426f60981e1f5908cd7d64c97ec6f5a2157c4bfbe9ac

build:
number: 0
Expand Down
4 changes: 2 additions & 2 deletions recipes/recipes_emscripten/libpng/recipe.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
context:
name: libpng
version: 1.6.45
version: 1.6.46

package:
name: ${{ name }}
Expand All @@ -9,7 +9,7 @@ package:
source:
url: http://downloads.sourceforge.net/project/${{ name }}/libpng16/${{ version }}/${{
name }}-${{ version }}.tar.gz
sha256: 7dee9e1ca8152bf52f919456f4190330aee48209887f2ec0b3d9f0ad571df11b
sha256: c2b8ffb46f48331416e01f9e5c7169c7a2e08ad766b742742644e5fdf192e4a1

build:
number: 1
Expand Down
4 changes: 2 additions & 2 deletions recipes/recipes_emscripten/lpython/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ source:
sha256: 9dcfe113cd95366ca8e6e7f23e13a60b666243f93e44179a641c6c30f8a02afa

build:
number: 0
number: 1

requirements:
build:
- ${{ compiler('c') }}
- ${{ compiler('cxx') }}
- cmake
- make # [unix]
- zlib=1.3.1
- zlib
# - xeus =5.1.0 # [build_platform != target_platform]
# - xeus-zmq =3.0.0 # [build_platform != target_platform]
# - llvmdev =16.0.6 # [build_platform != target_platform]
Expand Down
6 changes: 3 additions & 3 deletions recipes/recipes_emscripten/matplotlib/build-base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ rm $SRC_DIR/emscripten.meson.cross.temp

cat $SRC_DIR/emscripten.meson.cross

export CFLAGS="$CFLAGS -sWASM_BIGINT"
export CXXFLAGS="$CXXFLAGS -sWASM_BIGINT"
export LDFLAGS="$LDFLAGS -sWASM_BIGINT"
export CFLAGS="$CFLAGS -sWASM_BIGINT -fexceptions"
export CXXFLAGS="$CXXFLAGS -sWASM_BIGINT -fexceptions"
export LDFLAGS="$LDFLAGS -sWASM_BIGINT -fexceptions"

${PYTHON} -m pip install . -vvv --no-deps --no-build-isolation \
-Csetup-args="--cross-file=$SRC_DIR/emscripten.meson.cross" \
Expand Down
31 changes: 31 additions & 0 deletions recipes/recipes_emscripten/matplotlib/patches/static-cast.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
From 1b919a42a6be3090d4553cafff8f0c0f9e221d60 Mon Sep 17 00:00:00 2001
From: Ian Thomas <[email protected]>
Date: Tue, 14 Jan 2025 14:34:34 +0000
Subject: [PATCH] Static cast patch

---
src/_backend_agg_wrapper.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/_backend_agg_wrapper.cpp b/src/_backend_agg_wrapper.cpp
index 269e2aaa9e..2bad7f4d0b 100644
--- a/src/_backend_agg_wrapper.cpp
+++ b/src/_backend_agg_wrapper.cpp
@@ -250,12 +250,12 @@ PYBIND11_MODULE(_backend_agg, m, py::mod_gil_not_used())

.def_buffer([](RendererAgg *renderer) -> py::buffer_info {
std::vector<py::ssize_t> shape {
- renderer->get_height(),
- renderer->get_width(),
+ static_cast<py::ssize_t>(renderer->get_height()),
+ static_cast<py::ssize_t>(renderer->get_width()),
4
};
std::vector<py::ssize_t> strides {
- renderer->get_width() * 4,
+ static_cast<py::ssize_t>(renderer->get_width() * 4),
4,
1
};
--
2.39.3 (Apple Git-146)
2 changes: 1 addition & 1 deletion recipes/recipes_emscripten/matplotlib/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ source:
sha256: 825919da8957bbc19cec35caf8663b734d34af72a0b040c43b7d8c1b76fdcab7
patches:
- patches/fix-threading-and-font-cache.patch
- patches/static-cast.patch

build:
number: 0
Expand Down Expand Up @@ -39,7 +40,6 @@ outputs:
- pybind11
- freetype
- qhull

run:
- contourpy
- cycler
Expand Down
Loading

0 comments on commit 7ed1ef2

Please sign in to comment.