A multiplatform solution to distribute python project.
pypackpack = crossenv + compiler(nuitka, pyinstaller) + bundler(js webpack) + codepush(js expo)
- Android (arm64, x86_64)
- iOS (arm64)
- masOS (universal)
- Linux (x86_64)
- Windows (x86_64)
- WASM -
Note
** Since Xcode only runs on macOS, you need macOS to build this repo for iOS.
- GraalVM 22+ with Native Image support
- Gradle 8.5+ (included via wrapper)
- RC version
git clone https://github.com/thisisthepy/pypackpack PyPackPack- dev version
git clone https://github.com/thisisthepy/pypackpack@develop PyPackPackDownload and install GraalVM from https://www.graalvm.org/
Set environment variables:
export GRAALVM_HOME=/path/to/graalvm
export PATH=$GRAALVM_HOME/bin:$PATHInstall Native Image component:
gu install native-imageStandard Gradle Build:
./gradlew buildBuild Native Executable:
./gradlew buildNativeExecutablePackage Native Distribution:
./gradlew packageNativeQuick Build Script (Unix):
chmod +x scripts/build-native.sh
./scripts/build-native.shQuick Build Script (Windows):
scripts\build-native.batbuild- Standard build with testsnativeCompile- Compile to native executablebuildNativeExecutable- Build and copy native executablepackageNative- Create distribution packagebuildAllPlatforms- Cross-platform build (requires Docker)
In your project build.gradle.kts
implementation("io.github.thisisthepy:python-multiplatform:0.0.1")
In your project settings.gradle.kts
pluginManagement {
repositories {
google {
mavenContent {
includeGroupAndSubgroups("androidx")
includeGroupAndSubgroups("com.android")
includeGroupAndSubgroups("com.google")
}
}
mavenCentral()
gradlePluginPortal()
maven {
setUrl("https://jitpack.io") // Add this line!
}
}
}
In your project build.gradle.kts
implementation("com.github.thisisthepy:python-multiplatform-mobile:0.0.1")
Tip
Some tips
In your main method,
Important
Somethig important