]> git.pld-linux.org Git - packages/python-rtkit.git/blob - python-rtkit.spec
- drop python3-distribute deps
[packages/python-rtkit.git] / python-rtkit.spec
1 #
2 # Conditional build:
3 %bcond_without  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  rtkit
9 Summary:        Request Tracker data access for REST interface
10 Name:           python-%{module}
11 Version:        0.7.0
12 Release:        1
13 License:        Apache v2.0
14 Group:          Libraries/Python
15 Source0:        https://github.com/z4r/python-rtkit/archive/%{version}.tar.gz
16 # Source0-md5:  676b715bd843181dc27c14b0700b30af
17 URL:            http://z4r.github.io/python-rtkit/
18 BuildRequires:  rpmbuild(macros) >= 1.710
19 %{?with_doc:BuildRequires:      sphinx-pdg}
20 %if %{with python2}
21 BuildRequires:  python-devel
22 BuildRequires:  python-distribute
23 %endif
24 %if %{with python3}
25 BuildRequires:  python3-devel
26 BuildRequires:  python3-modules
27 %endif
28 Requires:       python-modules
29 BuildArch:      noarch
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 Best Practical RT (Request Tracker) data access python module for REST
34 interface.
35
36 %package -n python3-%{module}
37 Summary:        Request Tracker data access for REST interface
38 Group:          Libraries/Python
39 Requires:       python3-modules
40
41 %description -n python3-%{module}
42 Best Practical RT (Request Tracker) data access python module for REST
43 interface.
44
45 %package apidocs
46 Summary:        %{module} API documentation
47 Summary(pl.UTF-8):      Dokumentacja API %{module}
48 Group:          Documentation
49
50 %description apidocs
51 API documentation for %{module}.
52
53 %description apidocs -l pl.UTF-8
54 Dokumentacja API %{module}.
55
56 %prep
57 %setup -q
58
59 %build
60 %if %{with python2}
61 %py_build %{?with_tests:test}
62 %endif
63
64 %if %{with python3}
65 %py3_build %{?with_tests:test}
66 %endif
67
68 %if %{with doc}
69 cd docs
70 %{__make} -j1 html
71 rm -rf _build/html/_sources
72 %endif
73
74 %install
75 rm -rf $RPM_BUILD_ROOT
76
77 %if %{with python2}
78 %py_install
79
80 %py_postclean
81 %endif
82
83 %if %{with python3}
84 %py3_install
85 %endif
86
87 %clean
88 rm -rf $RPM_BUILD_ROOT
89
90 %if %{with python2}
91 %files
92 %defattr(644,root,root,755)
93 %doc README.rst
94 %dir %{py_sitescriptdir}/rtkit
95 %{py_sitescriptdir}/rtkit/*.py[co]
96 %{py_sitescriptdir}/rtkit/tests
97 %if "%{py_ver}" > "2.4"
98 %{py_sitescriptdir}/python_%{module}-%{version}-py*.egg-info
99 %endif
100 %endif
101
102 %if %{with python3}
103 %files -n python3-%{module}
104 %defattr(644,root,root,755)
105 %doc README.rst
106 %{py3_sitescriptdir}/%{module}
107 %{py3_sitescriptdir}/python_%{module}-%{version}-py*.egg-info
108 %endif
109
110 %if %{with doc}
111 %files apidocs
112 %defattr(644,root,root,755)
113 %doc docs/_build/html/*
114 %endif
This page took 0.093008 seconds and 3 git commands to generate.