mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 12:15:34 +03:00
python3Packages.curl-cffi: 0.10.0 -> 0.11.1 (#413492)
This commit is contained in:
commit
0179724f29
1 changed files with 57 additions and 4 deletions
|
@ -7,19 +7,31 @@
|
|||
curl-impersonate-chrome,
|
||||
cffi,
|
||||
certifi,
|
||||
typing-extensions,
|
||||
charset-normalizer,
|
||||
cryptography,
|
||||
fastapi,
|
||||
httpx,
|
||||
proxy-py,
|
||||
pytest-asyncio,
|
||||
pytest-trio,
|
||||
pytestCheckHook,
|
||||
python-multipart,
|
||||
trustme,
|
||||
uvicorn,
|
||||
websockets,
|
||||
writableTmpDirAsHomeHook,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "curl-cffi";
|
||||
version = "0.10.0";
|
||||
version = "0.11.1";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "lexiforest";
|
||||
repo = "curl_cffi";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-h7PPlxjIVT6T9x7gKBSifuWl8wzUNDwRcaUifUS0icM=";
|
||||
hash = "sha256-hpsAga5741oTBT87Rt7XTyxxu7SQ5Usw+2VVr54oA8k=";
|
||||
};
|
||||
|
||||
patches = [ ./use-system-libs.patch ];
|
||||
|
@ -33,7 +45,6 @@ buildPythonPackage rec {
|
|||
dependencies = [
|
||||
cffi
|
||||
certifi
|
||||
typing-extensions
|
||||
];
|
||||
|
||||
env = lib.optionalAttrs stdenv.cc.isGNU {
|
||||
|
@ -42,7 +53,49 @@ buildPythonPackage rec {
|
|||
|
||||
pythonImportsCheck = [ "curl_cffi" ];
|
||||
|
||||
nativeCheckInputs = [
|
||||
charset-normalizer
|
||||
cryptography
|
||||
fastapi
|
||||
httpx
|
||||
proxy-py
|
||||
pytest-asyncio
|
||||
pytest-trio
|
||||
pytestCheckHook
|
||||
python-multipart
|
||||
trustme
|
||||
uvicorn
|
||||
websockets
|
||||
writableTmpDirAsHomeHook
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
# import from $out
|
||||
rm -r curl_cffi
|
||||
'';
|
||||
|
||||
pytestFlags = [
|
||||
"tests/unittest"
|
||||
# test accesses network
|
||||
"--deselect tests/unittest/test_smoke.py::test_async"
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# FIXME ImpersonateError: Impersonating chrome136 is not supported
|
||||
"test_impersonate_without_version"
|
||||
"test_with_impersonate"
|
||||
# InvalidURL: Invalid URL component 'path'
|
||||
"test_update_params"
|
||||
# tests access network
|
||||
"test_add_handle"
|
||||
"test_socket_action"
|
||||
"test_without_impersonate"
|
||||
];
|
||||
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
meta = with lib; {
|
||||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue