A Windows-oriented CLI packer for Python projects using uv and the Python Embedded Runtime.
Project description
uvpacker
Windows-oriented CLI packer for Python projects using uv and the CPython Embedded Runtime; run it on Linux, macOS, or Windows to produce a self-contained win_amd64 app directory (not a single-file exe).
Overview
uvpacker builds a directory you can zip or copy as-is. It contains:
- the official CPython Embedded Runtime for Windows (64-bit)
- your project and dependencies installed for
win_amd64 - launchers derived from
[project.scripts](console) and[project.gui-scripts](no console window), as.exewhen templates are available
The goal is to run on machines without a system Python, while keeping the build declarative (standard pyproject.toml) and predictable.
Repository: touken928/uvpacker
Requirements (target projects)
The project you pack must have:
| Requirement | Notes |
|---|---|
pyproject.toml |
Standard layout |
[project.scripts] and/or [project.gui-scripts] |
At least one entry; names must not overlap between the two tables |
[build-system] |
Used to reproduce the build environment |
project.requires-python |
Must be ==X.Y.* (e.g. ==3.11.*, ==3.12.*) |
uvpacker picks the latest patch for that minor that has embed-amd64 on python.org.
Output layout
Default path: dist/<project-name>/
dist/<project-name>/
runtime/ # Windows embedded CPython
packages/ # Your wheel + dependencies (win_amd64)
<script>.exe # Console vs GUI template from scripts / gui-scripts
Launchers use runtime\python.exe and patch the embedded ._pth / .pth file so ..\packages is on sys.path — no dependency on a global Python install.
Installation & usage
Recommended: run with uvx.
# Build package output (default output: ./dist/<project-name>)
uvx uvpacker build path/to/project
# Explicit output directory
uvx uvpacker build path/to/project -o path/to/output
# Cache management
uvx uvpacker cache clear
uvpacker cache clear only removes embedded Python runtime cache (~/.cache/uvpacker/embed or $XDG_CACHE_HOME/uvpacker/embed); dependency-package cache is managed by uv.
Note: Tested with
uv0.11.x. Neweruvreleases may change CLI behavior; report or pin versions if something breaks.
Packing pipeline
- Read and validate
pyproject.toml(scripts,gui-scripts,build-system,requires-python) - Resolve Python version and obtain
python-<version>-embed-amd64.zip(downloaded once, then cached under~/.cache/uvpacker/embed, or$XDG_CACHE_HOME/uvpacker/embedif set) - Build a wheel for the target project
uv pip installintopackages/with--python-platform x86_64-pc-windows-msvc- Patch embedded runtime
_pthto include..\packages - For your package tree: compile
.py→.pycwith the target minor viauv run, then remove.py(light obfuscation; not encryption) - Generate
.exelaunchers (console.exe/gui.exetemplates, or skip if missing)
Cross-platform builds
Dependency resolution targets win_amd64, so you can pack from a non-Windows host when:
- the project is pure Python, or
- any native extensions are already buildable as Windows wheels
uvpacker does not cross-compile your own C extensions; use Windows for those projects.
Examples
| Path | What it shows |
|---|---|
example/web-demo |
FastAPI + importlib.resources for static assets |
example/qt-demo |
PySide6 GUI via generated launcher |
Roadmap (ideas)
- Hide or trim
packages/binshims that should not be end-user facing - Stronger wheel checks and download caching
- Clearer errors and verbose diagnostics
License
GNU General Public License v3.0 — see LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file uvpacker-0.4.0.tar.gz.
File metadata
- Download URL: uvpacker-0.4.0.tar.gz
- Upload date:
- Size: 52.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4fe475a331378662cf8702aaecadd54fc4ed9a2ef392a830007227c900fd97cf
|
|
| MD5 |
7f2bb57bd9a2424386d0d51b805b7bad
|
|
| BLAKE2b-256 |
6b5a825cb1decf276622f718212e4b0a1eb4f0a22caa8712ffe970d618d94855
|
Provenance
The following attestation bundles were made for uvpacker-0.4.0.tar.gz:
Publisher:
publish.yml on touken928/uvpacker
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
uvpacker-0.4.0.tar.gz -
Subject digest:
4fe475a331378662cf8702aaecadd54fc4ed9a2ef392a830007227c900fd97cf - Sigstore transparency entry: 1217120503
- Sigstore integration time:
-
Permalink:
touken928/uvpacker@a143009df4d9cebd7c01775113092173a6eaa14d -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/touken928
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a143009df4d9cebd7c01775113092173a6eaa14d -
Trigger Event:
push
-
Statement type:
File details
Details for the file uvpacker-0.4.0-py3-none-any.whl.
File metadata
- Download URL: uvpacker-0.4.0-py3-none-any.whl
- Upload date:
- Size: 51.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
443cbbdf964adca10c17bbb35e158cc8e2b6d32f98d1a70660124852076f9802
|
|
| MD5 |
eba8ab2f08aea2f72806095f5f85937b
|
|
| BLAKE2b-256 |
80921ee124a615ad26f979415f42d0b8cbfa087b0fa73af111fc16225c1daa25
|
Provenance
The following attestation bundles were made for uvpacker-0.4.0-py3-none-any.whl:
Publisher:
publish.yml on touken928/uvpacker
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
uvpacker-0.4.0-py3-none-any.whl -
Subject digest:
443cbbdf964adca10c17bbb35e158cc8e2b6d32f98d1a70660124852076f9802 - Sigstore transparency entry: 1217120523
- Sigstore integration time:
-
Permalink:
touken928/uvpacker@a143009df4d9cebd7c01775113092173a6eaa14d -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/touken928
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a143009df4d9cebd7c01775113092173a6eaa14d -
Trigger Event:
push
-
Statement type: