Use our Python pin for the launcher too

This commit is contained in:
Damien Elmes 2025-06-15 11:18:58 +07:00
parent 5fe17fb563
commit fb7c816124
2 changed files with 4 additions and 0 deletions

View file

@ -33,6 +33,7 @@ cp "$OUTPUT_DIR/uv" "$APP_LAUNCHER/Contents/MacOS/"
cp Info.plist "$APP_LAUNCHER/Contents/"
cp icon/Assets.car "$APP_LAUNCHER/Contents/Resources/"
cp ../pyproject.toml "$APP_LAUNCHER/Contents/Resources/"
cp ../../../.python-version "$APP_LAUNCHER/Contents/Resources/"
# Codesign
for i in "$APP_LAUNCHER/Contents/MacOS/uv" "$APP_LAUNCHER/Contents/MacOS/launcher" "$APP_LAUNCHER"; do

View file

@ -19,6 +19,8 @@ fn main() {
let resources_dir = exe_dir.parent().unwrap().join("Resources");
let dist_pyproject_path = resources_dir.join("pyproject.toml");
let user_pyproject_path = uv_install_root.join("pyproject.toml");
let dist_python_version_path = resources_dir.join(".python-version");
let user_python_version_path = uv_install_root.join(".python-version");
let pyproject_has_changed =
!user_pyproject_path.exists() || !sync_complete_marker.exists() || {
@ -58,6 +60,7 @@ fn main() {
std::fs::create_dir_all(&uv_install_root).unwrap();
if !user_pyproject_path.exists() {
std::fs::copy(&dist_pyproject_path, &user_pyproject_path).unwrap();
std::fs::copy(&dist_python_version_path, &user_python_version_path).unwrap();
}
// Remove sync marker before attempting sync