Skip to content
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
12 changes: 11 additions & 1 deletion Platforms/WASI/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ python3 Platforms/WASI build --quiet --logdir cross-build/logs
```


### Packaging
### Releasing

The `package` command is used to gather all the files necessary to make a
release and place them in an archive:
Expand All @@ -158,6 +158,16 @@ existing `dist/` directory before gathering files.

There is no command just to archive the gathered files.

To do a release build from `build` to `package`, you can use the `release`
command:

```shell
python3 Platforms/WASI release
```

Any release-specific build flags will be set via `release`. It will also run
`clean`.


### Paths

Expand Down
16 changes: 15 additions & 1 deletion Platforms/WASI/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ def main():
gather = subcommands.add_parser(
"gather", help="Gather all the files for distribution"
)
release = subcommands.add_parser(
"release", help="Build and package for a release"
)
path = subcommands.add_parser(
"path", help="Print the path to a build or distribution directory"
)
Expand All @@ -94,6 +97,7 @@ def main():
make_host,
pythoninfo_host,
build_host,
release,
):
subcommand.add_argument(
"--quiet",
Expand Down Expand Up @@ -133,7 +137,7 @@ def main():
subcommand.add_argument(
"args", nargs="*", help="Extra arguments to pass to `configure`"
)
for subcommand in build, configure_host, build_host:
for subcommand in build, configure_host, build_host, release:
subcommand.add_argument(
"--wasi-sdk",
type=pathlib.Path,
Expand All @@ -160,6 +164,7 @@ def main():
gather,
package,
path,
release,
):
subcommand.add_argument(
"--host-triple",
Expand Down Expand Up @@ -211,6 +216,15 @@ def main():
case "package":
_package.gather(context)
_package.archive(context)
case "release":
context.args = ["--without-static-libpython"]
_build.clean_contents(context)
_build.configure_build_python(context)
_build.make_build_python(context)
_build.configure_wasi_python(context)
_build.make_wasi_python(context)
_package.gather(context)
_package.archive(context)
case "path":
paths = {
"build-python": "build_python_path",
Expand Down
Loading