diff --git a/docs/development/recipe_format.md b/docs/development/recipe_format.md new file mode 100644 index 000000000..54778123c --- /dev/null +++ b/docs/development/recipe_format.md @@ -0,0 +1,69 @@ +# Recipe format + + +Typically, a recipe is directory with a `recipe.yaml` file that contains the information needed to build a package +and optionally an additonal `build.sh` script that is executed during the build process. + +## recipe.yaml + +The recipe.yaml file may look like this: +```yaml +context: + version: "2022.1.18" # the version of the package + name: "regex" # the name of the package + +package: + name: ${{ name }} # use the context variables defined above + version: ${{ version }} # use the context variables defined above + +source: + # the url is formed from a "template" with the context variables + url: https://pypi.io/packages/source/r/${{name}}/${{name}}-${{ version }}.tar.gz + sha256: 97f32dc03a8054a4c4a5ab5d761ed4861e828b2c200febd4e46857069a483916 + +build: + number: 0 + +requirements: + build: + - python + - cross-python_${{target_platform}} + - ${{ compiler("c") }} + - pip + host: + - python + run: + - python + +# to test a python package, we need to use the pytester package. +# this will run pytests in a headless browser +tests: + - script: pytester + requirements: + build: + - pytester + run: + - pytester-run + files: + recipe: + - test_regex.py + + +about: + homepage: https://bitbucket.org/mrabarnett/mrab-regex + license: Apache-2.0 + summary: Alternative regular expression module, to replace re + +extra: + recipe-maintainers: + - DerThorsten + +``` +## build.sh +The bash script may look like this: +```bash +#!/bin/bash + +export LDFLAGS="-s MODULARIZE=1 -s LINKABLE=1 -s EXPORT_ALL=1 -s WASM=1 -std=c++14 -s SIDE_MODULE=1 -sWASM_BIGINT" +${PYTHON} -m pip install . +``` \ No newline at end of file diff --git a/docs/hosting.md b/docs/hosting.md new file mode 100644 index 000000000..f02691209 --- /dev/null +++ b/docs/hosting.md @@ -0,0 +1,15 @@ +# Quetz Server + +Emscripten forge packages are hosted as +as a the [emscripten-forge](https://beta.mamba.pm/channels/emscripten-forge) channel on a [Quetz](https://quetz.io/) server. +on a [Quetz](https://quetz.io/) server. + +!!! note + To use emscripten-forge conda packages, you need to add the `emscripten-forge` channel to your conda configuration or use the `--channel` flag when installing packages, ie: + + ```bash + micromamba create -n myenv --platform=emscripten-wasm32 \ + -c https://repo.mamba.pm/emscripten-forge \ + -c conda-forge \ + python numpy + ``` \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index 1adbb7387..7b23d36c9 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,80 +1,24 @@ # Introduction - Emscripten-forge is a GitHub [organization](https://github.com/emscripten-forge)/[repository](https://github.com/emscripten-forge/recipes) containing [conda recipes](https://github.com/emscripten-forge/recipes) for the `emscripten-wasm32` platform. Conda-forge does not (yet) support the `emscripten-wasm32` platform. `emscripten-forge` fills this gap by providing a channel with conda packages for the `emscripten-wasm32` platform. - - The recipe repository not only stores the recipe, but also builds and upload the recipe with github actions to the `emscripten-forge` channel on [quetz](https://beta.mamba.pm/channels/emscripten-forge) -## Recipe format - -Typically, a recipe is directory with a `recipe.yaml` file that contains the information needed to build a package -and optionally an additonal `build.sh` script that is executed during the build process. - -#### recipe.yaml - -The recipe.yaml file may look like this: -```yaml -context: - version: "2022.1.18" # the version of the package - name: "regex" # the name of the package - -package: - name: ${{ name }} # use the context variables defined above - version: ${{ version }} # use the context variables defined above - -source: - # the url is formed from a "template" with the context variables - url: https://pypi.io/packages/source/r/${{name}}/${{name}}-${{ version }}.tar.gz - sha256: 97f32dc03a8054a4c4a5ab5d761ed4861e828b2c200febd4e46857069a483916 - -build: - number: 0 - -requirements: - build: - - python - - cross-python_${{target_platform}} - - ${{ compiler("c") }} - - pip - host: - - python - run: - - python - -# to test a python package, we need to use the pytester package. -# this will run pytests in a headless browser -tests: - - script: pytester - requirements: - build: - - pytester - run: - - pytester-run - files: - recipe: - - test_regex.py - +# Table of Contents +**Development**: -about: - homepage: https://bitbucket.org/mrabarnett/mrab-regex - license: Apache-2.0 - summary: Alternative regular expression module, to replace re + * [Adding_packages](development/adding_packages) + * [Recipe format](development/recipe_format) + * [Local Builds](development/local_builds) + +**Usage**: -extra: - recipe-maintainers: - - DerThorsten + * [Adding_packages](development/adding_packages) + * [Adding_packages](development/local_builds) -``` -### build.sh -The bash script may look like this: -```bash -#!/bin/bash +**Project**: -export LDFLAGS="-s MODULARIZE=1 -s LINKABLE=1 -s EXPORT_ALL=1 -s WASM=1 -std=c++14 -s SIDE_MODULE=1 -sWASM_BIGINT" -${PYTHON} -m pip install . -``` \ No newline at end of file + * [Related Projects](project/related_projects) diff --git a/docs/project/related_projects.md b/docs/project/related_projects.md index 77e949234..8517c49c9 100644 --- a/docs/project/related_projects.md +++ b/docs/project/related_projects.md @@ -31,4 +31,7 @@ and packages from emscripten-forge in a jupyterlite environment. ## pixi [pixi](https://pixi.sh/latest/) is a package management tool for developers. It allows the developer to install libraries and applications in a reproducible way. -Emscripten-forge uses pixi to setup the environment for building the packages. \ No newline at end of file +Emscripten-forge uses pixi to setup the environment for building the packages. + +## Quetz +Quetz is a [open source ](https://beta.mamba.pm/channels/emscripten-forge)conda package server. It is used to host the[ emscripten-forge](https://beta.mamba.pm/channels/emscripten-forge) packages.