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

Add sha256 checksum #1106

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
74e94ec
repack emscripten (#1064)
DerThorsten May 27, 2024
6776924
continue on fail (#1071)
DerThorsten May 27, 2024
c2dec69
Update xeus from 4.0.3 to 5.0.0 (#1072)
emscripten-forge-bot May 28, 2024
fe06394
Removed xtl from the dependencies (#1073)
JohanMabille May 28, 2024
08df215
Update repack_emscripten.md
DerThorsten May 28, 2024
9076982
Update xeus-lite from 2.0.0 to 3.0.0 (#1075)
emscripten-forge-bot May 29, 2024
8fcc157
Update pythran from 0.16.0 to 0.16.1 (#1074)
emscripten-forge-bot May 29, 2024
afece4d
Updated xeus-lite dependencies (#1076)
JohanMabille May 29, 2024
d00549c
Update xeus-javascript from 0.3.4 to 0.4.0 (#1077)
emscripten-forge-bot May 29, 2024
1a686c8
update xeus to 5.1.0
anutosh491 May 30, 2024
204069b
Merge pull request #1080 from anutosh491/update_xeus
IsabelParedes May 30, 2024
1d48549
Update xproperty to 0.12.0 (#1084)
anutosh491 May 31, 2024
ce35a78
Update xwidgets to 0.29.0 (#1083)
anutosh491 May 31, 2024
3916b29
Update ipython from 8.24.0 to 8.25.0
emscripten-forge-bot Jun 1, 2024
a099bc7
Update xcanvas to 0.5.0 (#1087)
anutosh491 Jun 3, 2024
ca22124
Update numpy to 1.26.2 (#1091)
ianthomas23 Jun 4, 2024
6c2ea3c
Updated lfortran to 0.36.0 (#1088)
anutosh491 Jun 4, 2024
a2c9202
Update pytest from 8.2.1 to 8.2.2 (#1093)
emscripten-forge-bot Jun 5, 2024
190cc36
Update numpy to 1.26.3 (#1096)
ianthomas23 Jun 5, 2024
4607db8
Update xcanvas from 0.5.0 to 0.5.1 (#1095)
emscripten-forge-bot Jun 5, 2024
bdd4773
Updated xeus-cpp to 0.5.0 (#1092)
anutosh491 Jun 5, 2024
0c21586
Update docs and platforms (#1098)
IsabelParedes Jun 6, 2024
a1cfee9
Update numpy from 1.26.3 to 1.26.4
emscripten-forge-bot Jun 6, 2024
7844382
build and recipe for xxhash (#1099)
KGB99 Jun 7, 2024
22468a0
Update xz from 5.2.10 to 5.2.11 (#1068)
emscripten-forge-bot Jun 7, 2024
6e7366d
Update pyjs from 2.0.0 to 2.0.1 (#1105)
emscripten-forge-bot Jun 10, 2024
d38f80e
Add sha256 checksum
KGB99 Jun 10, 2024
c8074c6
Merge branch 'main' into bump-freetype_2.13.0_to_2.13.1
KGB99 Jun 12, 2024
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
10 changes: 1 addition & 9 deletions .github/workflows/build_recipes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,6 @@ jobs:
cache-environment: true
post-cleanup: 'all'

################################################################
# EMSDK
################################################################
- name: Setup emsdk
shell: bash -el {0}
run: |
./emsdk/setup_emsdk.sh ${{ matrix.emsdk_ver }} $(pwd)/emsdk_install

################################################################
# POST ENV INSTALL CONFIG
################################################################
Expand Down Expand Up @@ -106,6 +98,6 @@ jobs:
mkdir -p ${GITHUB_WORKSPACE}/output/${platform}
for package in $(ls ${GITHUB_WORKSPACE}/output/${platform}/*.tar.bz2); do
echo "Uploading ${package} for ${platform} (build with rattler)"
QUETZ_API_KEY=${{ secrets.QUETZ_API_KEY}} quetz-client -u https://beta.mamba.pm post_file_to_channel emscripten-forge ${package}
QUETZ_API_KEY=${{ secrets.QUETZ_API_KEY}} quetz-client -u https://beta.mamba.pm post_file_to_channel emscripten-forge ${package} || true
done
done
7 changes: 7 additions & 0 deletions docs/blog/.authors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,10 @@ authors:
avatar: https://avatars.githubusercontent.com/u/904752?v=4 # Author avatar
slug: DerThorsten # Author profile slug
url: https://github.com/DerThorsten # Author website URL

wolfv:
name: Wolf Vollprecht
description: main author of emscripten-forge
avatar: https://avatars.githubusercontent.com/u/885054?v=4
slug: wolfv # Author profile slug
url: https://prefix.dev # Author website URL
15 changes: 15 additions & 0 deletions docs/blog/posts/repack_emscripten.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
date: 2024-05-24
category:
- rust

authors:
- derthorsten
- wolfv
---

# Emscripten is now a proper package

So far, the emscripten package was a bit of a hack. It relied on a text file `~.emsdkdir` in the home directory which contained the directory of the emscripten installation. This was not very nice, because it was hard to build packages for several emscripten versions.

But now, emscripten is a repacked package that installs emscripten into the conda environment. This allows in principle to compile packages for multiple emscripten versions.
8 changes: 4 additions & 4 deletions docs/development/local_builds.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ I.e. if you open a new terminal, you have to activate the environment again with
This is only needed for MacOS. On Linux, the compiler packages are already built and available in the `emscripten-forge` channel.

```bash
rattler-build build --recipe recipes/recipes/emscripten_emscripten-wasm32/rattler_recipe.yaml -c https://repo.mamba.pm/emscripten-forge -c conda-forge -c microsoft -m conda_build_config.yaml
rattler-build build --recipe recipes/recipes/cross-python_emscripten-wasm32/rattler_recipe.yaml -c https://repo.mamba.pm/emscripten-forge -c conda-forge -c microsoft -m conda_build_config.yaml
rattler-build build --recipe recipes/recipes/pytester/rattler_recipe.yaml -c https://repo.mamba.pm/emscripten-forge -c conda-forge -c microsoft -m conda_build_config.yaml
rattler-build build --recipe recipes/recipes/emscripten_emscripten-wasm32/recipe.yaml -c https://repo.mamba.pm/emscripten-forge -c conda-forge -c microsoft -m conda_build_config.yaml
rattler-build build --recipe recipes/recipes/cross-python_emscripten-wasm32/recipe.yaml -c https://repo.mamba.pm/emscripten-forge -c conda-forge -c microsoft -m conda_build_config.yaml
rattler-build build --recipe recipes/recipes/pytester/recipe.yaml -c https://repo.mamba.pm/emscripten-forge -c conda-forge -c microsoft -m conda_build_config.yaml
```

### Build packages with `rattler-build`:

```bash
rattler-build build --recipe recipes/recipes_emscripten/regex/rattler_recipe.yaml --target-platform=emscripten-wasm32 -c https://repo.mamba.pm/emscripten-forge -c conda-forge -c microsoft -m conda_build_config.yaml
rattler-build build --recipe recipes/recipes_emscripten/regex/recipe.yaml --target-platform=emscripten-wasm32 -c https://repo.mamba.pm/emscripten-forge -c conda-forge -c microsoft -m conda_build_config.yaml
```
18 changes: 2 additions & 16 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,7 @@ version = "0.1.0"
description = "The emscripten-forge for emscripten-wasm32- builds."
authors = ["DerThorsten <[email protected]>"]
channels = ["conda-forge"]
platforms = ["osx-arm64", "linux-64"]

############################################
# setup-emsdk feature / tasks
############################################
[feature.feature_setup_emsdk]
[feature.feature_setup_emsdk.dependencies]
cxx-compiler = "1.5.2.*"
[feature.feature_setup_emsdk.tasks.setup-emsdk]
cmd = ["./emsdk/setup_emsdk.sh", "3.1.45", "$(pwd)/emscripten_forge_emsdk_install"]
outputs = ["emscripten_forge_emsdk_install/emsdk_env.sh"]
platforms = ["osx-arm64", "osx-64", "linux-64"]


############################################
Expand All @@ -40,7 +30,6 @@ cmd = [
"--recipe",
"recipes/recipes/emscripten_emscripten-wasm32"
]
depends_on = ["setup-emsdk"]

[feature.feature_rattler_build.tasks.build-cross-python-pkg]
cmd = [
Expand All @@ -56,7 +45,6 @@ cmd = [
"--recipe",
"recipes/recipes/cross-python_emscripten-wasm32"
]
depends_on = ["setup-emsdk"]

[feature.feature_rattler_build.tasks.build-pytester-pkg]
cmd = [
Expand All @@ -72,7 +60,6 @@ cmd = [
"--recipe",
"recipes/recipes/pytester"
]
depends_on = ["setup-emsdk"]


[feature.feature_rattler_build.tasks.setup]
Expand Down Expand Up @@ -118,6 +105,5 @@ cmd = ["mkdocs", "build"]
############################################

[environments]
setup-emsdk-env = ["feature_setup_emsdk"]
rattler-build-env = ["feature_rattler_build"]
documentation-env = ["feature_documentation"]
documentation-env = ["feature_documentation"]
28 changes: 2 additions & 26 deletions recipes/recipes/emscripten_emscripten-wasm32/activate.sh
Original file line number Diff line number Diff line change
@@ -1,35 +1,14 @@

if [ -z ${CONDA_FORGE_EMSCRIPTEN_ACTIVATED+x} ]; then

export CONDA_FORGE_EMSCRIPTEN_ACTIVATED=1

export EMSDK_PYTHON=${BUILD_PREFIX}/bin/python3
export PYTHON=${BUILD_PREFIX}/bin/python3




CONDA_EMSDK_DIR_CONFIG_FILE=$HOME/.emsdkdir
if test -f "$CONDA_EMSDK_DIR_CONFIG_FILE"; then
echo "Found config file $CONDA_EMSDK_DIR_CONFIG_FILE"
else
# return an error
echo "Config file $CONDA_EMSDK_DIR_CONFIG_FILE not found"
return 1
fi


CONDA_EMSDK_DIR=$CONDA_PREFIX/opt/emsdk

export EMSCRIPTEN_VERSION=$PKG_VERSION

export CONDA_EMSDK_DIR=$(<$CONDA_EMSDK_DIR_CONFIG_FILE)
export EMSCRIPTEN_FORGE_EMSDK_DIR=$CONDA_EMSDK_DIR
echo "Using EMSCRIPTEN_FORGE_EMSDK_DIR $CONDA_EMSDK_DIR_CONFIG_FILE: " $EMSCRIPTEN_FORGE_EMSDK_DIR

$CONDA_EMSDK_DIR/emsdk activate --embedded --build=Release $EMSCRIPTEN_VERSION

source $CONDA_EMSDK_DIR/emsdk_env.sh

export PATH="$CONDA_EMSDK_DIR/upstream/emscripten/":$PATH

# clear all prexisting cmake args / CC / CXX / AR / RANLIB
export CC="emcc"
Expand All @@ -39,8 +18,6 @@ if [ -z ${CONDA_FORGE_EMSCRIPTEN_ACTIVATED+x} ]; then

export CMAKE_ARGS=""



# set the emscripten toolchain
export CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=$CONDA_EMSDK_DIR/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake"

Expand Down Expand Up @@ -82,5 +59,4 @@ if [ -z ${CONDA_FORGE_EMSCRIPTEN_ACTIVATED+x} ]; then
# wasm bigint
export LDFLAGS="$LDFLAGS -sWASM_BIGINT"


fi
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,31 @@ do
done

mkdir -p ${PREFIX}/bin
cp "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" ${PREFIX}/bin/activate_emscripten.sh
cp "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh" ${PREFIX}/bin/activate_emscripten.sh

export EMSDK_PYTHON=${BUILD_PREFIX}/bin/python

./emsdk install $PKG_VERSION

# export EMSDK=/Users/wolfv/Programs/emscripten-forge/emscripten_forge_emsdk_install
export EMSDK=.

mkdir -p $PREFIX/opt/emsdk/
cp -r $EMSDK/upstream $PREFIX/opt/emsdk/upstream
rm -rf $PREFIX/opt/emsdk/upstream/emscripten/test/

mkdir -p $PREFIX/bin

for file in $PREFIX/opt/emsdk/upstream/bin/*; do
echo "Linking $file"
ln -sf $file $PREFIX/bin/
done

for file in $PREFIX/opt/emsdk/upstream/emscripten/*; do
# Check if the file is executable
if [ -x "$file" ] && [ ! -d "$file" ]; then
# Create a symbolic link in the $PREFIX/bin directory
echo "Linking $file"
ln -sf $file $PREFIX/bin/
fi
done
17 changes: 13 additions & 4 deletions recipes/recipes/emscripten_emscripten-wasm32/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,31 @@ context:
version: 3.1.45

build:
number: 25
number: 27

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

source:
git: https://github.com/emscripten-core/emsdk.git

build:
script: build_compiler_package.sh

dynamic_linking:
binary_relocation: false

requirements:
build:
- gettext
- curl
- python
run:
- python
- nodejs 16.*
run_exports:
- ${{ pin_subpackage('emscripten-abi', min_pin='x.x.x', max_pin='x.x.x') }}
- ${{ pin_subpackage('emscripten-abi', min_pin='x.x.x', max_pin='x.x.x') }}

- package:
name: emscripten-abi
Expand All @@ -33,11 +41,12 @@ outputs:
about:
homepage: https://emscripten.org
license: MIT
license_file: LICENSE
license_file: LICENSE.txt
summary: emscripten
description: Emscripten is a complete compiler toolchain to WebAssembly, using LLVM, with a special focus on speed, size, and the Web platform.
documentation: https://emscripten.org/

extra:
recipe-maintainers:
- DerThorsten
- wolfv
52 changes: 0 additions & 52 deletions recipes/recipes/emscripten_emscripten-wasm32/recipe_legacy.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion recipes/recipes_emscripten/freetype/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package:

source:
url: https://download.savannah.gnu.org/releases/freetype/freetype-${{ version }}.tar.gz
sha256:
sha256: 0b109c59914f25b4411a8de2a506fdd18fa8457eb86eca6c7b15c19110a92fa5

build:
number: 0
Expand Down
4 changes: 2 additions & 2 deletions recipes/recipes_emscripten/ipython/recipe.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
context:
version: 8.24.0
version: 8.25.0

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

source:
- url: https://pypi.io/packages/source/i/ipython/ipython-${{ version }}.tar.gz
sha256: 010db3f8a728a578bb641fdd06c063b9fb8e96a9464c63aec6310fbcb5e80501
sha256: c6ed726a140b6e725b911528f80439c534fac915246af3efc39440a6b0f9d716
patches:
- patches/0001-Patch-asyncio-tornado.patch

Expand Down
5 changes: 4 additions & 1 deletion recipes/recipes_emscripten/lfortran/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@ emcmake cmake \
emmake make -j8

# Install step
emmake make install
emmake make install

cp src/lfortran/tests/test_lfortran.js $PREFIX/bin/test_lfortran.js
cp src/lfortran/tests/test_lfortran.wasm $PREFIX/bin/test_lfortran.wasm
14 changes: 11 additions & 3 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.35.0
version: 0.36.0

package:
name: ${{ name }}
Expand All @@ -9,10 +9,10 @@ package:
source:
url: https://github.com/lfortran/lfortran/releases/download/v${{ version }}/${{
name }}-${{ version }}.tar.gz
sha256: 5ecc1ae03067b985943c45f6ec05e9f6e72efd6ad004b052e7a98ba552ff79b0
sha256: 6b3b7cb1380e96a98a9fd3166a3e7e43c3339f736f76029c246436784ffc868f

build:
number: 2
number: 0

requirements:
build:
Expand All @@ -33,6 +33,14 @@ requirements:
host:
- zlib

tests:
- script:
- test -f ${PREFIX}/lib/liblfortran_runtime.a
- node ${PREFIX}/bin/test_lfortran.js
requirements:
build:
- nodejs

about:
license: BSD-3-Clause
license_family: BSD
Expand Down
4 changes: 2 additions & 2 deletions recipes/recipes_emscripten/numpy/recipe.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
context:
version: 1.26.0
version: 1.26.4
cross_target_plattform: emscripten-wasm32
target_plattform: emscripten-wasm32

Expand All @@ -9,7 +9,7 @@ package:
source:
url: https://github.com/numpy/numpy/releases/download/v${{ version }}/numpy-${{
version }}.tar.gz
sha256: f93fc78fe8bf15afe2b8d6b6499f1c73953169fad1e9a8dd086cdff3190e7fdf
sha256: 2a02aba9ed12e4ac4eb3ea9421c420301a0c6460d9830d74a9df87efa4912010
build:
number: 0

Expand Down
Loading
Loading