]> git.pld-linux.org Git - packages/python-rtkit.git/blob - python-rtkit.spec
32496158fe445b3b137f6a651fa30bb0b36fa451
[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-distribute
27 BuildRequires:  python3-modules
28 %endif
29 Requires:       python-modules
30 BuildArch:      noarch
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 Best Practical RT (Request Tracker) data access python module for REST
35 interface.
36
37 %package -n python3-%{module}
38 Summary:        Request Tracker data access for REST interface
39 Group:          Libraries/Python
40 Requires:       python3-modules
41
42 %description -n python3-%{module}
43 Best Practical RT (Request Tracker) data access python module for REST
44 interface.
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
59
60 %build
61 %if %{with python2}
62 %py_build %{?with_tests:test}
63 %endif
64
65 %if %{with python3}
66 %py3_build %{?with_tests:test}
67 %endif
68
69 %if %{with doc}
70 cd docs
71 %{__make} -j1 html
72 rm -rf _build/html/_sources
73 %endif
74
75 %install
76 rm -rf $RPM_BUILD_ROOT
77
78 %if %{with python2}
79 %py_install
80
81 %py_postclean
82 %endif
83
84 %if %{with python3}
85 %py3_install
86 %endif
87
88 %clean
89 rm -rf $RPM_BUILD_ROOT
90
91 %if %{with python2}
92 %files
93 %defattr(644,root,root,755)
94 %doc README.rst
95 %dir %{py_sitescriptdir}/rtkit
96 %{py_sitescriptdir}/rtkit/*.py[co]
97 %{py_sitescriptdir}/rtkit/tests
98 %if "%{py_ver}" > "2.4"
99 %{py_sitescriptdir}/python_%{module}-%{version}-py*.egg-info
100 %endif
101 %endif
102
103 %if %{with python3}
104 %files -n python3-%{module}
105 %defattr(644,root,root,755)
106 %doc README.rst
107 %{py3_sitescriptdir}/%{module}
108 %{py3_sitescriptdir}/python_%{module}-%{version}-py*.egg-info
109 %endif
110
111 %if %{with doc}
112 %files apidocs
113 %defattr(644,root,root,755)
114 %doc docs/_build/html/*
115 %endif
This page took 0.069545 seconds and 2 git commands to generate.