thisisthepy
Ecosystem생태계 / Projects프로젝트 / pypackpack
Build and ship

pypackpack

Build once for every platform: the Python half of an app, resolved and compiled for each target. Command: ppp.한 번 빌드해 모든 플랫폼으로: 앱의 Python 절반을 타깃마다 해석하고 컴파일합니다. 명령은 ppp입니다.

GitHub · Guide · PyPI

Overview개요

pypackpack, the ppp command, builds the Python half of an app once for every platform. It pins and fetches a verified Python, resolves dependencies separately for each target, compiles native extensions, and bundles the result as resources an app carries.

ppp 명령인 pypackpack은 앱의 Python 절반을 모든 플랫폼용으로 한 번에 빌드합니다. 검증된 Python을 고정해 가져오고, 타깃마다 따로 의존성을 해석하고, 네이티브 확장을 컴파일하고, 결과를 앱이 품는 리소스로 묶습니다.

The problem it solves푸는 문제

Python packaging assumes the machine that installs is the machine that runs. An app breaks that: dependencies must be resolved and built for Android on arm64 and x86_64, for iOS devices and simulators, for each desktop and for the web, from one developer machine, with wheels that PyPI often does not have.

Python 패키징은 설치하는 기계가 곧 실행하는 기계라고 가정합니다. 앱은 그 가정을 깹니다. arm64와 x86_64의 Android, iOS 기기와 시뮬레이터, 데스크톱마다, 그리고 웹용으로 의존성을 개발자 기계 한 대에서 해석하고 빌드해야 하고, 그 wheel은 PyPI에 없는 경우가 많습니다.

How it works동작 방식

Pythonpinned, verified distributions per target
→
Resolveuv, one environment per target (crossenv)
→
CompileC, C++ (Meson); Rust (Cargo) next
→
Bundleresources the app carries
→
Deploylibraries to PyPI, apps to FastTrack

A package builds at one of four levels: instant (source), bytecode, native (compiled extensions) and mixed. ppp build checks dependencies, compiles and bundles in one step. It is a GraalVM native executable, so it installs without Java.

Python타깃마다 고정되고 검증된 배포판
→
해석uv, 타깃마다 환경 하나(crossenv)
→
컴파일C, C++(Meson), 다음은 Rust(Cargo)
→
번들앱이 품는 리소스
→
배포라이브러리는 PyPI, 앱은 FastTrack

패키지는 네 레벨 중 하나로 빌드합니다. instant(소스), bytecode, native(컴파일된 확장), mixed. ppp build가 의존성 확인, 컴파일, 번들을 한 단계로 합니다. GraalVM 네이티브 실행 파일이라 Java 없이 설치됩니다.

Design decisions설계 결정

  • One build verb. Bundling is an argument of build, not a separate command, as the first specification defined.
  • Deploy by kind. Libraries go to PyPI, apps to FastTrack.
  • Python 3.15 free-threaded as the baseline, with abi3t extension builds; WebAssembly in the first release.
  • Rust through Cargo, not a separate project. Building Rust crates into Python extensions is a pypackpack backend.
  • 빌드 동사 하나. 첫 사양서가 정한 대로 번들은 별도 명령이 아니라 build의 인자입니다.
  • 종류에 따라 배포. 라이브러리는 PyPI, 앱은 FastTrack.
  • 기준은 Python 3.15 free-threaded, 확장은 abi3t로 빌드하고 WebAssembly는 첫 릴리스에 포함.
  • Rust는 별도 프로젝트가 아니라 Cargo 백엔드. Rust 크레이트를 Python 확장으로 빌드하는 것은 pypackpack의 백엔드입니다.

Where it fits생태계 안의 위치

toolchain's Gradle plugin and tcl call it to install dependencies for an app. TypedPython's compiled modules and torchnative's Rust core ship through its native and mixed levels.

toolchain의 Gradle 플러그인과 tcl이 앱 의존성을 설치할 때 부릅니다. TypedPython의 컴파일 모듈과 torchnative의 Rust 코어가 native와 mixed 레벨로 배포됩니다.

Where it stands현재 상태

Working: per-target dependencies including mobile wheels, pinned Python, resource bundles, C and C++ extensions on the host. Next: cross-compiling extensions, the Cargo backend, the TypedPython slot.

동작: 모바일 wheel을 포함한 타깃별 의존성, 고정된 Python, 리소스 번들, 호스트에서의 C와 C++ 확장. 다음: 확장 크로스 컴파일, Cargo 백엔드, TypedPython 슬롯.

Future design미래 설계

  • Rust crates as first-class Python extensions on every target.
  • Free-threaded builds everywhere, with dependencies that would re-enable the GIL reported at build time.
  • WebAssembly builds of compiled dependencies for the free-threaded web interpreter.
  • 모든 타깃에서 일급 Python 확장이 되는 Rust 크레이트.
  • 모든 곳의 free-threaded 빌드, GIL을 다시 켜는 의존성은 빌드할 때 알림.
  • free-threaded 웹 인터프리터용 컴파일 의존성의 WebAssembly 빌드.

Roadmap로드맵

  1. 0.2.0: published from the release in hand.
  2. 0.3.0, 2026-11-30: the native level in practice.
  1. 0.2.0: 준비된 릴리스로 게시.
  2. 0.3.0, 2026-11-30: native 레벨 실사용.