From 5eef9e9e1cb0c5edb5ee5195094c3b350ebb337d Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Mon, 3 Nov 2025 19:56:09 -0800 Subject: [PATCH] add: curl_cffi (#7046) (#7084) * Add curl_cffi * Add curl_cffi * make build on 42 * use pypi for version --------- (cherry picked from commit 2b4d062d158a371528ff4818f13dcd96ceaaf9e1) Co-authored-by: metcya <134973769+metcya@users.noreply.github.com> Co-authored-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com> --- anda/langs/python/curl_cffi/anda.hcl | 9 ++++ anda/langs/python/curl_cffi/curl_cffi.spec | 55 ++++++++++++++++++++++ anda/langs/python/curl_cffi/update.rhai | 1 + 3 files changed, 65 insertions(+) create mode 100644 anda/langs/python/curl_cffi/anda.hcl create mode 100644 anda/langs/python/curl_cffi/curl_cffi.spec create mode 100644 anda/langs/python/curl_cffi/update.rhai diff --git a/anda/langs/python/curl_cffi/anda.hcl b/anda/langs/python/curl_cffi/anda.hcl new file mode 100644 index 0000000000..598fb0557e --- /dev/null +++ b/anda/langs/python/curl_cffi/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "curl_cffi.spec" + } + labels { + nightly = 1 + } +} diff --git a/anda/langs/python/curl_cffi/curl_cffi.spec b/anda/langs/python/curl_cffi/curl_cffi.spec new file mode 100644 index 0000000000..e970fe4d9d --- /dev/null +++ b/anda/langs/python/curl_cffi/curl_cffi.spec @@ -0,0 +1,55 @@ +%define _unpackaged_files_terminate_build 0 + +%global pypi_name curl_cffi +%global _desc Python binding for curl-impersonate fork via cffi. +%global _version 0.14.0b2 + +Name: python-%{pypi_name} +Version: %{_version} +Release: 1%?dist +Summary: Python binding for curl-impersonate fork via cffi.. +License: MIT +URL: https://github.com/lexiforest/curl_cffi +Source0: %{pypi_source} +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +BuildRequires: curl-impersonate-chrome-devel + +Packager: Metcya + +%description +%_desc + +%package -n python3-%{pypi_name} +Summary: %{summary} +Provides: %{pypi_name} +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} +%_desc + +%prep +%autosetup -n %{pypi_name}-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%pyproject_save_files %{pypi_name} + +%files -n python3-%{pypi_name} -f %{pyproject_files} +%doc README.md +%license LICENSE +%{python3_sitelib}/%{pypi_name}-%{version}.dist-info/* +%{python3_sitelib}/%{pypi_name}/*.{py,so,typed} +%{python3_sitelib}/%{pypi_name}/__pycache__/*.pyc +%{python3_sitelib}/%{pypi_name}/requests/*.py +%{python3_sitelib}/%{pypi_name}/requests/__pycache__/*.pyc + +%changelog +* Sun Nov 02 2025 Metcya +- Initial commit diff --git a/anda/langs/python/curl_cffi/update.rhai b/anda/langs/python/curl_cffi/update.rhai new file mode 100644 index 0000000000..83386246c7 --- /dev/null +++ b/anda/langs/python/curl_cffi/update.rhai @@ -0,0 +1 @@ +rpm.version(pypi("curl_cffi"));