diff --git a/qt/launcher/mac/build.sh b/qt/launcher/mac/build.sh index 260af5c6d..8a60d488d 100755 --- a/qt/launcher/mac/build.sh +++ b/qt/launcher/mac/build.sh @@ -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 diff --git a/qt/launcher/src/main.rs b/qt/launcher/src/main.rs index 2a09f722e..59f4a7e30 100644 --- a/qt/launcher/src/main.rs +++ b/qt/launcher/src/main.rs @@ -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