Skip to content

Commit 5a03746

Browse files
committed
feat: bump pytauri monorepo to v0.8.0
1 parent 52f8a12 commit 5a03746

File tree

23 files changed

+2124
-1992
lines changed

23 files changed

+2124
-1992
lines changed

.github/workflows/release-standalone.yml

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# See:
22
# - <https://github.com/tauri-apps/tauri-action>
3-
# - <https://wsh032.github.io/pytauri/>
3+
# - <https://pytauri.github.io/pytauri/latest/usage/tutorial/build-standalone/>
44

55
name: 'publish (standalone)'
66

@@ -49,33 +49,41 @@ jobs:
4949

5050
- name: Rust cache
5151
uses: swatinem/rust-cache@v2
52-
52+
5353
- name: Install uv
5454
uses: astral-sh/setup-uv@v5
5555
with:
5656
enable-cache: true
57-
57+
5858
# see:
5959
# - <https://github.com/astral-sh/python-build-standalone/releases>
6060
# - <https://raw.githubusercontent.com/astral-sh/python-build-standalone/latest-release/latest-release.json>
6161
# - <https://gregoryszorc.com/docs/python-build-standalone/main/running.html#obtaining-distributions>
6262
- name: download python-build-standalone
6363
env:
6464
PYTHON_VERSION: '3.13.1' # update this by yourself
65-
DATE: '20250115' # update this by yourself
65+
TAG: '20250115' # update this by yourself
6666
TARGET: ${{ matrix.target }}
6767
run: |
68-
url="https://github.com/astral-sh/python-build-standalone/releases/download/${DATE}/cpython-${PYTHON_VERSION}+${DATE}-${TARGET}-install_only_stripped.tar.gz"
69-
mkdir -p ./pyembed
70-
curl -L $url | tar -xz -C ./pyembed
68+
url="https://github.com/astral-sh/python-build-standalone/releases/download/${TAG}/cpython-${PYTHON_VERSION}+${TAG}-${TARGET}-install_only_stripped.tar.gz"
69+
DEST_DIR="pyembed"
70+
mkdir "$DEST_DIR"
71+
curl -L "$url" | tar -xz -C "$DEST_DIR"
72+
73+
if [[ "${{ runner.os }}" == "macOS" ]]; then
74+
python_major_minor="${PYTHON_VERSION%.*}" # "3.13.7" -> "3.13"
75+
install_name_tool -id "@rpath/libpython${python_major_minor}.dylib" "$DEST_DIR/python/lib/libpython${python_major_minor}.dylib"
76+
fi
7177
7278
- name: install your project into the embedded python environment
7379
env:
7480
PYTAURI_STANDALONE: 1 # see your `setup.py`
81+
USE_CYTHON: 1 # see your `setup.py`
7582
PYTHON_PATH: ${{ matrix.platform == 'windows-latest' && './pyembed/python/python.exe' || './pyembed/python/bin/python3' }}
7683
run: |
7784
uv pip install \
7885
--exact \
86+
--compile-bytecode \
7987
--python=${PYTHON_PATH} \
8088
.
8189
@@ -89,11 +97,13 @@ jobs:
8997
- name: set build environment variables (linux)
9098
if: matrix.platform == 'ubuntu-22.04'
9199
shell: bash
92-
# `nicegui-app` is your app `productName` in `tauri.conf.json`.
100+
env:
101+
# `nicegui-app` is your app `productName` in `tauri.conf.json`
102+
PROJECT_NAME: 'nicegui-app'
93103
run: |
94104
export PYO3_PYTHON=$(realpath ./pyembed/python/bin/python3)
95105
export RUSTFLAGS=" \
96-
-C link-arg=-Wl,-rpath,\$ORIGIN/../lib/nicegui-app/lib \
106+
-C link-arg=-Wl,-rpath,\$ORIGIN/../lib/${PROJECT_NAME}/lib \
97107
-L $(realpath ./pyembed/python/lib)"
98108
99109
echo "PYO3_PYTHON=$PYO3_PYTHON" >> $GITHUB_ENV
@@ -107,7 +117,7 @@ jobs:
107117
export RUSTFLAGS=" \
108118
-C link-arg=-Wl,-rpath,@executable_path/../Resources/lib \
109119
-L $(realpath ./pyembed/python/lib)"
110-
120+
111121
echo "PYO3_PYTHON=$PYO3_PYTHON" >> $GITHUB_ENV
112122
echo "RUSTFLAGS=$RUSTFLAGS" >> $GITHUB_ENV
113123

CHANGELOG.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<!-- The content will be also use in `docs/CHANGELOG/index.md` by `pymdownx.snippets` -->
2+
<!-- Do not use any **relative link** and **GitHub-specific syntax** !-->
3+
<!-- Do not rename or move the file -->
4+
5+
# Changelog
6+
7+
All notable changes to this project will be documented in this file.
8+
9+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
10+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
11+
12+
- `Highlights` for the most attractive new features.
13+
- `BREAKING` for breaking changes.
14+
- `Added` for new features.
15+
- `Changed` for changes in existing functionality.
16+
- `Deprecated` for soon-to-be removed features.
17+
- `Removed` for now removed features.
18+
- `Fixed` for any bug fixes.
19+
- `Security` in case of vulnerabilities.
20+
- `Docs` for documentation changes.
21+
- `YANKED` for deprecated releases.
22+
- `Internal` for internal changes. Only for maintainers.
23+
24+
!!! tip
25+
This homepage is used to provide a blog-like changelog and `BREAKING CHANGE` migration guide.
26+
27+
You can expand sub-projects to view detailed changelogs.
28+
29+
<!-- Refer to: https://github.com/olivierlacan/keep-a-changelog/blob/main/CHANGELOG.md -->
30+
<!-- Refer to: https://github.com/gradio-app/gradio/blob/main/CHANGELOG.md -->
31+
<!-- Refer to: https://github.com/WSH032/fastapi-proxy-lib/blob/main/CHANGELOG.md -->
32+
33+
## [Unreleased]
34+
35+
## [0.2.0]
36+
37+
### Added
38+
39+
- Bump `pytauri` monorepo to `v0.8.0`
40+
- Use `Cython` to protect python source code
41+
- Add `scripts/` to help build standalone app
42+
43+
### Fixed
44+
45+
- Update github release CI to patch `install_name` of `libpython` on macOS to fix runtime error
46+
47+
## [0.1.0]

0 commit comments

Comments
 (0)