]>
Commit | Line | Data |
---|---|---|
4f8c26a0 JK |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
5 | ||
6 | %define module requestbuilder | |
7 | Summary: Command line-driven HTTP request builder | |
66d5689a | 8 | Summary(pl.UTF-8): Budowanie żądań HTTP w oparciu o linię poleceń |
4f8c26a0 JK |
9 | Name: python-%{module} |
10 | Version: 0.2.3 | |
40703c72 | 11 | Release: 10 |
4f8c26a0 JK |
12 | License: ISC |
13 | Group: Libraries/Python | |
14 | Source0: https://pypi.python.org/packages/source/r/requestbuilder/%{module}-%{version}.tar.gz | |
15 | # Source0-md5: 3d9793e3a3b3dad23a8475e0480581db | |
16 | URL: https://github.com/boto/requestbuilder | |
17 | BuildRequires: rpm-pythonprov | |
53fc63b0 | 18 | BuildRequires: rpmbuild(macros) >= 1.714 |
4f8c26a0 | 19 | %if %{with python2} |
66d5689a | 20 | BuildRequires: python-modules >= 1:2.6 |
53fc63b0 | 21 | BuildRequires: python-setuptools > 1:7.0 |
4f8c26a0 JK |
22 | %endif |
23 | %if %{with python3} | |
66d5689a | 24 | BuildRequires: python3-modules >= 1:3.2 |
53fc63b0 | 25 | BuildRequires: python3-setuptools > 1:7.0 |
4f8c26a0 | 26 | %endif |
66d5689a | 27 | Requires: python-requests >= 1 |
4f8c26a0 JK |
28 | Requires: python-six |
29 | BuildArch: noarch | |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
31 | ||
32 | %description | |
33 | Command line-driven HTTP request builder. | |
34 | ||
66d5689a JB |
35 | %description -l pl.UTF-8 |
36 | Budowanie żądań HTTP w oparciu o linię poleceń. | |
37 | ||
4f8c26a0 | 38 | %package -n python3-%{module} |
66d5689a JB |
39 | Summary: Command line-driven HTTP request builder |
40 | Summary(pl.UTF-8): Budowanie żądań HTTP w oparciu o linię poleceń | |
4f8c26a0 | 41 | Group: Libraries/Python |
66d5689a | 42 | Requires: python-requests >= 1 |
4f8c26a0 JK |
43 | Requires: python-six |
44 | ||
45 | %description -n python3-%{module} | |
46 | Command line-driven HTTP request builder. | |
47 | ||
48 | %description -n python3-%{module} -l pl.UTF-8 | |
66d5689a | 49 | Budowanie żądań HTTP w oparciu o linię poleceń. |
4f8c26a0 JK |
50 | |
51 | %prep | |
52 | %setup -q -n %{module}-%{version} | |
53 | ||
54 | %build | |
55 | %if %{with python2} | |
66d5689a | 56 | %py_build |
4f8c26a0 JK |
57 | %endif |
58 | ||
59 | %if %{with python3} | |
66d5689a | 60 | %py3_build |
4f8c26a0 JK |
61 | %endif |
62 | ||
63 | %install | |
64 | rm -rf $RPM_BUILD_ROOT | |
65 | ||
66 | %if %{with python2} | |
208cb3cf | 67 | %py_install |
4f8c26a0 JK |
68 | |
69 | %py_postclean | |
70 | %endif | |
71 | ||
72 | %if %{with python3} | |
208cb3cf | 73 | %py3_install |
4f8c26a0 JK |
74 | %endif |
75 | ||
76 | %clean | |
77 | rm -rf $RPM_BUILD_ROOT | |
78 | ||
79 | %if %{with python2} | |
80 | %files | |
81 | %defattr(644,root,root,755) | |
82 | %{py_sitescriptdir}/%{module} | |
4f8c26a0 JK |
83 | %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info |
84 | %endif | |
4f8c26a0 JK |
85 | |
86 | %if %{with python3} | |
87 | %files -n python3-%{module} | |
88 | %defattr(644,root,root,755) | |
89 | %{py3_sitescriptdir}/%{module} | |
90 | %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info | |
91 | %endif |