From c90f23cc1c466011927e9bddb2d8d7b2e7db92f5 Mon Sep 17 00:00:00 2001 From: Gyeongjae Choi Date: Sat, 10 Aug 2024 23:49:19 +0900 Subject: [PATCH] DOC Add basic documentation (#50) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- README.md | 23 +++++++++++++++++++++++ docs/MAINTAINERS.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 docs/MAINTAINERS.md diff --git a/README.md b/README.md index 1b7db24..c434b1c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,26 @@ # pyodide-recipes-mirror Collections of package recipes for Pyodide + +## Adding a new package + +> Note: Use Python 3.12 or upper to run the following commands. + +To add a new package, create a package recipe in the `packages` directory. +You can start by creating a boilerplate recipe with the following command: + +```bash +$ pip install pyodide-build +$ pyodide skeleton pypi +``` + +This will create a new directory in the `packages/` directory with the package name. +You can then edit the `meta.yaml` file in the package directory to add build scripts +and other metadata including the dependencies. + +See the [Pyodide documentation](https://pyodide.org/en/stable/development/new-packages.html) +for more information on creating package recipes. + +## Maintainer information + +See [MAINTAINERS.md](docs/MAINTAINERS.md) for information on how to maintain this repository. diff --git a/docs/MAINTAINERS.md b/docs/MAINTAINERS.md new file mode 100644 index 0000000..0cc50c6 --- /dev/null +++ b/docs/MAINTAINERS.md @@ -0,0 +1,44 @@ +# Maintainer information + +## How packages are built and tested in CI + +When a PR is opened, the GHA workflow will build submitted packages and run tests on them. +It only builds the packages that have been modified in the PR, and their dependenciesto reduce the build time. +See [tools/calc_diff.py](../tools/calc_diff.py) for the logic used to determine which packages to build. + +When the PR is merged, the GHA workflow will build all packages in the repository and run tests on them. +Optionally, you can trigger a full build by adding the `[full build]` commit message to the PR. + +The packages are always built with the tip-of-tree commit of Pyodide, fetching it directly from the CDN. +This is to ensure that the packages in this repository are always compatible with the latest version of Pyodide. + +## Releasing a new package set and updating the Pyodide distribution + +Adding a new tag to the repository will trigger a release of the package set. +It is recommended to use the calendar versioning scheme for tags, e.g. `20240810`. + +``` +git tag 20240810 +git push origin 20240810 +``` + +__(THIS IS NOT YET IMPLEMENTED)__ + +After the release is done, you can update the package set in the Pyodide distribution +by updating the `Makefile.envs` file in the pyodide/pyodide repository. + +## Building and testing packages locally + +To build and test packages locally, you need to prepare the necessary tools and dependencies. + +- compatible Python version +- pyodide-build +- emscripten +- selenium (for testing) + +if you need to use a tip-of-tree commit of Pyodide, +you can install it manually from the following url: + +``` +pyodide xbuildenv install --url http://pyodide-cache.s3-website-us-east-1.amazonaws.com/xbuildenv/dev/xbuildenv.tar.bz2 +```