Skip to main content

English | 한국어

pypackpack

Build a Python project once. Ship it to every platform.

License: Apache-2.0 PyPI Targets Status

Guide · Getting started · Status


💡 Why

A Python project that has to run on a phone as well as a desktop needs more than installing packages: dependencies resolved for a platform that is not the one you build on, extension modules compiled for it, and the result packaged so an app can carry it. pypackpack (ppp) does that work, so you never configure a Python, a JVM or a cross-compiler by hand.

pypackpack = crossenv + compiler + bundler + codepush

It delegates instead of reimplementing: dependency resolution and installation are uv's, and pypackpack adds targets, per-target markers and per-target install directories on top.

✨ Features

  • 🎯 Targets as triples. Android, iOS, macOS, Linux and Windows, by canonical target triple (aarch64-linux-android, arm64-apple-ios, …) or a few aliases.
  • 📦 Dependencies per target. ppp <package> add numpy --target aarch64-linux-android writes the marker uv evaluates for that target, and sync installs each target's wheels into build/crossenv/<triple>/.
  • 🐍 Pinned interpreters. ppp python install 3.15t <target> fetches a CPython build for the target and checks its SHA-256 before unpacking anything.
  • 🛠️ C/C++ extensions. ppp build generates a meson.build and compiles them.
  • 🧳 Bundles. The resource payload that python-multiplatform runs, plus single, fat and patch wheels.
  • ☕ One codebase, two front doors. The pypackpack command line, and the same work as a JVM library that toolchain (the Gradle plugin) calls.

🚀 Install

uv tool install pypackpack    # puts pypackpack and ppp on PATH
ppp --version                 # from 0.3.0; on 0.2.0 use `ppp version`
pypackpack --help             # alias: ppp
uvx pypackpack --help         # or run it without installing

The wheel carries the command line as a native binary (GraalVM Native Image), one wheel per platform: macOS 11+ on Apple silicon, Linux x86_64 and aarch64 (glibc), Windows x86_64. On any other platform the installer finds no matching wheel. There is deliberately no source distribution: building needs a JDK and GraalVM, and an sdist would install the launcher without the binary.

uv is needed at run time. When none is on PATH, pypackpack downloads one into ~/.pypackpack/uv.

Build from a checkout instead
git clone -b develop https://github.com/thisisthepy/pypackpack
cd pypackpack
./gradlew :packpack:installCliDist          # JDK 21
alias ppp="$PWD/packpack/build/install/pypackpack/bin/pypackpack"
./gradlew :packpack:nativeCompile          # the native binary; needs GraalVM as JAVA_HOME

⚡ Quick start

ppp init myapp --python 3.15t
cd myapp
ppp package add packages/core
ppp target add aarch64-linux-android arm64-apple-ios

ppp core add requests                                     # every target of the package
ppp core add six --target arm64-apple-ios                 # one target only
ppp core sync --target aarch64-linux-android arm64-apple-ios \
    --python-version 3.15 --only-binary :all:          # → packages/core/build/crossenv/<triple>/

ppp build core --target aarch64-apple-darwin              # Meson; host only for now

Without --target, sync and tree use the host's target only. Put your modules in a package directory such as packages/core/src/main/core/; platform-specific code goes in src/android/, src/ios/ and so on.

☕ As a library

repositories { mavenLocal() }    // ./gradlew :packpack:publishToMavenLocal
dependencies { implementation("org.thisisthepy.python.multiplatform:packpack:0.1.0") }
BundlerInterface.create(BundleType.RESOURCE).bundle(
    BundleRequest(packageDir = packageDir, target = "aarch64-linux-android", buildLevel = "bytecode")
)

The library page of the guide covers bundling, Python installs into a directory you choose, and per-target dependency installs.

🧭 Where it fits

Repository Owns
pypackpack The work: acquiring Python, resolving dependencies, cross-compiling, bundling
toolchain The Gradle python { } block that turns into pypackpack calls
python-multiplatform The runtime: CPython embedded in Kotlin Multiplatform, which loads the resource bundle

📊 Status

An honest summary. The status page has the item-by-item contract.

