summaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python/python3-pydantic-core/0001-dont-embed-RUSTFLAGS-in-final-binary-1396.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2024-10-28 21:23:29 -0700
committerKhem Raj <raj.khem@gmail.com>2024-10-28 21:25:23 -0700
commit51baa456a2b38a48c0a784361300899a24d45d15 (patch)
tree974d4424389a4fcd616e49d6be48e397c17a6967 /meta-python/recipes-devtools/python/python3-pydantic-core/0001-dont-embed-RUSTFLAGS-in-final-binary-1396.patch
parente17b039f92e6819ea98abbaeada413665697c6a9 (diff)
downloadmeta-openembedded-51baa456a2b38a48c0a784361300899a24d45d15.tar.gz
python3-pydantic-core: Upgrade to 2.25.0
Needed for py 3.13 support in pydantic 2.9 recipe Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-pydantic-core/0001-dont-embed-RUSTFLAGS-in-final-binary-1396.patch')
-rw-r--r--meta-python/recipes-devtools/python/python3-pydantic-core/0001-dont-embed-RUSTFLAGS-in-final-binary-1396.patch58
1 files changed, 0 insertions, 58 deletions
diff --git a/meta-python/recipes-devtools/python/python3-pydantic-core/0001-dont-embed-RUSTFLAGS-in-final-binary-1396.patch b/meta-python/recipes-devtools/python/python3-pydantic-core/0001-dont-embed-RUSTFLAGS-in-final-binary-1396.patch
deleted file mode 100644
index 5d732d5bee..0000000000
--- a/meta-python/recipes-devtools/python/python3-pydantic-core/0001-dont-embed-RUSTFLAGS-in-final-binary-1396.patch
+++ /dev/null
@@ -1,58 +0,0 @@
1From e07c41b3bad75948201a2201387225694c2fb501 Mon Sep 17 00:00:00 2001
2From: Boxy <rust@boxyuwu.dev>
3Date: Wed, 7 Aug 2024 17:11:02 +0100
4Subject: [PATCH] dont embed `RUSTFLAGS` in final binary (#1396)
5
6Upstream-Status: Backport [https://github.com/pydantic/pydantic-core/pull/1396]
7
8See discussion upstream in:
9https://github.com/pydantic/pydantic-core/issues/1365
10
11Backport fix from:
12https://github.com/pydantic/pydantic-core/commit/e07c41b3bad75948201a2201387225694c2fb501
13
14Signed-off-by: Tim Orling <tim.orling@konsulko.com>
15---
16 build.rs | 9 +++++++++
17 src/lib.rs | 5 ++++-
18 2 files changed, 13 insertions(+), 1 deletion(-)
19
20diff --git a/build.rs b/build.rs
21index d1093c74..f8f66901 100644
22--- a/build.rs
23+++ b/build.rs
24@@ -36,6 +36,15 @@ fn main() {
25 println!("cargo:rustc-cfg=has_coverage_attribute");
26 }
27 println!("cargo:rustc-check-cfg=cfg(has_coverage_attribute)");
28+
29+ if std::env::var("RUSTFLAGS")
30+ .unwrap_or_default()
31+ .contains("-Cprofile-use=")
32+ {
33+ println!("cargo:rustc-cfg=specified_profile_use");
34+ }
35+ println!("cargo:rustc-check-cfg=cfg(specified_profile_use)");
36+
37 generate_self_schema();
38 println!("cargo:rustc-env=PROFILE={}", std::env::var("PROFILE").unwrap());
39 }
40diff --git a/src/lib.rs b/src/lib.rs
41index eb598424..eb486da6 100644
42--- a/src/lib.rs
43+++ b/src/lib.rs
44@@ -98,7 +98,10 @@ pub fn build_info() -> String {
45 format!(
46 "profile={} pgo={}",
47 env!("PROFILE"),
48- option_env!("RUSTFLAGS").unwrap_or("").contains("-Cprofile-use="),
49+ // We use a `cfg!` here not `env!`/`option_env!` as those would
50+ // embed `RUSTFLAGS` into the generated binary which causes problems
51+ // with reproducable builds.
52+ cfg!(specified_profile_use),
53 )
54 }
55
56--
572.46.0
58