python3Packages.curl-cffi: 0.14.0 -> 0.15.0
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
cryptography,
|
cryptography,
|
||||||
fastapi,
|
fastapi,
|
||||||
httpx,
|
httpx,
|
||||||
|
litestar,
|
||||||
proxy-py,
|
proxy-py,
|
||||||
pytest-asyncio,
|
pytest-asyncio,
|
||||||
pytest-trio,
|
pytest-trio,
|
||||||
@@ -23,14 +24,14 @@
|
|||||||
}:
|
}:
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "curl-cffi";
|
pname = "curl-cffi";
|
||||||
version = "0.14.0";
|
version = "0.15.0";
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "lexiforest";
|
owner = "lexiforest";
|
||||||
repo = "curl_cffi";
|
repo = "curl_cffi";
|
||||||
tag = "v${version}";
|
tag = "v${version}";
|
||||||
hash = "sha256-5Q9oHAOjefihxj6xU1UGVTl6Ib31XqhrxLtOgI5VABs=";
|
hash = "sha256-I8rQj28IvLD7HWuog46E0dLFgnWSA6oE4Jyn9Flr7mQ=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [ ./use-system-libs.patch ];
|
patches = [ ./use-system-libs.patch ];
|
||||||
@@ -55,6 +56,7 @@ buildPythonPackage rec {
|
|||||||
cryptography
|
cryptography
|
||||||
fastapi
|
fastapi
|
||||||
httpx
|
httpx
|
||||||
|
litestar
|
||||||
proxy-py
|
proxy-py
|
||||||
pytest-asyncio
|
pytest-asyncio
|
||||||
pytest-trio
|
pytest-trio
|
||||||
|
|||||||
@@ -1,21 +1,38 @@
|
|||||||
--- a/scripts/build.py
|
--- a/scripts/build.py
|
||||||
+++ b/scripts/build.py
|
+++ b/scripts/build.py
|
||||||
@@ -141,7 +141,6 @@ def get_curl_libraries():
|
@@ -122,27 +122,8 @@ def get_curl_libraries():
|
||||||
ffibuilder = FFI()
|
ffibuilder = FFI()
|
||||||
system = platform.system()
|
system = platform.system()
|
||||||
root_dir = Path(__file__).parent.parent
|
root_dir = Path(__file__).parent.parent
|
||||||
-download_libcurl()
|
-download_libcurl()
|
||||||
|
-
|
||||||
|
-# With mega archive, we only have one to link
|
||||||
|
-static_libs = get_curl_archives()
|
||||||
|
extra_link_args = []
|
||||||
|
-if is_static:
|
||||||
|
- if system == "Darwin":
|
||||||
|
- extra_link_args = [
|
||||||
|
- f"-Wl,-force_load,{static_libs[0]}",
|
||||||
|
- "-lc++",
|
||||||
|
- ]
|
||||||
|
- elif system in ("Linux", "Android"):
|
||||||
|
- cxx_lib = "-lc++" if is_android else "-lstdc++"
|
||||||
|
- extra_link_args = [
|
||||||
|
- "-Wl,--whole-archive",
|
||||||
|
- static_libs[0],
|
||||||
|
- "-Wl,--no-whole-archive",
|
||||||
|
- cxx_lib,
|
||||||
|
- ]
|
||||||
|
-
|
||||||
|
-libraries = get_curl_libraries()
|
||||||
|
+libraries = ["curl-impersonate"]
|
||||||
|
|
||||||
ffibuilder.set_source(
|
ffibuilder.set_source(
|
||||||
@@ -150,9 +149,7 @@ ffibuilder.set_source(
|
"curl_cffi._wrapper",
|
||||||
#include "shim.h"
|
@@ -160,7 +132,7 @@ ffibuilder.set_source(
|
||||||
""",
|
""",
|
||||||
# FIXME from `curl-impersonate`
|
library_dirs=[str(libdir)],
|
||||||
- libraries=get_curl_libraries(),
|
- libraries=get_curl_libraries(),
|
||||||
- extra_objects=get_curl_archives(),
|
+ libraries=libraries,
|
||||||
- library_dirs=[arch["libdir"]],
|
extra_objects=[], # linked via extra_link_args
|
||||||
+ libraries=["curl-impersonate"],
|
|
||||||
source_extension=".c",
|
source_extension=".c",
|
||||||
include_dirs=[
|
|
||||||
str(root_dir / "include"),
|
|
||||||
|
|||||||
Reference in New Issue
Block a user