Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python-3.13 [emscripten-3.1.73] #1471

Merged
merged 21 commits into from
Jan 9, 2025
Merged
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
98 changes: 49 additions & 49 deletions .github/workflows/build_recipes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,56 +85,56 @@ jobs:
run: |
python -m emci build changed $GITHUB_WORKSPACE/ origin/emscripten-3.1.73 HEAD
################################################################
# UPLOAD
################################################################
- name: Upload packages to Quetz
if: (github.event_name == 'push' && github.repository == 'emscripten-forge/recipes')
shell: bash -l {0}
env:
QUETZ_API_KEY: ${{ secrets.QUETZ_API_KEY }}
run: |
overall_success=true
# ################################################################
# # UPLOAD
# ################################################################
# - name: Upload packages to Quetz
# if: (github.event_name == 'push' && github.repository == 'emscripten-forge/recipes')
# shell: bash -l {0}
# env:
# QUETZ_API_KEY: ${{ secrets.QUETZ_API_KEY }}
# run: |
# overall_success=true

# Loop over {emscripten-wasm32, linux-64, noarch}
for platform in emscripten-wasm32 linux-64 noarch; do
if [ -d "${GITHUB_WORKSPACE}/output/${platform}" ]; then
cd "${GITHUB_WORKSPACE}/output/${platform}"
files=$(ls *.tar.bz2 2> /dev/null)
if [ -n "$files" ]; then
for package in $files; do
echo "Uploading ${package} for ${platform}"
# # Loop over {emscripten-wasm32, linux-64, noarch}
# for platform in emscripten-wasm32 linux-64 noarch; do
# if [ -d "${GITHUB_WORKSPACE}/output/${platform}" ]; then
# cd "${GITHUB_WORKSPACE}/output/${platform}"
# files=$(ls *.tar.bz2 2> /dev/null)
# if [ -n "$files" ]; then
# for package in $files; do
# echo "Uploading ${package} for ${platform}"

FILE_SHA256=$(sha256sum "${package}" | awk '{ print $1 }')
CURL_CMD=(
curl -H "X-API-Key: ${QUETZ_API_KEY}" -X POST
"https://beta.mamba.pm/api/channels/emscripten-forge/upload/${package}?sha256=${FILE_SHA256}&force=false"
--data-binary "@${package}"
-o response_body.txt
-w "%{http_code}"
-s
)
HTTP_STATUS=$( "${CURL_CMD[@]}" )
RESPONSE=$(<response_body.txt)
# FILE_SHA256=$(sha256sum "${package}" | awk '{ print $1 }')
# CURL_CMD=(
# curl -H "X-API-Key: ${QUETZ_API_KEY}" -X POST
# "https://beta.mamba.pm/api/channels/emscripten-forge/upload/${package}?sha256=${FILE_SHA256}&force=false"
# --data-binary "@${package}"
# -o response_body.txt
# -w "%{http_code}"
# -s
# )
# HTTP_STATUS=$( "${CURL_CMD[@]}" )
# RESPONSE=$(<response_body.txt)

# Check the HTTP status code and log appropriate message
if [[ "$HTTP_STATUS" -eq 201 ]]; then
echo "Upload succeeded for ${package} on ${platform}"
else
echo "Error: Upload failed with HTTP status $HTTP_STATUS"
echo "Response Body: $RESPONSE"
overall_success=false
fi
rm -f response_body.txt
done
fi
fi
done
# # Check the HTTP status code and log appropriate message
# if [[ "$HTTP_STATUS" -eq 201 ]]; then
# echo "Upload succeeded for ${package} on ${platform}"
# else
# echo "Error: Upload failed with HTTP status $HTTP_STATUS"
# echo "Response Body: $RESPONSE"
# overall_success=false
# fi
# rm -f response_body.txt
# done
# fi
# fi
# done

# Check if all uploads were successful
if [ "$overall_success" = false ]; then
echo "One or more uploads failed"
exit 1
else
echo "All uploads completed successfully"
fi
# # Check if all uploads were successful
# if [ "$overall_success" = false ]; then
# echo "One or more uploads failed"
# exit 1
# else
# echo "All uploads completed successfully"
# fi
9 changes: 7 additions & 2 deletions conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@ blas_impl:
- mkl
- blis

emscripten-abi:
- '3.1.73'

abseil_cpp:
- '20210324.2'
alsa_lib:
Expand Down Expand Up @@ -298,7 +301,7 @@ coin_or_osi:
coin_or_utils:
- 2.11
cross-python_emscripten-32:
- '3.10.1'
- '3.13.1'
cutensor:
- 1
curl:
Expand Down Expand Up @@ -574,7 +577,7 @@ pybind11_abi:
pip:
- '24.0.*'
python:
- 3.11.* *_cpython
- 3.13.* *_cpython
# # part of a zip_keys: python, python_impl, numpy
# - 3.7.* *_cpython # [not (osx and arm64)]
# - 3.8.* *_cpython
Expand All @@ -585,6 +588,8 @@ python_impl:
# # part of a zip_keys: python, python_impl, numpy
# - cpython # [not (osx and arm64)]
# - cpython
pytester:
- 1.0.12
qt:
- 5.12
qtkeychain:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
#!/bin/bash

# echo "ACTIVATE CROSS PYTHON in $BUILD_PREFIX" $BUILD_PREFIX $$BUILD_PREFIX
# echo $BUILD_PREFIX

