-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
3709041
commit c90f23c
Showing
2 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <package-name> | ||
``` | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
``` |