]> git.pld-linux.org Git - packages/python-requests-toolbelt.git/blob - python-requests-toolbelt.spec
- release 4 (by relup.sh)
[packages/python-requests-toolbelt.git] / python-requests-toolbelt.spec
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
10 Summary:        Utility belt for advanced users of python-requests
11 Name:           python-%{pypi_name}
12 Version:        0.8.0
13 Release:        4
14 License:        Apache v2.0
15 Group:          Libraries/Python
16 Source0:        https://github.com/sigmavirus24/requests-toolbelt/archive/%{version}/%{pypi_name}-%{version}.tar.gz
17 # Source0-md5:  de9bf7fbcc6ae341a5c4fd9f8912bcac
18 URL:            https://toolbelt.readthedocs.io
19 BuildRequires:  rpm-pythonprov
20 BuildRequires:  rpmbuild(macros) >= 1.714
21 %if %{with python2}
22 BuildRequires:  python-modules
23 BuildRequires:  python-setuptools
24 %if %{with tests}
25 BuildRequires:  python-betamax
26 BuildRequires:  python-mock
27 BuildRequires:  python-pytest
28 BuildRequires:  python-requests
29 %endif
30 %endif
31 %if %{with python3}
32 BuildRequires:  python3-modules
33 BuildRequires:  python3-setuptools
34 %if %{with tests}
35 BuildRequires:  python3-betamax
36 BuildRequires:  python3-mock
37 BuildRequires:  python3-pytest
38 BuildRequires:  python3-requests
39 %endif
40 %endif
41 BuildArch:      noarch
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 %description
45 This is just a collection of utilities for python-requests, but don't
46 really belong in requests proper.
47
48 %package -n python3-%{pypi_name}
49 Summary:        %{summary}
50
51 %description -n python3-%{pypi_name}
52 This is just a collection of utilities for python-requests, but don't
53 really 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}
62 py.test-%{py_ver} -v
63 %endif
64 %endif
65
66 %if %{with python3}
67 %py3_build
68 %if %{with tests}
69 py.test-%{py3_ver} -v
70 %endif
71 %endif
72
73 %install
74 rm -rf $RPM_BUILD_ROOT
75 %py_install
76 %py3_install
77
78 %clean
79 rm -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.051855 seconds and 3 git commands to generate.