]> git.pld-linux.org Git - packages/python-requestbuilder.git/blob - python-requestbuilder.spec
BR: rpmbuild(macros) >= 1.710
[packages/python-requestbuilder.git] / python-requestbuilder.spec
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
8 Name:           python-%{module}
9 Version:        0.2.3
10 Release:        3
11 License:        ISC
12 Group:          Libraries/Python
13 Source0:        https://pypi.python.org/packages/source/r/requestbuilder/%{module}-%{version}.tar.gz
14 # Source0-md5:  3d9793e3a3b3dad23a8475e0480581db
15 URL:            https://github.com/boto/requestbuilder
16 BuildRequires:  rpm-pythonprov
17 BuildRequires:  rpmbuild(macros) >= 1.710
18 %if %{with python2}
19 BuildRequires:  python-modules
20 BuildRequires:  python-setuptools > 7.0
21 %endif
22 %if %{with python3}
23 BuildRequires:  python3-modules
24 BuildRequires:  python3-setuptools > 7.0
25 %endif
26 Requires:       python-requests
27 Requires:       python-six
28 BuildArch:      noarch
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %description
32 Command line-driven HTTP request builder.
33
34 %package -n python3-%{module}
35 Summary:        -
36 Summary(pl.UTF-8):      -
37 Group:          Libraries/Python
38 Requires:       python-requests
39 Requires:       python-six
40
41 %description -n python3-%{module}
42 Command line-driven HTTP request builder.
43
44 %description -n python3-%{module} -l pl.UTF-8
45
46 %package apidocs
47 Summary:        %{module} API documentation
48 Summary(pl.UTF-8):      Dokumentacja API %{module}
49 Group:          Documentation
50
51 %description apidocs
52 API documentation for %{module}.
53
54 %description apidocs -l pl.UTF-8
55 Dokumentacja API %{module}.
56
57 %prep
58 %setup -q -n %{module}-%{version}
59
60 %build
61 %if %{with python2}
62 # CC/CFLAGS is only for arch packages - remove on noarch packages
63 CC="%{__cc}" \
64 CFLAGS="%{rpmcppflags} %{rpmcflags}" \
65 %py_build %{?with_tests:test}
66 %endif
67
68 %if %{with python3}
69 # CC/CFLAGS is only for arch packages - remove on noarch packages
70 CC="%{__cc}" \
71 CFLAGS="%{rpmcppflags} %{rpmcflags}" \
72 %py3_build %{?with_tests:test}
73 %endif
74
75 %if %{with doc}
76 cd docs
77 %{__make} -j1 html
78 rm -rf _build/html/_sources
79 %endif
80
81 %install
82 rm -rf $RPM_BUILD_ROOT
83
84 %if %{with python2}
85 %py_install
86
87 %py_postclean
88 %endif
89
90 %if %{with python3}
91 %py3_install
92 %endif
93
94 %clean
95 rm -rf $RPM_BUILD_ROOT
96
97 %if %{with python2}
98 %files
99 %defattr(644,root,root,755)
100 %{py_sitescriptdir}/%{module}
101 %if "%{py_ver}" > "2.4"
102 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
103 %endif
104 %endif
105
106 %if %{with python3}
107 %files -n python3-%{module}
108 %defattr(644,root,root,755)
109 %{py3_sitescriptdir}/%{module}
110 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
111 %endif
This page took 0.071625 seconds and 3 git commands to generate.