2022-11-29 22:40:17 +00:00
|
|
|
|
%global __python3 /usr/bin/python3.11
|
|
|
|
|
%global python3_pkgversion 3.11
|
2022-11-29 22:34:40 +00:00
|
|
|
|
|
2022-11-29 22:40:17 +00:00
|
|
|
|
# RHEL: Tests disabled due to missing dependencies
|
|
|
|
|
%bcond_with tests
|
2022-11-29 22:34:40 +00:00
|
|
|
|
|
2022-11-29 22:40:17 +00:00
|
|
|
|
Name: python%{python3_pkgversion}-requests
|
2022-11-29 22:34:40 +00:00
|
|
|
|
Version: 2.28.1
|
2022-11-29 22:40:17 +00:00
|
|
|
|
Release: 1%{?dist}
|
2022-11-29 22:34:40 +00:00
|
|
|
|
Summary: HTTP library, written in Python, for human beings
|
|
|
|
|
|
|
|
|
|
License: ASL 2.0
|
|
|
|
|
URL: https://pypi.io/project/requests
|
|
|
|
|
Source0: https://github.com/requests/requests/archive/v%{version}/requests-v%{version}.tar.gz
|
|
|
|
|
# Explicitly use the system certificates in ca-certificates.
|
|
|
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=904614
|
|
|
|
|
Patch0: requests-2.28.1-system-certs.patch
|
|
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-devel
|
2022-11-29 22:40:17 +00:00
|
|
|
|
BuildRequires: python%{python3_pkgversion}-rpm-macros
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-charset-normalizer
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-urllib3
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-idna
|
|
|
|
|
# pygments is used for syntax highlighting in the docs - disabled due to missing deps
|
|
|
|
|
#BuildRequires: python%%{python3_pkgversion}-pygments
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-setuptools
|
2022-11-29 22:34:40 +00:00
|
|
|
|
|
|
|
|
|
%if %{with tests}
|
2022-11-29 22:40:17 +00:00
|
|
|
|
BuildRequires: python%{python3_pkgversion}-pytest
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-pytest-httpbin
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-pytest-mock
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-trustme
|
2022-11-29 22:34:40 +00:00
|
|
|
|
%endif
|
|
|
|
|
|
2022-11-29 22:40:17 +00:00
|
|
|
|
Requires: python%{python3_pkgversion}-charset-normalizer
|
|
|
|
|
Requires: python%{python3_pkgversion}-urllib3
|
|
|
|
|
Requires: python%{python3_pkgversion}-idna
|
2022-11-29 22:34:40 +00:00
|
|
|
|
|
2022-11-29 22:40:17 +00:00
|
|
|
|
%description
|
2022-11-29 22:34:40 +00:00
|
|
|
|
Most existing Python modules for sending HTTP requests are extremely verbose and
|
|
|
|
|
cumbersome. Python’s built-in urllib2 module provides most of the HTTP
|
|
|
|
|
capabilities you should need, but the API is thoroughly broken. This library is
|
|
|
|
|
designed to make HTTP requests easy for developers.
|
|
|
|
|
|
|
|
|
|
|
2022-11-29 22:40:17 +00:00
|
|
|
|
%{?python_extras_subpkg:%python_extras_subpkg -n python%{python3_pkgversion}-requests -i %{python3_sitelib}/*.egg-info security socks}
|
2022-11-29 22:34:40 +00:00
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -p1 -n requests-%{version}
|
|
|
|
|
|
|
|
|
|
# env shebang in nonexecutable file
|
|
|
|
|
sed -i '/#!\/usr\/.*python/d' requests/certs.py
|
|
|
|
|
|
|
|
|
|
# Some doctests use the internet and fail to pass in Koji. Since doctests don't have names, I don't
|
|
|
|
|
# know a way to skip them. We also don't want to patch them out, because patching them out will
|
|
|
|
|
# change the docs. Thus, we set pytest not to run doctests at all.
|
|
|
|
|
sed -i 's/ --doctest-modules//' pyproject.toml
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
2022-11-29 22:40:17 +00:00
|
|
|
|
%py3_build
|
2022-11-29 22:34:40 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
2022-11-29 22:40:17 +00:00
|
|
|
|
%py3_install
|
2022-11-29 22:34:40 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
%check
|
|
|
|
|
%pytest -v
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
2022-11-29 22:40:17 +00:00
|
|
|
|
%files -n python%{python3_pkgversion}-requests
|
2022-11-29 22:34:40 +00:00
|
|
|
|
%license LICENSE
|
|
|
|
|
%doc README.md HISTORY.md
|
2022-11-29 22:40:17 +00:00
|
|
|
|
%{python3_sitelib}/*.egg-info/
|
|
|
|
|
%{python3_sitelib}/requests/
|
2022-11-29 22:34:40 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
2022-11-29 22:40:17 +00:00
|
|
|
|
* Tue Nov 29 2022 Charalampos Stratakis <cstratak@redhat.com> - 2.28.1-1
|
2022-11-29 22:34:40 +00:00
|
|
|
|
- Initial package
|
2022-11-29 22:40:17 +00:00
|
|
|
|
- Fedora contributions by:
|
|
|
|
|
Adam Williamson <awilliam@redhat.com>
|
|
|
|
|
Arun SAG <sagarun@gmail.com>
|
|
|
|
|
Charalampos Stratakis <cstratak@redhat.com>
|
|
|
|
|
David Malcolm <dmalcolm@redhat.com>
|
|
|
|
|
Dennis Gilmore <dennis@ausil.us>
|
|
|
|
|
Igor Gnatenko <ignatenkobrain@fedoraproject.org>
|
|
|
|
|
Iryna Shcherbina <shcherbina.iryna@gmail.com>
|
|
|
|
|
Jeremy Cline <jeremy@jcline.org>
|
|
|
|
|
Karolina Surma <ksurma@redhat.com>
|
|
|
|
|
Kevin Fenzi <kevin@scrye.com>
|
|
|
|
|
Lumir Balhar <lbalhar@redhat.com>
|
|
|
|
|
Miro Hrončok <miro@hroncok.cz>
|
|
|
|
|
Petr Viktorin <pviktori@redhat.com>
|
|
|
|
|
Ralph Bean <rbean@redhat.com>
|
|
|
|
|
Randy Barlow <randy@electronsweatshop.com>
|
|
|
|
|
Rex Dieter <rdieter@math.unl.edu>
|
|
|
|
|
Robert Kuska <rkuska@redhat.com>
|
|
|
|
|
Slavek Kabrda <bkabrda@redhat.com>
|
|
|
|
|
Stephen Gallagher <sgallagh@redhat.com>
|
|
|
|
|
Tom Callaway <spot@fedoraproject.org>
|
|
|
|
|
Toshio Kuratomi <toshio@fedoraproject.org>
|
|
|
|
|
yatinkarel <ykarel@redhat.com>
|