]> git.pld-linux.org Git - packages/python-requests-toolbelt.git/blame - python-requests-toolbelt.spec
- release 4 (by relup.sh)
[packages/python-requests-toolbelt.git] / python-requests-toolbelt.spec
CommitLineData
0c903547
ER
1#
2# Conditional build:
3%bcond_with tests # do not perform "make test"
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7%define module requests_toolbelt
8%define egg_name requests_toolbelt
9%define pypi_name requests-toolbelt
10Summary: Utility belt for advanced users of python-requests
11Name: python-%{pypi_name}
12Version: 0.8.0
66ff12e0 13Release: 4
0c903547
ER
14License: Apache v2.0
15Group: Libraries/Python
16Source0: https://github.com/sigmavirus24/requests-toolbelt/archive/%{version}/%{pypi_name}-%{version}.tar.gz
17# Source0-md5: de9bf7fbcc6ae341a5c4fd9f8912bcac
18URL: https://toolbelt.readthedocs.io
19BuildRequires: rpm-pythonprov
20BuildRequires: rpmbuild(macros) >= 1.714
21%if %{with python2}
22BuildRequires: python-modules
23BuildRequires: python-setuptools
24%if %{with tests}
25BuildRequires: python-betamax
26BuildRequires: python-mock
27BuildRequires: python-pytest
28BuildRequires: python-requests
29%endif
30%endif
31%if %{with python3}
32BuildRequires: python3-modules
33BuildRequires: python3-setuptools
34%if %{with tests}
35BuildRequires: python3-betamax
36BuildRequires: python3-mock
37BuildRequires: python3-pytest
38BuildRequires: python3-requests
39%endif
40%endif
41BuildArch: noarch
42BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44%description
45This is just a collection of utilities for python-requests, but don't
46really belong in requests proper.
47
48%package -n python3-%{pypi_name}
49Summary: %{summary}
50
51%description -n python3-%{pypi_name}
52This is just a collection of utilities for python-requests, but don't
53really belong in requests proper.
54
55%prep
56%setup -q -n toolbelt-%{version}
57
58%build
59%if %{with python2}
60%py_build
61%if %{with tests}
62py.test-%{py_ver} -v
63%endif
64%endif
65
66%if %{with python3}
67%py3_build
68%if %{with tests}
69py.test-%{py3_ver} -v
70%endif
71%endif
72
73%install
74rm -rf $RPM_BUILD_ROOT
75%py_install
76%py3_install
77
78%clean
79rm -rf $RPM_BUILD_ROOT
80
81%if %{with python2}
82%files
83%defattr(644,root,root,755)
84%doc README.rst HISTORY.rst LICENSE
85%{py_sitescriptdir}/%{module}
86%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
87%endif
88
89%if %{with python3}
90%files -n python3-%{pypi_name}
91%defattr(644,root,root,755)
92%doc README.rst HISTORY.rst LICENSE
93%{py3_sitescriptdir}/%{module}
94%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
95%endif
This page took 0.144212 seconds and 4 git commands to generate.