Getting started시작하기

From a checkout to a package with per-target dependencies and a first build.

체크아웃에서 타깃별 의존성을 가진 패키지와 첫 빌드까지.

1. Prerequisites1. 준비물

Need필요한 것Why이유
JDK 21JDK 21Both modules build with jvmToolchain(21); the wrapper brings Gradle 9.4.1.두 모듈 모두 jvmToolchain(21) 로 빌드합니다. Gradle 9.4.1 은 래퍼가 받아옵니다.
uvuvEvery dependency operation runs it. When none is found, pypackpack downloads one into ~/.pypackpack/uv.모든 의존성 작업이 이것을 실행합니다. 찾지 못하면 pypackpack 이 ~/.pypackpack/uv 에 내려받습니다.
Network access네트워크uv, wheels, Python distributions and, for ppp build, meson and ninja (installed with uv tool install when missing).uv, 휠, Python 배포판, 그리고 ppp build 에 쓰이는 meson, ninja (없으면 uv tool install 로 설치).
GraalVM (optional)GraalVM (선택)Only for the single native pypackpack binary.단일 네이티브 pypackpack 바이너리를 만들 때만.

2. Build the command line2. 명령줄 도구 빌드

There is no released binary yet. Build the launcher from a checkout:

아직 배포된 바이너리가 없습니다. 체크아웃에서 런처를 빌드하세요.

git clone -b develop https://github.com/thisisthepy/pypackpack
cd pypackpack
./gradlew :packpack:installCliDist
alias ppp="$PWD/packpack/build/install/pypackpack/bin/pypackpack"
ppp --help
ppp version          # pypackpack and uv versions

For one self-contained binary, ./gradlew :packpack:nativeCompile writes packpack/build/native/nativeCompile/pypackpack with GraalVM Native Image (GraalVM as JAVA_HOME). The PyPI wheels carry the same binary.

실행 파일 하나로 쓰려면 ./gradlew :packpack:nativeCompile 가 GraalVM Native Image 로 packpack/build/native/nativeCompile/pypackpack 를 만듭니다 (JAVA_HOME 이 GraalVM 이어야 함). PyPI 휠에 든 것과 같은 바이너리입니다.

3. A project and a package3. 프로젝트와 패키지

ppp init myapp --python 3.13       # uv init --bare, plus .gitignore, README.md, LICENSE
cd myapp
ppp package add packages/core      # a uv workspace member with ppp's scaffolding
ppp target add aarch64-linux-android arm64-apple-ios
myapp/
├── pyproject.toml                 # [tool.ppp.dependencies].platforms, [tool.uv.workspace].members
└── packages/core/
    ├── pyproject.toml
    ├── src/main/__init__.py       # platform-common code
    ├── src/android/__init__.py    # one directory per target family, from `target add`
    ├── src/ios/__init__.py
    ├── src/test/test_import.py
    └── build/{crossenv,packpack}/

Put your modules in a package directory such as src/main/core/. With only the scaffold's src/main/__init__.py, ppp build falls back to scanning src/ and installs main, android and ios as top-level packages.

모듈은 src/main/core/ 같은 패키지 디렉터리에 두세요. 스캐폴드의 src/main/__init__.py 만 있으면 ppp build 가 src/ 를 대신 훑어 main, android, ios 를 최상위 패키지로 설치합니다.

4. Dependencies per target4. 타깃별 의존성

ppp core add requests                         # one marker per target in the package's platforms
ppp core add six --target arm64-apple-ios     # only for that target
ppp core sync --target aarch64-linux-android arm64-apple-ios   # → packages/core/build/crossenv/<triple>/
ppp core tree --target arm64-apple-ios

5. Build5. 빌드

ppp build core --target aarch64-apple-darwin
# → packages/core/dist/aarch64-apple-darwin/debug/instant/   (meson install --destdir)

ppp build generates a meson.build, compiles C/C++ extensions and installs the package for the host. It does not cross-compile and does not bundle yet; bundling is a library call today. Next: Projects, targets & dependencies.

ppp build 는 meson.build 를 생성하고, C/C++ 확장을 컴파일하고, 호스트용으로 패키지를 설치합니다. 아직 크로스 컴파일과 번들링은 하지 않으며, 번들링은 지금은 라이브러리 호출입니다. 다음: 프로젝트, 타깃, 의존성.