Skip to content

Instantly share code, notes, and snippets.

@jefftriplett
Created November 19, 2025 02:15
Show Gist options
  • Select an option

  • Save jefftriplett/8eb850d2577ae552d8401ec0ba03fb3f to your computer and use it in GitHub Desktop.

Select an option

Save jefftriplett/8eb850d2577ae552d8401ec0ba03fb3f to your computer and use it in GitHub Desktop.
Justfile for building cookiecutter standalone executable with PyOxidizer
# 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