python3Packages.curl-cffi: 0.12.0 -> 0.14.0b2 (#454616)

This commit is contained in:
Nick Cao
2025-10-30 21:39:50 +00:00
committed by GitHub
2 changed files with 11 additions and 13 deletions
@@ -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 ];
};
}
@@ -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`