14
0
forked from pool/python-primp

Accepting request 1196118 from home:yeey:OpenWebUI

- Version v0.6.0
  * CI: bugfix after dependencies update by @deedy5
  * Use anyhow for error handling by @deedy5
  * Improve response code by @deedy5
  * [Client]: add ca_cert_file parameter by @deedy5
  * [Utils] Recode fn json_dumps, json_loads, url_encode by @deedy5
  * [html2text] Response object: 1) add attribute text_rich
  * [logging]: send Rust log messages to Python
  * small code improvements

OBS-URL: https://build.opensuse.org/request/show/1196118
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-primp?expand=0&rev=1
This commit is contained in:
2024-08-31 09:25:11 +00:00
committed by Git OBS Bridge
commit f02023588c
7 changed files with 140 additions and 0 deletions

74
python-primp.spec Normal file
View File

@@ -0,0 +1,74 @@
#
# spec file for package python-primp
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?sle15_python_module_pythons}
Name: python-primp
Version: 0.6.0
Release: 0
Summary: HTTP client that can impersonate web browsers
License: MIT
URL: https://github.com/deedy5/primp
Source0: https://files.pythonhosted.org/packages/source/p/primp/primp-%{version}.tar.xz
Source1: vendor.tar.xz
BuildRequires: python-rpm-macros
BuildRequires: %{python_module maturin >= 1.5}
BuildRequires: %{python_module pip}
BuildRequires: cmake
BuildRequires: clang-devel
BuildRequires: gcc-c++
BuildRequires: git
BuildRequires: fdupes
BuildRequires: cargo-packaging
BuildRequires: llvm
BuildRequires: openssl
%python_subpackages
%description
The fastest python HTTP client that can impersonate web browsers, mimicking
their headers and 'TLS/JA3/JA4/HTTP2' fingerprints
%prep
%autosetup -p1 -n primp-%{version} -a1
%build
export CARGO_NET_OFFLINE=true
export CARGO_PROFILE_RELEASE_DEBUG=full
export CARGO_PROFILE_RELEASE_SPLIT_DEBUGINFO=off
export CARGO_PROFILE_RELEASE_STRIP=false
export C_INCLUDE_PATH=/usr/lib64/gcc/%_arch-suse-linux/%gcc_version/include
%pyproject_wheel
%install
export CARGO_NET_OFFLINE=true
export CARGO_PROFILE_RELEASE_DEBUG=full
export CARGO_PROFILE_RELEASE_SPLIT_DEBUGINFO=off
export CARGO_PROFILE_RELEASE_STRIP=false
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
# NOTE: don't run the tests as they required access to internet by trying to
# connect to "https://httpbin.org/anything".
%files %{python_files}
%doc README.md
%license LICENSE
%{python_sitearch}/primp
%{python_sitearch}/primp-%{version}*-info
%changelog