# if [ -z ${BUILD_PREFIX+x} ]; then echo "BUILD_PREFIX is unset"; else echo "BUILD_PREFIX is set to '$BUILD_PREFIX'"; fi


# $BUILD_PREFIX/bin/python3 -c "import sys;print(sys.executable)"
# python

# # probe if cross-env is already installed
# $BUILD_PREFIX/bin/python3 -m crossenv

OLD_PYTHON=$PYTHON
unset PYTHON
MYPYTHON=$BUILD_PREFIX/bin/python
Expand All @@ -11,6 +24,11 @@ mkdir -p $PREFIX/bin
cp $BUILD_PREFIX/bin/python3 $PREFIX/bin


# echo "probe"
# # probe if cross-env is already installed
# $BUILD_PREFIX/bin/python3 -m crossenv

# echo "probe done"



Expand All @@ -21,6 +39,7 @@ source $CONDA_PREFIX/etc/conda/activate.d/emscripten_emscripten-wasm32_activate.
if [[ "${CONDA_BUILD:-0}" == "1" && "${CONDA_BUILD_STATE}" != "TEST" ]]; then
echo "Setting up cross-python"
PY_VER=$($BUILD_PREFIX/bin/python -c "import sys; print('{}.{}'.format(*sys.version_info[:2]))")
echo "PY_VER=$PY_VER"
if [ -d "$PREFIX/lib_pypy" ]; then
sysconfigdata_fn=$(find "$PREFIX/lib_pypy/" -name "_sysconfigdata_*.py" -type f)
elif [ -d "$PREFIX/lib/pypy$PY_VER" ]; then
Expand Down
14 changes: 9 additions & 5 deletions recipes/recipes/cross-python_emscripten-wasm32/recipe.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
context:
name: cross-python_emscripten-wasm32
version: "3.11.3"
version: "3.13.1"

package:
name: ${{ name|lower }}
version: ${{ version }}

build:
number: 10
number: 1

requirements:

run:
- coreutils
- crossenv >=1.2
- emscripten_emscripten-wasm32
- emscripten_emscripten-wasm32
- rsync
- sed
- python 3.11
- setuptools #<60.0
- python =3.13
- setuptools
- pip

run_exports:
strong:
- emscripten-abi >=3.1.73,<3.1.74.0a0

about:
summary: cross-python
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,11 @@ for file in $PREFIX/opt/emsdk/upstream/emscripten/*; do
echo "Linking $file"
ln -sf $file $PREFIX/bin/
fi

# Check if the ends with .py
if [[ $file == *.py ]]; then
# Create a symbolic link in the $PREFIX/bin directory
echo "Linking $file"
ln -sf $file $PREFIX/bin/
fi
done
6 changes: 4 additions & 2 deletions recipes/recipes/emscripten_emscripten-wasm32/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ context:
version: 3.1.73

build:
number: 1
number: 4


outputs:
- package:
Expand All @@ -28,7 +29,8 @@ outputs:
- python >=3.11
- nodejs 16.*
run_exports:
- ${{ pin_subpackage('emscripten-abi', lower_bound='x.x.x', upper_bound='x.x.x') }}
strong:
- ${{ pin_subpackage('emscripten-abi', lower_bound='x.x.x', upper_bound='x.x.x') }}

- package:
name: emscripten-abi
Expand Down
20 changes: 7 additions & 13 deletions recipes/recipes/pytester/recipe.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
context:
version: '1.0.11'
version: '1.0.14'

source:
- path: bin
Expand All @@ -13,34 +13,28 @@ outputs:
version: ${{ version }}

build:
number: 11
number: 0

noarch: python

requirements:
host:
- python
run:
- if: linux
then:
- pyjs_code_runner >= 3.0.0
- microsoft::playwright <1.42
else:
- pyjs_code_runner >= 3.0.0
- microsoft::playwright
- microsoft::playwright > 1.49.1
- pyjs_code_runner >= 3.0.0

- package:
name: pytester-run
version: ${{ version }}
build:
number: 11
number: 0
noarch: generic
requirements:
run:
- pyjs
- pytest <8
- python <3.12
- emscripten-abi==3.1.45
- pytest
- python


about:
Expand Down
10 changes: 9 additions & 1 deletion recipes/recipes_emscripten/cffi/build.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
#!/bin/bash
${PYTHON} -m pip install .

LDFLAGS="$LDFLAGS $EM_FORGE_SIDE_MODULE_LDFLAGS"
CFLAGS="$CFLAGS $EM_FORGE_SIDE_MODULE_CFLAGS"

export LDFLAGS
export CFLAGS


ARCHFLAGS="" ${PYTHON} -m pip install . --verbose
19 changes: 8 additions & 11 deletions recipes/recipes_emscripten/cffi/recipe.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,33 @@
context:
version: 1.15.1
version: 1.17.1

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

source:
- url: https://pypi.io/packages/source/c/cffi/cffi-${{ version }}.tar.gz
sha256: d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9
patches:
- patches/libffi-config.patch
sha256: 1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824
- path: setup.py

build:
number: 2
number: 1

requirements:
build:
- ${{ compiler('c') }}
- cross-python_emscripten-wasm32
- python
- ${{ compiler('c') }}
- pkg-config
- pip
host:
- python
- libffi
- pycparser
- pip
# run:
# - python
# - libffi
# - pycparser
- libffi
run:
- pycparser


tests:
- script: pytester
Expand Down
Loading
Loading