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

Extend docs v5 #941

Merged
merged 3 commits into from
May 13, 2024
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
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.
Loading