Created
November 19, 2025 02:15
-
-
Save jefftriplett/8eb850d2577ae552d8401ec0ba03fb3f to your computer and use it in GitHub Desktop.
Justfile for building cookiecutter standalone executable with PyOxidizer
This file contains hidden or 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
| # Justfile for building cookiecutter standalone executable with PyOxidizer | |
| # Default recipe - show available commands | |
| [private] | |
| @default: | |
| just --list | |
| # Initialize PyOxidizer (if needed) | |
| bootstrap: | |
| uv tool run pyoxidizer init-rust-project cookiecutter-standalone | |
| # Build the standalone cookiecutter executable | |
| build: | |
| #!/usr/bin/env bash | |
| set -euxo pipefail | |
| echo "Building cookiecutter standalone executable..." | |
| export PIP_REQUIRE_VIRTUALENV=false | |
| uv tool run pyoxidizer build | |
| # Build in release mode (optimized) | |
| build-release: | |
| #!/usr/bin/env bash | |
| set -euxo pipefail | |
| echo "Building cookiecutter standalone executable (release mode)..." | |
| export PIP_REQUIRE_VIRTUALENV=false | |
| uv tool run pyoxidizer build --release | |
| @fmt: | |
| just --fmt --unstable | |
| # Run the built executable | |
| run *ARGS: | |
| ./build/*/debug/install/cookiecutter {{ ARGS }} | |
| # Run the release executable | |
| run-release *ARGS: | |
| ./build/*/release/install/cookiecutter {{ ARGS }} | |
| # Test that the built executable works | |
| test: | |
| ./build/*/debug/install/cookiecutter --version | |
| # Show PyOxidizer version | |
| version: | |
| uv tool run pyoxidizer --version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment