]> git.pld-linux.org Git - packages/python-openstackdocstheme.git/blob - python-openstackdocstheme.spec
rebuild with python 3.10
[packages/python-openstackdocstheme.git] / python-openstackdocstheme.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5 %bcond_with     doc     # Sphinx documentation
6 %bcond_with     tests   # test target (not included in dist tarball?)
7
8 Summary:        OpenStack Sphinx extensions
9 Summary(pl.UTF-8):      Rozszerzenia modułu Sphinx z projektu OpenStack
10 Name:           python-openstackdocstheme
11 Version:        1.31.2
12 Release:        4
13 License:        Apache v2.0
14 Group:          Development/Languages/Python
15 #Source0Download: https://pypi.org/simple/openstackdocstheme/
16 Source0:        https://files.pythonhosted.org/packages/source/o/openstackdocstheme/openstackdocstheme-%{version}.tar.gz
17 # Source0-md5:  24ff0af7dd233e78e9f388e7e0876426
18 URL:            https://docs.openstack.org/openstackdocstheme/
19 %if %{with python2}
20 BuildRequires:  python-devel >= 1:2.7
21 BuildRequires:  python-pbr >= 2.0.0
22 BuildRequires:  python-setuptools
23 %if %{with tests}
24 BuildRequires:  python-Sphinx >= 1.6.2
25 BuildRequires:  python-bindep
26 BuildRequires:  python-dulwich >= 0.15.0
27 BuildRequires:  python-hacking >= 1.1.0
28 BuildRequires:  python-hacking < 1.2.0
29 %endif
30 %endif
31 %if %{with python3}
32 BuildRequires:  python3-devel >= 1:3.5
33 BuildRequires:  python3-pbr >= 2.0.0
34 BuildRequires:  python3-setuptools
35 %if %{with tests}
36 BuildRequires:  python3-Sphinx >= 1.6.2
37 BuildRequires:  python3-bindep
38 BuildRequires:  python3-dulwich >= 0.15.0
39 BuildRequires:  python3-hacking >= 1.1.0
40 BuildRequires:  python3-hacking < 1.2.0
41 %endif
42 %endif
43 BuildRequires:  rpm-pythonprov
44 BuildRequires:  rpmbuild(macros) >= 1.714
45 %if %{with doc}
46 BuildRequires:  python3-os-api-ref >= 1.4.0
47 BuildRequires:  python3-reno >= 2.5.0
48 BuildRequires:  sphinx-pdg-3 >= 1.6.6
49 %endif
50 Requires:       python-modules >= 1:2.7
51 BuildArch:      noarch
52 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53
54 %description
55 Theme and extension support for Sphinx documentation from the
56 OpenStack project.
57
58 %description -l pl.UTF-8
59 Motyw oraz rozszerzenia wspomagające tworzenie dokumentacji w systemie
60 Sphinx w projekcie OpenStack.
61
62 %package -n python3-openstackdocstheme
63 Summary:        OpenStack Sphinx extensions
64 Summary(pl.UTF-8):      Rozszerzenia modułu Sphinx z projektu OpenStack
65 Group:          Development/Languages/Python
66 Requires:       python3-modules >= 1:3.5
67
68 %description -n python3-openstackdocstheme
69 Theme and extension support for Sphinx documentation from the
70 OpenStack project.
71
72 %description -n python3-openstackdocstheme -l pl.UTF-8
73 Motyw oraz rozszerzenia wspomagające tworzenie dokumentacji w systemie
74 Sphinx w projekcie OpenStack.
75
76 %prep
77 %setup -q -n openstackdocstheme-%{version}
78
79 %build
80 %if %{with python2}
81 %py_build
82 %endif
83
84 %if %{with python3}
85 %py3_build
86 %endif
87
88 %if %{with doc}
89 sphinx-build-3 -b html doc/source doc-build/html/doc
90 sphinx-build-3 -b html api-ref/source doc-build/html/api-ref
91 sphinx-build-3 -b html releasenotes/source doc-build/html/releasenotes
92 %endif
93
94 %install
95 rm -rf $RPM_BUILD_ROOT
96
97 %if %{with python2}
98 %py_install
99
100 %py_postclean
101 %endif
102
103 %if %{with python3}
104 %py3_install
105 %endif
106
107 # too custom scripts
108 %{__rm} $RPM_BUILD_ROOT%{_bindir}/docstheme-{build-pdf,build-translated.sh,lang-display-name.py}
109
110 %clean
111 rm -rf $RPM_BUILD_ROOT
112
113 %if %{with python2}
114 %files
115 %defattr(644,root,root,755)
116 %doc AUTHORS ChangeLog README.rst
117 %{py_sitescriptdir}/openstackdocstheme
118 %{py_sitescriptdir}/openstackdocstheme-%{version}-py*.egg-info
119 %endif
120
121 %if %{with python3}
122 %files -n python3-openstackdocstheme
123 %defattr(644,root,root,755)
124 %doc AUTHORS ChangeLog README.rst
125 %{py3_sitescriptdir}/openstackdocstheme
126 %{py3_sitescriptdir}/openstackdocstheme-%{version}-py*.egg-info
127 %endif
This page took 0.191994 seconds and 3 git commands to generate.