Skip to content

Commit

Permalink
Extend docs v5 (#941)
Browse files Browse the repository at this point in the history
* extended docs

* extended docs

* docs
  • Loading branch information
DerThorsten authored May 13, 2024
1 parent 275464c commit 0208ced
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 68 deletions.
69 changes: 69 additions & 0 deletions docs/development/recipe_format.md
Original file line number Diff line number Diff line change
@@ -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 .
```
15 changes: 15 additions & 0 deletions docs/hosting.md
Original file line number Diff line number Diff line change
@@ -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
```
78 changes: 11 additions & 67 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,80 +1,24 @@
# Introduction

<!-- conda-forge does not (yet) support emscripten was a plattform. emscripten forge fills this gap -->

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 .
```
* [Related Projects](project/related_projects)
5 changes: 4 additions & 1 deletion docs/project/related_projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
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.

0 comments on commit 0208ced

Please sign in to comment.