public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/uv] rawhide: Preserve `PROFILE` env. var. handling in `uv` crate build script
@ 2026-09-21 17:49 Benjamin A. Beasley
0 siblings, 0 replies; only message in thread
From: Benjamin A. Beasley @ 2026-09-21 17:49 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/uv
Branch : rawhide
Commit : 09e05eea995e6d92f3b900852f39ada96cc22f60
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date : 2026-09-21T18:22:02+01:00
Stats : +41/-42 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/uv/c/09e05eea995e6d92f3b900852f39ada96cc22f60?branch=rawhide
Log:
Preserve `PROFILE` env. var. handling in `uv` crate build script
---
diff --git a/0003-Downstream-Avoid-embed-manifest-dependency-in-uv-cra.patch b/0003-Downstream-Avoid-embed-manifest-dependency-in-uv-cra.patch
new file mode 100644
index 0000000..1b82ec3
--- /dev/null
+++ b/0003-Downstream-Avoid-embed-manifest-dependency-in-uv-cra.patch
@@ -0,0 +1,35 @@
+From c48f0de2ead89b0728bba4f86f06dcc538e52a1a Mon Sep 17 00:00:00 2001
+From: "Benjamin A. Beasley" <code@musicinmybrain.net>
+Date: Mon, 21 Sep 2026 18:15:18 +0100
+Subject: [PATCH 3/3] Downstream: Avoid embed-manifest dependency in uv crate
+ build script
+
+The embed-manifest dependency only does something useful when (cross-?)
+compiling for Windows.
+---
+ crates/uv/build.rs | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/crates/uv/build.rs b/crates/uv/build.rs
+index 6169bc5cb..6f94392d1 100644
+--- a/crates/uv/build.rs
++++ b/crates/uv/build.rs
+@@ -13,12 +13,15 @@
+ //! - Standard invoker execution levels for CLI applications to disable UAC virtualization.
+ //!
+ //! See <https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests>
++#[cfg(false)] // Downstream patch: avoid packaging embed_manifest
+ use embed_manifest::manifest::{ActiveCodePage, ExecutionLevel, Setting, SupportedOS};
++#[cfg(false)] // Downstream patch: avoid packaging embed_manifest
+ use embed_manifest::{embed_manifest, empty_manifest};
+
+ use uv_static::EnvVars;
+
+ fn main() {
++ #[cfg(false)] // Downstream patch: avoid packaging embed_manifest
+ if std::env::var_os(EnvVars::CARGO_CFG_WINDOWS).is_some() {
+ let [major, minor, patch] = uv_version::version()
+ .splitn(3, '.')
+--
+2.55.0
+
diff --git a/0003-Downstream-Work-around-test-code-that-expects-PROFIL.patch b/0003-Downstream-Work-around-test-code-that-expects-PROFIL.patch
deleted file mode 100644
index 1621bbb..0000000
--- a/0003-Downstream-Work-around-test-code-that-expects-PROFIL.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 39996283168aafc2b5843ced24c567998275abc2 Mon Sep 17 00:00:00 2001
-From: "Benjamin A. Beasley" <code@musicinmybrain.net>
-Date: Mon, 21 Sep 2026 07:01:01 +0100
-Subject: [PATCH 3/3] Downstream: Work around test code that expects `PROFILE`
- to be set
-
-Make `git_version_info_expected` return `false` unconditionally.
-
-https://github.com/astral-sh/uv/issues/21884
----
- crates/uv/tests/it/version.rs | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/crates/uv/tests/it/version.rs b/crates/uv/tests/it/version.rs
-index e5b3ec7bd..80d5f3eea 100644
---- a/crates/uv/tests/it/version.rs
-+++ b/crates/uv/tests/it/version.rs
-@@ -2155,6 +2155,12 @@ fn version_get_fallback_unmanaged_short() -> Result<()> {
-
- /// Whether this build should include Git metadata in its version output.
- fn git_version_info_expected() -> bool {
-+ // Downstream patch: unconditionally return false for now. See “Test helper function
-+ // `git_version_info_expected` doesn’t compile with custom profile: `PROFILE` is unset,”
-+ // https://github.com/astral-sh/uv/issues/21884.
-+ return false;
-+
-+ #[cfg(false)]
- if env!("PROFILE") != "release" && option_env!("UV_INTERNAL__BUILD_GIT_INFO") != Some("1") {
- return false;
- }
---
-2.55.0
-
diff --git a/uv.spec b/uv.spec
index 7a2dca1..38f8274 100644
--- a/uv.spec
+++ b/uv.spec
@@ -157,11 +157,10 @@ Patch: 0001-Downstream-Always-find-the-system-wide-uv-executable.patch
# https://github.com/astral-sh/uv/pull/20834. We do not wish to upgrade
# rust-blake2 to a pre-release.
Patch: 0002-Downstream-Revert-source-code-changes-for-pre-releas.patch
-# Downstream: Work around test code that expects `PROFILE` to be set
-# Make `git_version_info_expected` return `false` unconditionally.
-# “Test helper function `git_version_info_expected` doesn’t compile with custom
-# profile: `PROFILE` is unset” https://github.com/astral-sh/uv/issues/21884
-Patch: 0003-Downstream-Work-around-test-code-that-expects-PROFIL.patch
+# Downstream: Avoid embed-manifest dependency in uv crate build script
+# The embed-manifest dependency only does something useful when (cross-?)
+# compiling for Windows.
+Patch: 0003-Downstream-Avoid-embed-manifest-dependency-in-uv-cra.patch
# Add license texts for new contents of test/ecosystem/ from PR#20068
# https://github.com/astral-sh/uv/pull/20174
@@ -442,11 +441,9 @@ rm --verbose crates/uv-trampoline-builder/trampolines/*.exe
rm --recursive --verbose crates/uv-trampoline
# Remove the dependency on embed-manifest, which applies only when (cross-?)
-# compiling for Windows.
+# compiling for Windows. This requires an accompanying source-code patch for
+# the uv crate’s build script.
tomcli set Cargo.toml del workspace.dependencies.embed-manifest
-# We may have to do something more sophisticated if this build script ever
-# starts to do anything other than just embedding a manifest on Windows.
-rm --verbose crates/uv/build.rs
tomcli set crates/uv/Cargo.toml del build-dependencies.embed-manifest
# The embed-manifest depenency is also used in uv-trampoline, which we removed.
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-21 17:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-21 17:49 [rpms/uv] rawhide: Preserve `PROFILE` env. var. handling in `uv` crate build script Benjamin A. Beasley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox