Push a version tag to trigger the publish workflow:
git tag v0.1.2
git push origin v0.1.2The workflow will:
- Build the Python package
- Publish to PyPI
- Create a GitHub Release
Platform-specific binaries can be built locally using Nuitka.
pip install nuitka
pip install -e .Linux / macOS:
python -m nuitka \
--standalone \
--onefile \
--output-dir=dist \
--output-filename=tsr \
--assume-yes-for-downloads \
--remove-output \
tensors.pyWindows:
python -m nuitka `
--standalone `
--onefile `
--output-dir=dist `
--output-filename=tsr.exe `
--assume-yes-for-downloads `
--remove-output `
tensors.py| Platform | Arch | Filename |
|---|---|---|
| Linux | x64 | tsr-linux-x64 |
| Linux | arm64 | tsr-linux-arm64 |
| macOS | arm64 | tsr-macos-arm64 |
| macOS | x64 | tsr-macos-x64 |
| Windows | x64 | tsr-windows-x64.exe |
To sign and notarize macOS binaries:
# Sign the binary
codesign --force --options runtime --sign "Developer ID Application" dist/tsr
# Create zip for notarization
ditto -c -k --keepParent dist/tsr dist/tsr.zip
# Submit for notarization
xcrun notarytool submit dist/tsr.zip \
--apple-id "$APPLE_ID" \
--password "$APPLE_ID_PASSWORD" \
--team-id "$APPLE_TEAM_ID" \
--wait
# Staple the notarization ticket
xcrun stapler staple dist/tsrRequired environment variables:
APPLE_ID- Apple Developer account emailAPPLE_ID_PASSWORD- App-specific passwordAPPLE_TEAM_ID- Developer Team ID