From f02023588c06e4d56b0c02d4978ec1d1e2a15b00dd36a2cf2f4ba58959c6b777 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sat, 31 Aug 2024 09:25:11 +0000 Subject: [PATCH] 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 --- .gitattributes | 23 ++++++++++++++ .gitignore | 1 + _service | 24 ++++++++++++++ primp-0.6.0.tar.xz | 3 ++ python-primp.changes | 12 +++++++ python-primp.spec | 74 ++++++++++++++++++++++++++++++++++++++++++++ vendor.tar.xz | 3 ++ 7 files changed, 140 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _service create mode 100644 primp-0.6.0.tar.xz create mode 100644 python-primp.changes create mode 100644 python-primp.spec create mode 100644 vendor.tar.xz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_service b/_service new file mode 100644 index 0000000..a4a86aa --- /dev/null +++ b/_service @@ -0,0 +1,24 @@ + + + https://github.com/deedy5/primp + @PARENT_TAG@ + git + v0.6.0 + * + v(\d+\.\d+\.\d+) + \1 + enable + mbelur@suse.com + + + + *.tar + xz + + + + primp + xz + true + + diff --git a/primp-0.6.0.tar.xz b/primp-0.6.0.tar.xz new file mode 100644 index 0000000..51ac465 --- /dev/null +++ b/primp-0.6.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8df5739f6171f3a95d61c508638c210a56c1214dc754f84f232d1900fc49ae74 +size 70228 diff --git a/python-primp.changes b/python-primp.changes new file mode 100644 index 0000000..0664952 --- /dev/null +++ b/python-primp.changes @@ -0,0 +1,12 @@ +------------------------------------------------------------------- +Fri Aug 23 23:12:23 UTC 2024 - Guang Yee + +- 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 diff --git a/python-primp.spec b/python-primp.spec new file mode 100644 index 0000000..906e9b8 --- /dev/null +++ b/python-primp.spec @@ -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 diff --git a/vendor.tar.xz b/vendor.tar.xz new file mode 100644 index 0000000..43230d8 --- /dev/null +++ b/vendor.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc063aebec0d3e46e8de5cc3f0534faae7897491dacdd78949949f4f3edd4ed3 +size 21739420