15
0
forked from pool/python-primp
Files
python-primp/python-primp.spec
Matej Cepl 429af71ee8 Accepting request 1273645 from home:fstegmeier:branches:devel:languages:python
- Update to 0.15.0
  * build: remove unused dependencies
  * add random
  * implement Client.headers_update()
  * add "random" to Literal Client.IMPERSONATE, Client.IMPERSONATE_OS
  * fix(impersonate): remove okhttp_3.9, 'okhttp_3.11` from "random" variants to bypass FAILURE_ON_CLIENT_HELLO
- Update to 0.14.0
  * feat: add response.stream()
  * fix(cookies): del Client.cookies setter and getter
- Update to 0.13.0
  * refactor(response): change reponse logic
  * remove: delete dead code
  * fix: cookies logic improve
  * feat: add chrome_133, firefox_135
  * typing: improve
  * benchmark(async): add aiohttp
- Update to 0.12.0
  * refactor: move request functions to python
  * feat: add getter and setter to impersonate, impersonate_os
  * fix: remove the redirection of the Proxy-Authorization header
  * feat: add AsyncClient
  * tests: add AsyncClient tests
  * benchmark: add AsyncClient
  * ci(pytest): add pytest-asyncio
  * feat: python format + lint (ruff, mypy)
- Update to 0.11.0
  * Add impersonate_os, bump rquest to v2.0.3
- Update to 0.10.0
  * Improve get_encoding_from_content
  * files: take file paths instead of contents; post files as streams

OBS-URL: https://build.opensuse.org/request/show/1273645
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-primp?expand=0&rev=8
2025-04-30 12:21:44 +00:00

76 lines
2.3 KiB
RPMSpec

#
# spec file for package python-primp
#
# Copyright (c) 2025 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.15.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.gz
Source1: vendor.tar.xz
BuildRequires: %{python_module maturin >= 1.5}
BuildRequires: %{python_module pip}
BuildRequires: cargo-packaging
BuildRequires: clang-devel
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: git
BuildRequires: llvm
BuildRequires: openssl
BuildRequires: python-rpm-macros
%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