[packages/python3-curl-cffi] Lets try generic fix

arekm arekm at pld-linux.org
Mon Jun 8 00:17:29 CEST 2026


commit 683dbbec0acac9e6fd9d3e83d76640d51272fce7
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sun Jun 7 14:22:31 2026 +0200

    Lets try generic fix

 curl-cffi-system-libcurl.patch | 27 +++++++++++++++------------
 python3-curl-cffi.spec         |  2 --
 x32.patch                      | 19 -------------------
 3 files changed, 15 insertions(+), 33 deletions(-)
---
diff --git a/python3-curl-cffi.spec b/python3-curl-cffi.spec
index e5db335..2887154 100644
--- a/python3-curl-cffi.spec
+++ b/python3-curl-cffi.spec
@@ -15,7 +15,6 @@ Group:		Libraries/Python
 Source0:	https://files.pythonhosted.org/packages/source/c/%{module}/%{module}-%{version}.tar.gz
 # Source0-md5:	108ff8b07bacb0c292471f31025b4c7b
 Patch0:		curl-cffi-system-libcurl.patch
-Patch1:		x32.patch
 URL:		https://github.com/lexiforest/curl_cffi
 BuildRequires:	curl-impersonate-devel
 BuildRequires:	python3-build
@@ -49,7 +48,6 @@ użytku synchronicznego oraz asynchronicznego.
 %prep
 %setup -q -n %{module}-%{version}
 %patch -P0 -p1
-%patch -P1 -p1
 
 %build
 export CURL_IMPERSONATE_LIBDIR="%{_libdir}"
diff --git a/curl-cffi-system-libcurl.patch b/curl-cffi-system-libcurl.patch
index c1869d1..abbdd41 100644
--- a/curl-cffi-system-libcurl.patch
+++ b/curl-cffi-system-libcurl.patch
@@ -1,21 +1,24 @@
---- a/scripts/build.py
-+++ b/scripts/build.py
-@@ -65,6 +65,14 @@
+--- a/scripts/build.py	2026-06-07 14:03:42.913871277 +0200
++++ b/scripts/build.py	2026-06-07 14:04:29.375811980 +0200
+@@ -64,7 +64,16 @@
+     raise Exception(f"Unsupported arch: {uname}")
  
  
- arch = detect_arch()
-+
+-arch = detect_arch()
 +# PLD: link against the system libcurl-impersonate shared library. The bundled
-+# logic downloads a prebuilt static archive, which is impossible in the
-+# network-isolated build; curl-impersonate is packaged separately.
-+arch["link_type"] = "dynamic"
-+arch["libdir"] = os.environ["CURL_IMPERSONATE_LIBDIR"]
-+arch["obj_name"] = "libcurl-impersonate.so"
-+
++# detect_arch()/download logic only selects a prebuilt archive to fetch, which
++# is impossible in the network-isolated build and raises on arches with no
++# upstream prebuilt (e.g. x32); curl-impersonate is packaged separately.
++arch = {
++    "system": "Linux",
++    "link_type": "dynamic",
++    "libdir": os.environ["CURL_IMPERSONATE_LIBDIR"],
++    "obj_name": "libcurl-impersonate.so",
++}
  link_type = arch.get("link_type")
  libdir = Path(arch["libdir"])
  is_static = link_type == "static"
-@@ -178,6 +186,7 @@
+@@ -178,6 +187,7 @@
      extra_objects=[],  # linked via extra_link_args
      source_extension=".c",
      include_dirs=[
diff --git a/x32.patch b/x32.patch
deleted file mode 100644
index 7bb8564..0000000
--- a/x32.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- curl_cffi-0.15.0/libs.json~	2026-04-03 12:21:13.000000000 +0200
-+++ curl_cffi-0.15.0/libs.json	2026-06-07 14:07:06.562190396 +0200
-@@ -60,6 +60,16 @@
-     {
-         "system": "Linux",
-         "machine": "x86_64",
-+        "pointer_size": 32,
-+        "sysname": "linux",
-+        "link_type": "static",
-+        "libc": "gnu",
-+        "obj_name": "libcurl-impersonate.a",
-+        "arch": "x86_64"
-+    },
-+    {
-+        "system": "Linux",
-+        "machine": "x86_64",
-         "pointer_size": 64,
-         "sysname": "linux",
-         "link_type": "static",
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-curl-cffi.git/commitdiff/683dbbec0acac9e6fd9d3e83d76640d51272fce7



More information about the pld-cvs-commit mailing list