3 %bcond_with tests # do perform "make test" (tricky python-hacking dependency)
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 Summary: Import exceptions from potentially bundled packages in requests
8 Name: python-requestsexceptions
12 Group: Libraries/Python
13 Source0: https://files.pythonhosted.org/packages/source/r/requestsexceptions/requestsexceptions-%{version}.tar.gz
14 # Source0-md5: 85c9a2c5c5ecbd2deb0a491613fbdd12
15 URL: https://pypi.python.org/pypi/requestsexceptions
16 BuildRequires: rpm-pythonprov
17 BuildRequires: rpmbuild(macros) >= 1.714
19 BuildRequires: python-pbr >= 2.0.0
20 BuildRequires: python-setuptools
22 BuildRequires: python-hacking >= 0.12.0
23 BuildConflicts: python-hacking = 0.13.0
24 BuildConflicts: python-hacking >= 0.14
28 BuildRequires: python3-pbr >= 2.0.0
29 BuildRequires: python3-setuptools
31 BuildRequires: python3-hacking >= 0.12.0
32 BuildConflicts: python3-hacking = 0.13.0
33 BuildConflicts: python3-hacking >= 0.14
36 Requires: python-modules
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 Import exceptions from potentially bundled packages in requests.
43 The python requests library bundles the urllib3 library, however, some
44 software distributions modify requests to remove the bundled library.
45 This makes some operations, such as supressing the “insecure platform
46 warning” messages that urllib emits difficult. This is a simple
47 library to find the correct path to exceptions in the requests library
48 regardless of whether they are bundled.
50 %description -l pl.UTF-8
52 %package -n python3-requestsexceptions
53 Summary: Import exceptions from potentially bundled packages in requests
54 Group: Libraries/Python
55 Requires: python3-modules
57 %description -n python3-requestsexceptions
58 Import exceptions from potentially bundled packages in requests.
60 The python requests library bundles the urllib3 library, however, some
61 software distributions modify requests to remove the bundled library.
62 This makes some operations, such as supressing the “insecure platform
63 warning” messages that urllib emits difficult. This is a simple
64 library to find the correct path to exceptions in the requests library
65 regardless of whether they are bundled.
68 %setup -q -n requestsexceptions-%{version}
72 %py_build %{?with_tests:test}
76 %py3_build %{?with_tests:test}
82 rm -rf _build/html/_sources
86 rm -rf $RPM_BUILD_ROOT
99 rm -rf $RPM_BUILD_ROOT
103 %defattr(644,root,root,755)
104 %doc AUTHORS ChangeLog README.rst
105 %{py_sitescriptdir}/requestsexceptions
106 %{py_sitescriptdir}/requestsexceptions-%{version}-py*.egg-info
110 %files -n python3-requestsexceptions
111 %defattr(644,root,root,755)
112 %doc AUTHORS ChangeLog README.rst
113 %{py3_sitescriptdir}/requestsexceptions
114 %{py3_sitescriptdir}/requestsexceptions-%{version}-py*.egg-info