]> git.pld-linux.org Git - SPECS.git/blob - python-requests_unixsocket.spec
SPECS updated Sat 31 Jul 20:26:02 CEST 2021
[SPECS.git] / python-requests_unixsocket.spec
1 #
2 # Conditional build:
3 %bcond_with     doc     # don't build doc
4 %bcond_without  tests   # do not perform "make test"
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_without  python3 # CPython 3.x module
7
8 %define         module  requests_unixsocket
9 Summary:        Use requests to talk HTTP via a UNIX domain socket
10 Name:           python-%{module}
11 Version:        0.1.5
12 Release:        0.1
13 License:        Apache v2.0
14 Group:          Libraries/Python
15 Source0:        https://pypi.python.org/packages/source/r/requests-unixsocket/requests-unixsocket-%{version}.tar.gz
16 # Source0-md5:  08453c8ef7dc03863ff4a30b901e7c20
17 URL:            https://github.com/msabramo/requests-unixsocket
18 BuildRequires:  python-pbr
19 BuildRequires:  rpm-pythonprov
20 BuildRequires:  rpmbuild(macros) >= 1.714
21 %if %{with python2}
22 BuildRequires:  python-modules
23 BuildRequires:  python-setuptools
24 %endif
25 %if %{with python3}
26 BuildRequires:  python3-modules
27 BuildRequires:  python3-setuptools
28 %endif
29 Requires:       python-modules
30 BuildArch:      noarch
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 Use requests to talk HTTP via a UNIX domain socket
35
36 %package -n python3-%{module}
37 Summary:        Use requests to talk HTTP via a UNIX domain socket
38 Group:          Libraries/Python
39 Requires:       python3-modules
40
41 %description -n python3-%{module}
42 Use requests to talk HTTP via a UNIX domain socket
43
44 %package apidocs
45 Summary:        %{module} API documentation
46 Summary(pl.UTF-8):      Dokumentacja API %{module}
47 Group:          Documentation
48
49 %description apidocs
50 API documentation for %{module}.
51
52 %description apidocs -l pl.UTF-8
53 Dokumentacja API %{module}.
54
55 %prep
56 %setup -q -n requests-unixsocket-%{version}
57
58 %build
59 %if %{with python2}
60 %py_build %{?with_tests:test}
61 %endif
62
63 %if %{with python3}
64 %py3_build %{?with_tests:test}
65 %endif
66
67 %if %{with doc}
68 cd docs
69 %{__make} -j1 html
70 rm -rf _build/html/_sources
71 %endif
72
73 %install
74 rm -rf $RPM_BUILD_ROOT
75
76 %if %{with python2}
77 %py_install
78 %py_postclean
79 %endif
80
81 %if %{with python3}
82 %py3_install
83 %endif
84
85 %clean
86 rm -rf $RPM_BUILD_ROOT
87
88 %if %{with python2}
89 %files
90 %defattr(644,root,root,755)
91 %doc README.rst LICENSE
92 %{py_sitescriptdir}/%{module}
93 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
94 %endif
95
96 %if %{with python3}
97 %files -n python3-%{module}
98 %defattr(644,root,root,755)
99 %doc README.rst LICENSE
100 %{py3_sitescriptdir}/%{module}
101 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
102 %endif
103
104 %if %{with doc}
105 %files apidocs
106 %defattr(644,root,root,755)
107 %doc docs/_build/html/*
108 %endif
This page took 0.044143 seconds and 3 git commands to generate.