Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 21 additions & 11 deletions .github/workflows/release-standalone.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# See:
# - <https://github.com/tauri-apps/tauri-action>
# - <https://wsh032.github.io/pytauri/>
# - <https://pytauri.github.io/pytauri/latest/usage/tutorial/build-standalone/>

name: 'publish (standalone)'

Expand Down Expand Up @@ -49,33 +49,41 @@ jobs:

- name: Rust cache
uses: swatinem/rust-cache@v2

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true

# see:
# - <https://github.com/astral-sh/python-build-standalone/releases>
# - <https://raw.githubusercontent.com/astral-sh/python-build-standalone/latest-release/latest-release.json>
# - <https://gregoryszorc.com/docs/python-build-standalone/main/running.html#obtaining-distributions>
- name: download python-build-standalone
env:
PYTHON_VERSION: '3.13.1' # update this by yourself
DATE: '20250115' # update this by yourself
PYTHON_VERSION: '3.13.7' # update this by yourself
TAG: '20250902' # update this by yourself
TARGET: ${{ matrix.target }}
run: |
url="https://github.com/astral-sh/python-build-standalone/releases/download/${DATE}/cpython-${PYTHON_VERSION}+${DATE}-${TARGET}-install_only_stripped.tar.gz"
mkdir -p ./pyembed
curl -L $url | tar -xz -C ./pyembed
url="https://github.com/astral-sh/python-build-standalone/releases/download/${TAG}/cpython-${PYTHON_VERSION}+${TAG}-${TARGET}-install_only_stripped.tar.gz"
DEST_DIR="pyembed"
mkdir "$DEST_DIR"
curl -L "$url" | tar -xz -C "$DEST_DIR"

if [[ "${{ runner.os }}" == "macOS" ]]; then
python_major_minor="${PYTHON_VERSION%.*}" # "3.13.7" -> "3.13"
install_name_tool -id "@rpath/libpython${python_major_minor}.dylib" "$DEST_DIR/python/lib/libpython${python_major_minor}.dylib"
fi

- name: install your project into the embedded python environment
env:
PYTAURI_STANDALONE: 1 # see your `setup.py`
USE_CYTHON: 1 # see your `setup.py`
PYTHON_PATH: ${{ matrix.platform == 'windows-latest' && './pyembed/python/python.exe' || './pyembed/python/bin/python3' }}
run: |
uv pip install \
--exact \
--compile-bytecode \
--python=${PYTHON_PATH} \
.

Expand All @@ -89,11 +97,13 @@ jobs:
- name: set build environment variables (linux)
if: matrix.platform == 'ubuntu-22.04'
shell: bash
# `nicegui-app` is your app `productName` in `tauri.conf.json`.
env:
# `nicegui-app` is your app `productName` in `tauri.conf.json`
PROJECT_NAME: 'nicegui-app'
run: |
export PYO3_PYTHON=$(realpath ./pyembed/python/bin/python3)
export RUSTFLAGS=" \
-C link-arg=-Wl,-rpath,\$ORIGIN/../lib/nicegui-app/lib \
-C link-arg=-Wl,-rpath,\$ORIGIN/../lib/${{env.PROJECT_NAME}}/lib \
-L $(realpath ./pyembed/python/lib)"

echo "PYO3_PYTHON=$PYO3_PYTHON" >> $GITHUB_ENV
Expand All @@ -107,7 +117,7 @@ jobs:
export RUSTFLAGS=" \
-C link-arg=-Wl,-rpath,@executable_path/../Resources/lib \
-L $(realpath ./pyembed/python/lib)"

echo "PYO3_PYTHON=$PYO3_PYTHON" >> $GITHUB_ENV
echo "RUSTFLAGS=$RUSTFLAGS" >> $GITHUB_ENV

Expand Down
56 changes: 56 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<!-- The content will be also use in `docs/CHANGELOG/index.md` by `pymdownx.snippets` -->
<!-- Do not use any **relative link** and **GitHub-specific syntax** !-->
<!-- Do not rename or move the file -->

# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

- `Highlights` for the most attractive new features.
- `BREAKING` for breaking changes.
- `Added` for new features.
- `Changed` for changes in existing functionality.
- `Deprecated` for soon-to-be removed features.
- `Removed` for now removed features.
- `Fixed` for any bug fixes.
- `Security` in case of vulnerabilities.
- `Docs` for documentation changes.
- `YANKED` for deprecated releases.
- `Internal` for internal changes. Only for maintainers.

!!! tip
This homepage is used to provide a blog-like changelog and `BREAKING CHANGE` migration guide.

You can expand sub-projects to view detailed changelogs.

<!-- Refer to: https://github.com/olivierlacan/keep-a-changelog/blob/main/CHANGELOG.md -->
<!-- Refer to: https://github.com/gradio-app/gradio/blob/main/CHANGELOG.md -->
<!-- Refer to: https://github.com/WSH032/fastapi-proxy-lib/blob/main/CHANGELOG.md -->

## [Unreleased]

## [0.2.0]

### Added

- Bump `pytauri` monorepo to `v0.8.0`
- Use `Cython` to protect python source code
- Add `scripts/` to help build standalone app
- Bump `python-build-standalone` to `python 3.13.7 (20250902)`

### Changed

- Change `identifier` to `io.github.pytauri.nicegui-app`

### Removed

- Temporarily disable `appimage` bundle target on Linux

### Fixed

- Update github release CI to patch `install_name` of `libpython` on macOS to fix runtime error

## [0.1.0]
Loading
Loading