From: Alexander Kanavin <alex.kanavin@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Alexander Kanavin <alex@linutronix.de>
Subject: [PATCH 3/4] python3-cryptography: update a patch to upstream's better followup fix
Date: Wed, 28 Jun 2023 17:00:42 +0200 [thread overview]
Message-ID: <20230628150043.70814-3-alex@linutronix.de> (raw)
In-Reply-To: <20230628150043.70814-1-alex@linutronix.de>
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
...-directory-when-cross-compiling-9129.patch | 52 +++++++++++++++++++
...i-substitute-include-path-from-targe.patch | 29 -----------
.../python/python3-cryptography_41.0.1.bb | 2 +-
3 files changed, 53 insertions(+), 30 deletions(-)
create mode 100644 meta/recipes-devtools/python/python3-cryptography/0001-Fix-include-directory-when-cross-compiling-9129.patch
delete mode 100644 meta/recipes-devtools/python/python3-cryptography/0001-cryptography-cffi-substitute-include-path-from-targe.patch
diff --git a/meta/recipes-devtools/python/python3-cryptography/0001-Fix-include-directory-when-cross-compiling-9129.patch b/meta/recipes-devtools/python/python3-cryptography/0001-Fix-include-directory-when-cross-compiling-9129.patch
new file mode 100644
index 00000000000..d720359ded7
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-cryptography/0001-Fix-include-directory-when-cross-compiling-9129.patch
@@ -0,0 +1,52 @@
+From 2f9cd402d3293f6efe0f3ac06f17c6c14edbed86 Mon Sep 17 00:00:00 2001
+From: James Hilliard <james.hilliard1@gmail.com>
+Date: Sun, 25 Jun 2023 17:39:19 -0600
+Subject: [PATCH] Fix include directory when cross compiling (#9129)
+
+Upstream-Status: Backport [https://github.com/pyca/cryptography/pull/9129]
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ src/rust/cryptography-cffi/build.rs | 14 +++++++++++---
+ 1 file changed, 11 insertions(+), 3 deletions(-)
+
+diff --git a/src/rust/cryptography-cffi/build.rs b/src/rust/cryptography-cffi/build.rs
+index 07590ad2e..384af1ddb 100644
+--- a/src/rust/cryptography-cffi/build.rs
++++ b/src/rust/cryptography-cffi/build.rs
+@@ -47,9 +47,14 @@ fn main() {
+ )
+ .unwrap();
+ println!("cargo:rustc-cfg=python_implementation=\"{}\"", python_impl);
+- let python_include = run_python_script(
++ let python_includes = run_python_script(
+ &python,
+- "import sysconfig; print(sysconfig.get_path('include'), end='')",
++ "import os; \
++ import setuptools.dist; \
++ import setuptools.command.build_ext; \
++ b = setuptools.command.build_ext.build_ext(setuptools.dist.Distribution()); \
++ b.finalize_options(); \
++ print(os.pathsep.join(b.include_dirs), end='')",
+ )
+ .unwrap();
+ let openssl_include =
+@@ -59,12 +64,15 @@ fn main() {
+ let mut build = cc::Build::new();
+ build
+ .file(openssl_c)
+- .include(python_include)
+ .include(openssl_include)
+ .flag_if_supported("-Wconversion")
+ .flag_if_supported("-Wno-error=sign-conversion")
+ .flag_if_supported("-Wno-unused-parameter");
+
++ for python_include in env::split_paths(&python_includes) {
++ build.include(python_include);
++ }
++
+ // Enable abi3 mode if we're not using PyPy.
+ if python_impl != "PyPy" {
+ // cp37 (Python 3.7 to help our grep when we some day drop 3.7 support)
+--
+2.30.2
+
diff --git a/meta/recipes-devtools/python/python3-cryptography/0001-cryptography-cffi-substitute-include-path-from-targe.patch b/meta/recipes-devtools/python/python3-cryptography/0001-cryptography-cffi-substitute-include-path-from-targe.patch
deleted file mode 100644
index 1a60abada79..00000000000
--- a/meta/recipes-devtools/python/python3-cryptography/0001-cryptography-cffi-substitute-include-path-from-targe.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 04aac6c88152088778c6551dfa86b2fc446dc61c Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex@linutronix.de>
-Date: Mon, 19 Jun 2023 13:27:28 +0200
-Subject: [PATCH] cryptography-cffi: substitute include path from target
- sysroot
-
-Upstream-Status: Accepted [https://github.com/pyca/cryptography/pull/9105]
-
-Signed-off-by: Alexander Kanavin <alex@linutronix.de>
----
- src/rust/cryptography-cffi/build.rs | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/rust/cryptography-cffi/build.rs b/src/rust/cryptography-cffi/build.rs
-index 4a40990..08abb95 100644
---- a/src/rust/cryptography-cffi/build.rs
-+++ b/src/rust/cryptography-cffi/build.rs
-@@ -48,7 +48,7 @@ fn main() {
- println!("cargo:rustc-cfg=python_implementation=\"{}\"", python_impl);
- let python_include = run_python_script(
- &python,
-- "import sysconfig; print(sysconfig.get_path('include'), end='')",
-+ "import sysconfig; print(sysconfig.get_config_var('INCLUDEPY'), end='')",
- )
- .unwrap();
- let openssl_include =
---
-2.30.2
-
diff --git a/meta/recipes-devtools/python/python3-cryptography_41.0.1.bb b/meta/recipes-devtools/python/python3-cryptography_41.0.1.bb
index fc4f70246be..494ca233f00 100644
--- a/meta/recipes-devtools/python/python3-cryptography_41.0.1.bb
+++ b/meta/recipes-devtools/python/python3-cryptography_41.0.1.bb
@@ -11,7 +11,7 @@ LDSHARED += "-pthread"
SRC_URI[sha256sum] = "d34579085401d3f49762d2f7d6634d6b6c2ae1242202e860f4d26b046e3a1006"
SRC_URI += "file://0001-pyproject.toml-remove-benchmark-disable-option.patch \
- file://0001-cryptography-cffi-substitute-include-path-from-targe.patch \
+ file://0001-Fix-include-directory-when-cross-compiling-9129.patch \
file://check-memfree.py \
file://run-ptest \
"
--
2.30.2
next prev parent reply other threads:[~2023-06-28 15:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-28 15:00 [PATCH 1/4] gstreamer1.0-plugins-base: enable glx/opengl support Alexander Kanavin
2023-06-28 15:00 ` [PATCH 2/4] webkitgtk: update 2.38.5 -> 2.40.2 Alexander Kanavin
2023-06-28 15:00 ` Alexander Kanavin [this message]
2023-06-28 15:00 ` [PATCH 4/4] time64.inc: annotate and clean up recipe-specific Y2038 exceptions Alexander Kanavin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230628150043.70814-3-alex@linutronix.de \
--to=alex.kanavin@gmail.com \
--cc=alex@linutronix.de \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox