From a199e685955e72f4526556e4cf1cbc6dc0ed15e8 Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Wed, 22 Oct 2025 10:23:39 -0700 Subject: [PATCH] python3Packages.curl-cffi: 0.12.0 -> 0.13.0 https://github.com/lexiforest/curl_cffi/compare/v0.12.0...v0.13.0 --- .../python-modules/curl-cffi/default.nix | 18 +++++++++--------- .../curl-cffi/use-system-libs.patch | 6 ++---- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/pkgs/development/python-modules/curl-cffi/default.nix b/pkgs/development/python-modules/curl-cffi/default.nix index 79db35a65e95..ac1eb455aa11 100644 --- a/pkgs/development/python-modules/curl-cffi/default.nix +++ b/pkgs/development/python-modules/curl-cffi/default.nix @@ -4,6 +4,7 @@ buildPythonPackage, fetchFromGitHub, setuptools, + addBinToPathHook, curl-impersonate-chrome, cffi, certifi, @@ -24,14 +25,14 @@ buildPythonPackage rec { pname = "curl-cffi"; - version = "0.12.0"; + version = "0.14.0b2"; pyproject = true; src = fetchFromGitHub { owner = "lexiforest"; repo = "curl_cffi"; tag = "v${version}"; - hash = "sha256-VE/b1Cs/wpZlu7lOURT/QfP7DuNudD441zG603LT4LM="; + hash = "sha256-JXfqZTf26kl2P0OMAw/aTdjQaGtdyTpNnhRPlwMiZNw="; }; patches = [ ./use-system-libs.patch ]; @@ -47,13 +48,10 @@ buildPythonPackage rec { certifi ]; - env = lib.optionalAttrs stdenv.cc.isGNU { - NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types"; - }; - pythonImportsCheck = [ "curl_cffi" ]; nativeCheckInputs = [ + addBinToPathHook charset-normalizer cryptography fastapi @@ -81,6 +79,8 @@ buildPythonPackage rec { disabledTestPaths = [ # test accesses network "tests/unittest/test_smoke.py::test_async" + # Runs out of memory while testing + "tests/unittest/test_websockets.py" ]; disabledTests = [ @@ -97,11 +97,11 @@ buildPythonPackage rec { __darwinAllowLocalNetworking = true; - meta = with lib; { + meta = { changelog = "https://github.com/lexiforest/curl_cffi/releases/tag/${src.tag}"; description = "Python binding for curl-impersonate via cffi"; homepage = "https://curl-cffi.readthedocs.io"; - license = licenses.mit; - maintainers = with maintainers; [ chuangzhu ]; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ chuangzhu ]; }; } diff --git a/pkgs/development/python-modules/curl-cffi/use-system-libs.patch b/pkgs/development/python-modules/curl-cffi/use-system-libs.patch index 3dcec2e14c7c..6d30a47f0382 100644 --- a/pkgs/development/python-modules/curl-cffi/use-system-libs.patch +++ b/pkgs/development/python-modules/curl-cffi/use-system-libs.patch @@ -1,8 +1,6 @@ -diff --git a/scripts/build.py b/scripts/build.py -index b705a0d..9bfcaab 100644 --- a/scripts/build.py +++ b/scripts/build.py -@@ -105,7 +105,6 @@ def get_curl_libraries(): +@@ -141,7 +141,6 @@ def get_curl_libraries(): ffibuilder = FFI() system = platform.system() root_dir = Path(__file__).parent.parent @@ -10,7 +8,7 @@ index b705a0d..9bfcaab 100644 ffibuilder.set_source( -@@ -114,9 +113,7 @@ ffibuilder.set_source( +@@ -150,9 +149,7 @@ ffibuilder.set_source( #include "shim.h" """, # FIXME from `curl-impersonate`