Add Make target for PyPI publishing
This commit is contained in:
parent
7ccab61a1b
commit
fb718af154
3 changed files with 30 additions and 1 deletions
20
Makefile
20
Makefile
|
|
@ -11,8 +11,11 @@ RUNTIME_MATERIALIZED_DIR ?= build/runtime_sources
|
|||
RUNTIME_OCI_LAYOUT_DIR ?= build/oci_layouts
|
||||
RUNTIME_ENVIRONMENT ?= debian:12-base
|
||||
RUNTIME_ENVIRONMENTS ?= debian:12-base debian:12 debian:12-build
|
||||
PYPI_DIST_DIR ?= dist
|
||||
TWINE_USERNAME ?= __token__
|
||||
PYPI_REPOSITORY_URL ?=
|
||||
|
||||
.PHONY: help setup lint format typecheck test check dist-check demo network-demo doctor ollama ollama-demo run-server install-hooks runtime-bundle runtime-binaries runtime-kernel runtime-rootfs runtime-agent runtime-validate runtime-manifest runtime-sync runtime-clean runtime-fetch-binaries runtime-build-kernel-real runtime-build-rootfs-real runtime-materialize runtime-export-environment-oci runtime-export-official-environments-oci runtime-publish-environment-oci runtime-publish-official-environments-oci runtime-boot-check runtime-network-check
|
||||
.PHONY: help setup lint format typecheck test check dist-check pypi-publish demo network-demo doctor ollama ollama-demo run-server install-hooks runtime-bundle runtime-binaries runtime-kernel runtime-rootfs runtime-agent runtime-validate runtime-manifest runtime-sync runtime-clean runtime-fetch-binaries runtime-build-kernel-real runtime-build-rootfs-real runtime-materialize runtime-export-environment-oci runtime-export-official-environments-oci runtime-publish-environment-oci runtime-publish-official-environments-oci runtime-boot-check runtime-network-check
|
||||
|
||||
help:
|
||||
@printf '%s\n' \
|
||||
|
|
@ -25,6 +28,7 @@ help:
|
|||
' test Run pytest' \
|
||||
' check Run lint, typecheck, and tests' \
|
||||
' dist-check Smoke-test the installed pyro CLI and environment UX' \
|
||||
' pypi-publish Build, validate, and upload the package to PyPI' \
|
||||
' demo Run the deterministic VM demo' \
|
||||
' network-demo Run the deterministic VM demo with guest networking enabled' \
|
||||
' doctor Show runtime and host diagnostics' \
|
||||
|
|
@ -77,6 +81,20 @@ dist-check:
|
|||
.venv/bin/pyro env inspect debian:12 >/dev/null
|
||||
.venv/bin/pyro doctor >/dev/null
|
||||
|
||||
pypi-publish:
|
||||
@if [ -z "$$TWINE_PASSWORD" ]; then \
|
||||
printf '%s\n' 'TWINE_PASSWORD is required; use a PyPI API token.' >&2; \
|
||||
exit 1; \
|
||||
fi
|
||||
rm -rf "$(PYPI_DIST_DIR)"
|
||||
uv build --out-dir "$(PYPI_DIST_DIR)"
|
||||
uvx --from twine twine check "$(PYPI_DIST_DIR)"/*
|
||||
@if [ -n "$(PYPI_REPOSITORY_URL)" ]; then \
|
||||
TWINE_USERNAME="$(TWINE_USERNAME)" uvx --from twine twine upload --repository-url "$(PYPI_REPOSITORY_URL)" "$(PYPI_DIST_DIR)"/*; \
|
||||
else \
|
||||
TWINE_USERNAME="$(TWINE_USERNAME)" uvx --from twine twine upload "$(PYPI_DIST_DIR)"/*; \
|
||||
fi
|
||||
|
||||
demo:
|
||||
uv run pyro demo
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue