]> git.pld-linux.org Git - SPECS.git/blob - python-requestsexceptions.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / python-requestsexceptions.spec
1 #
2 # Conditional build:
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
6
7 Summary:        Import exceptions from potentially bundled packages in requests
8 Name:           python-requestsexceptions
9 Version:        1.3.0
10 Release:        5
11 License:        Apache
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
18 %if %{with python2}
19 BuildRequires:  python-pbr >= 2.0.0
20 BuildRequires:  python-setuptools
21 %if %{with tests}
22 BuildRequires:  python-hacking >= 0.12.0
23 BuildConflicts: python-hacking = 0.13.0
24 BuildConflicts: python-hacking >= 0.14
25 %endif
26 %endif
27 %if %{with python3}
28 BuildRequires:  python3-pbr >= 2.0.0
29 BuildRequires:  python3-setuptools
30 %if %{with tests}
31 BuildRequires:  python3-hacking >= 0.12.0
32 BuildConflicts: python3-hacking = 0.13.0
33 BuildConflicts: python3-hacking >= 0.14
34 %endif
35 %endif
36 Requires:       python-modules
37 BuildArch:      noarch
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %description
41 Import exceptions from potentially bundled packages in requests.
42
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.
49
50 %description -l pl.UTF-8
51
52 %package -n python3-requestsexceptions
53 Summary:        Import exceptions from potentially bundled packages in requests
54 Group:          Libraries/Python
55 Requires:       python3-modules
56
57 %description -n python3-requestsexceptions
58 Import exceptions from potentially bundled packages in requests.
59
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.
66
67 %prep
68 %setup -q -n requestsexceptions-%{version}
69
70 %build
71 %if %{with python2}
72 %py_build %{?with_tests:test}
73 %endif
74
75 %if %{with python3}
76 %py3_build %{?with_tests:test}
77 %endif
78
79 %if %{with doc}
80 cd docs
81 %{__make} -j1 html
82 rm -rf _build/html/_sources
83 %endif
84
85 %install
86 rm -rf $RPM_BUILD_ROOT
87
88 %if %{with python2}
89 %py_install
90
91 %py_postclean
92 %endif
93
94 %if %{with python3}
95 %py3_install
96 %endif
97
98 %clean
99 rm -rf $RPM_BUILD_ROOT
100
101 %if %{with python2}
102 %files
103 %defattr(644,root,root,755)
104 %doc AUTHORS ChangeLog README.rst
105 %{py_sitescriptdir}/requestsexceptions
106 %{py_sitescriptdir}/requestsexceptions-%{version}-py*.egg-info
107 %endif
108
109 %if %{with python3}
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
115 %endif
This page took 0.953019 seconds and 3 git commands to generate.