]>
Commit | Line | Data |
---|---|---|
c60823bb JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
6ff271e7 JB |
5 | %bcond_without doc # Sphinx documentation |
6 | %bcond_with tests # unit tests (not included in dist tarball?) | |
c60823bb JB |
7 | |
8 | Summary: OpenStack Sphinx extensions | |
9 | Summary(pl.UTF-8): Rozszerzenia modułu Sphinx z projektu OpenStack | |
10 | Name: python-oslosphinx | |
6ff271e7 | 11 | Version: 4.18.0 |
6771bed1 | 12 | Release: 4 |
c60823bb JB |
13 | License: Apache v2.0 |
14 | Group: Development/Languages/Python | |
15 | #Source0Download: https://pypi.python.org/simple/oslosphinx/ | |
6ff271e7 JB |
16 | Source0: https://files.pythonhosted.org/packages/source/o/oslosphinx/oslosphinx-%{version}.tar.gz |
17 | # Source0-md5: f2e63063eeae74ca0f92452d964b9b5c | |
c60823bb JB |
18 | URL: http://www.openstack.org/ |
19 | BuildRequires: rpm-pythonprov | |
20 | BuildRequires: rpmbuild(macros) >= 1.714 | |
21 | %if %{with python2} | |
22 | BuildRequires: python-devel >= 1:2.7 | |
6ff271e7 | 23 | BuildRequires: python-pbr >= 2.0.0 |
c60823bb JB |
24 | BuildRequires: python-setuptools |
25 | %if %{with tests} | |
6ff271e7 JB |
26 | BuildRequires: python-hacking >= 0.12.0 |
27 | BuildRequires: python-hacking < 0.14 | |
28 | BuildRequires: python-requests >= 2.14.2 | |
29 | BuildRequires: python-six >= 1.10.0 | |
c60823bb JB |
30 | %endif |
31 | %endif | |
32 | %if %{with python3} | |
33 | BuildRequires: python3-devel >= 1:3.4 | |
6ff271e7 | 34 | BuildRequires: python3-pbr >= 2.0.0 |
c60823bb JB |
35 | BuildRequires: python3-setuptools |
36 | %if %{with tests} | |
6ff271e7 JB |
37 | BuildRequires: python3-hacking >= 0.12.0 |
38 | BuildRequires: python3-hacking < 0.14 | |
39 | BuildRequires: python3-requests >= 2.14.2 | |
40 | BuildRequires: python3-six >= 1.10.0 | |
c60823bb JB |
41 | %endif |
42 | %endif | |
6ff271e7 JB |
43 | %if %{with doc} |
44 | BuildRequires: python3-openstackdocstheme >= 1.17.0 | |
45 | BuildRequires: python3-reno >= 2.5.0 | |
46 | BuildRequires: sphinx-pdg-3 >= 1.6.2 | |
47 | %endif | |
c60823bb | 48 | Requires: python-modules >= 1:2.7 |
c7c092a0 | 49 | BuildArch: noarch |
c60823bb JB |
50 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
51 | ||
52 | %description | |
53 | Theme and extension support for Sphinx documentation from the | |
54 | OpenStack project. | |
55 | ||
6ff271e7 JB |
56 | Note: this package is obsolete, the openstackdocstheme module should |
57 | be used instead. | |
58 | ||
c60823bb JB |
59 | %description -l pl.UTF-8 |
60 | Motyw oraz rozszerzenia wspomagające tworzenie dokumentacji w systemie | |
61 | Sphinx w projekcie OpenStack. | |
62 | ||
6ff271e7 JB |
63 | Uwaga: ten pakiet jest przestarzały, zamiast niego należy używać |
64 | modułu openstackdocstheme. | |
65 | ||
c60823bb JB |
66 | %package -n python3-oslosphinx |
67 | Summary: OpenStack Sphinx extensions | |
68 | Summary(pl.UTF-8): Rozszerzenia modułu Sphinx z projektu OpenStack | |
69 | Group: Development/Languages/Python | |
70 | Requires: python3-modules >= 1:3.2 | |
c60823bb JB |
71 | |
72 | %description -n python3-oslosphinx | |
73 | Theme and extension support for Sphinx documentation from the | |
74 | OpenStack project. | |
75 | ||
6ff271e7 JB |
76 | Note: this package is obsolete, the openstackdocstheme module should |
77 | be used instead. | |
78 | ||
c60823bb JB |
79 | %description -n python3-oslosphinx -l pl.UTF-8 |
80 | Motyw oraz rozszerzenia wspomagające tworzenie dokumentacji w systemie | |
81 | Sphinx w projekcie OpenStack. | |
82 | ||
6ff271e7 JB |
83 | Uwaga: ten pakiet jest przestarzały, zamiast niego należy używać |
84 | modułu openstackdocstheme. | |
85 | ||
86 | %package apidocs | |
87 | Summary: API documentation for Python oslosphinx module | |
88 | Summary(pl.UTF-8): Dokumentacja API modułu Pythona oslosphinx | |
89 | Group: Documentation | |
90 | ||
91 | %description apidocs | |
92 | API documentation for Python oslosphinx module. | |
93 | ||
94 | %description apidocs -l pl.UTF-8 | |
95 | Dokumentacja API modułu Pythona oslosphinx. | |
96 | ||
c60823bb JB |
97 | %prep |
98 | %setup -q -n oslosphinx-%{version} | |
99 | ||
100 | %build | |
101 | %if %{with python2} | |
6ff271e7 | 102 | %py_build |
c60823bb JB |
103 | %endif |
104 | ||
105 | %if %{with python3} | |
6ff271e7 JB |
106 | %py3_build |
107 | %endif | |
108 | ||
109 | %if %{with doc} | |
110 | sphinx-build-3 -b html doc/source doc/_build/html | |
c60823bb JB |
111 | %endif |
112 | ||
113 | %install | |
114 | rm -rf $RPM_BUILD_ROOT | |
115 | ||
116 | %if %{with python2} | |
117 | %py_install | |
6ff271e7 | 118 | |
c60823bb JB |
119 | %py_postclean |
120 | %endif | |
121 | ||
122 | %if %{with python3} | |
123 | %py3_install | |
124 | %endif | |
125 | ||
126 | %clean | |
127 | rm -rf $RPM_BUILD_ROOT | |
128 | ||
129 | %if %{with python2} | |
130 | %files | |
131 | %defattr(644,root,root,755) | |
132 | %doc AUTHORS ChangeLog README.rst | |
133 | %{py_sitescriptdir}/oslosphinx | |
134 | %{py_sitescriptdir}/oslosphinx-%{version}-py*.egg-info | |
135 | %endif | |
136 | ||
137 | %if %{with python3} | |
138 | %files -n python3-oslosphinx | |
139 | %defattr(644,root,root,755) | |
140 | %doc AUTHORS ChangeLog README.rst | |
141 | %{py3_sitescriptdir}/oslosphinx | |
142 | %{py3_sitescriptdir}/oslosphinx-%{version}-py*.egg-info | |
143 | %endif | |
6ff271e7 JB |
144 | |
145 | %if %{with doc} | |
146 | %files apidocs | |
147 | %defattr(644,root,root,755) | |
148 | %doc doc/_build/html/{_static,*.html,*.js} | |
149 | %endif |