Area State
Python distributions (install, list, find, uninstall; pinned SHA-256) ✅ implemented
Targets and per-target dependencies (add, remove, sync, tree) 🟡 working; part of it has no test yet
C/C++ extensions through Meson 🟡 host only, no cross-compiling yet
Bundles: resource, single, fat, patch ✅ implemented
Build levels: instant / bytecode ✅ / 🟡 (resource only)
Build levels: native / mixed 🟡 resource bundle only (macOS, Linux host, Android arm64)
deploy code single|fat to PyPI (uv publish) ✅ implemented
deploy to FastTrack and ResourceHub, code push, binary bundle ⏳ planned

📖 Documentation

  • Guide: getting started, targets and dependencies, Python distributions, build levels and bundles, the library API. English and 한국어.
  • 한국어 README

🤝 Contributing

Work here runs intent → spec → test → code: a behaviour change starts as a spec change, its test is written and seen failing, then the code makes it pass. The guide's contributing notes say how to run the tests.

📄 License

Apache-2.0 © thisisthepy

Metadata

Release files for pypackpack 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for pypackpack 0.4.0
File Actions
pypackpack-0.4.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for pypackpack-0.4.0-py3-none-win_amd64.whl
pypackpack-0.4.0-py3-none-manylinux_2_34_x86_64.whl Python 3 none Linux glibc 2.34+ x86-64 Details for pypackpack-0.4.0-py3-none-manylinux_2_34_x86_64.whl
pypackpack-0.4.0-py3-none-manylinux_2_34_aarch64.whl Python 3 none Linux glibc 2.34+ ARM64 Details for pypackpack-0.4.0-py3-none-manylinux_2_34_aarch64.whl
pypackpack-0.4.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for pypackpack-0.4.0-py3-none-macosx_11_0_arm64.whl

Total release size: 90.0 MB

Release files / pypackpack-0.4.0-py3-none-win_amd64.whl

Download URL pypackpack-0.4.0-py3-none-win_amd64.whl
Size 22.5 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
9d0b9275322abd90a099f546a85753a96cbf02477570262f12fbd809fef75655
BLAKE2b-256 checksum
How to use checksums
bd4558e99f6dfafd6a2f20463d9fb549310a8bb35a9a1a63a009604125fce011
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Release files / pypackpack-0.4.0-py3-none-manylinux_2_34_x86_64.whl

Download URL pypackpack-0.4.0-py3-none-manylinux_2_34_x86_64.whl
Size 22.7 MB
Tags Linux glibc 2.34+ x86-64 Python 3
SHA-256 checksum
How to use checksums
0ce722c703f7bf5d1949b93a05392735d943622f4c0302016496ba49c6d73699
BLAKE2b-256 checksum
How to use checksums
e4246d8740dfabc205c579a20272d4ddd90d610ef99a4154fe9320d36efecd76
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Release files / pypackpack-0.4.0-py3-none-manylinux_2_34_aarch64.whl

Download URL pypackpack-0.4.0-py3-none-manylinux_2_34_aarch64.whl
Size 22.3 MB
Tags Linux glibc 2.34+ ARM64 Python 3
SHA-256 checksum
How to use checksums
2c10e63c074716a8ab18dc4c9109dc6e0e85325d33e0ddafeb9b8ca5c60673c3
BLAKE2b-256 checksum
How to use checksums
7336299c68ed6d56695b0b13a52390904a911fc8a67027573640da1d35511852
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Release files / pypackpack-0.4.0-py3-none-macosx_11_0_arm64.whl

Download URL pypackpack-0.4.0-py3-none-macosx_11_0_arm64.whl
Size 22.4 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
dd882aaf8dd80a8c5d105aa318425104c6bfc97e772ffd73297f5810d271f46a
BLAKE2b-256 checksum
How to use checksums
18660b8f80d91ec0ab08aec931aadb203a39b0d882e93310e49b987a3d1dc7ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Security for pypackpack 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 4 files in this release have been uploaded with provenance metadata.

Select from 4 files

Attestation for pypackpack-0.4.0-py3-none-win_amd64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page