]> git.pld-linux.org Git - packages/sphinx-pdg.git/blob - sphinx-pdg.spec
- updated to 3.5.4
[packages/sphinx-pdg.git] / sphinx-pdg.spec
1 # there are sphinx.spec, sphinx2.spec...  Sphinx.spec is too confusing
2 # therefore the name for this package is sphinx-pdg (pdg - python
3 # documentation generator)
4 # NOTE: for last python2 version see python-Sphinx.spec
5
6 #
7 # Conditional build:
8 %bcond_without  doc             # documentation
9 %bcond_with     tests           # unit tests (some need network)
10
11 Summary:        Sphinx - Python documentation generator
12 Summary(pl.UTF-8):      Sphinx - narzędzie do tworzenia dokumentacji dla Pythona
13 Name:           sphinx-pdg
14 Version:        3.5.4
15 Release:        1
16 License:        BSD
17 Group:          Development/Languages/Python
18 #Source0Download: https://pypi.org/simple/Sphinx/
19 Source0:        https://files.pythonhosted.org/packages/source/S/Sphinx/Sphinx-%{version}.tar.gz
20 # Source0-md5:  dd46088ebc01f6f721ee7618df680d68
21 Patch0:         float-ver.patch
22 Patch1:         Sphinx-jinja3.patch
23 Patch2:         Sphinx-docutils.patch
24 URL:            http://www.sphinx-doc.org/
25 %if %{with tests} && %(locale -a | grep -q '^C\.utf8$'; echo $?)
26 BuildRequires:  glibc-localedb-all
27 %endif
28 BuildRequires:  python3-babel >= 1.3
29 BuildRequires:  python3-devel >= 1:3.5
30 BuildRequires:  python3-modules >= 1:3.5
31 BuildRequires:  python3-setuptools >= 1:7.0
32 %if %{with tests}
33 BuildRequires:  python3-Cython
34 BuildRequires:  python3-alabaster >= 0.7
35 BuildRequires:  python3-alabaster < 0.8
36 BuildRequires:  python3-docutils >= 0.12
37 # for lint only (mypy)
38 #BuildRequires: python3-docutils-stubs
39 # for lint, not run by pytest
40 #BuildRequires: python3-flake8 >= 3.5.0
41 BuildRequires:  python3-html5lib
42 # for lint
43 #BuildRequires: python3-isort
44 BuildRequires:  python3-imagesize
45 BuildRequires:  python3-jinja2 >= 2.3
46 # for lint only, not run by pytest
47 #BuildRequires: python3-mypy >= 0.800
48 BuildRequires:  python3-packaging
49 BuildRequires:  python3-pygments >= 2.0
50 BuildRequires:  python3-pytest >= 3.0
51 # for coverage tests only
52 #BuildRequires: python3-pytest-cov
53 BuildRequires:  python3-requests >= 2.5.0
54 BuildRequires:  python3-six >= 1.5
55 BuildRequires:  python3-snowballstemmer >= 1.1
56 BuildRequires:  python3-sphinxcontrib-applehelp
57 BuildRequires:  python3-sphinxcontrib-devhelp
58 BuildRequires:  python3-sphinxcontrib-jsmath
59 BuildRequires:  python3-sphinxcontrib-htmlhelp
60 BuildRequires:  python3-sphinxcontrib-serializinghtml
61 BuildRequires:  python3-sphinxcontrib-qthelp
62 %if "%{py3_ver}" < "3.8"
63 BuildRequires:  python3-typed_ast
64 %endif
65 %endif
66 %if %{with doc}
67 BuildRequires:  python3-sphinxcontrib-applehelp
68 BuildRequires:  python3-sphinxcontrib-devhelp
69 BuildRequires:  python3-sphinxcontrib-htmlhelp
70 BuildRequires:  python3-sphinxcontrib-qthelp
71 BuildRequires:  python3-sphinxcontrib-serializinghtml
72 BuildRequires:  python3-sphinxcontrib-websupport
73 %endif
74 BuildRequires:  rpm-pythonprov
75 BuildRequires:  rpmbuild(macros) >= 1.714
76 BuildRequires:  sed >= 4.0
77 %if %{with tests}
78 # for test_build_latex.py (disabled now)
79 #BuildRequires: texlive-luatex
80 #BuildRequires: texlive-xetex
81 %endif
82 Provides:       sphinx-pdg-3 = %{version}-%{release}
83 Requires:       python3-Sphinx = %{version}-%{release}
84 Obsoletes:      sphinx-pdg-3 < 3
85 BuildArch:      noarch
86 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
87
88 %description
89 Sphinx is a tool that makes it easy to create intelligent and
90 beautiful documentation for Python projects (or other documents
91 consisting of multiple reStructuredText sources), written by Georg
92 Brandl. It was originally created to translate the new Python
93 documentation, but has now been cleaned up in the hope that it will be
94 useful to many other projects.
95
96 %description -l pl.UTF-8
97 Sphinx to narzędzie ułatwiające tworzenie inteligentnej i ładnej
98 dokumentacji dla projektów w Pythonie (lub innych dokumentów
99 składających się z wielu źródeł w formacie reStructuredText), napisane
100 przez Georga Brandla. Pierwotnie powstało do tłumaczenia nowej
101 dokumentacji Pythona, ale potem zostało wyczyszczone w nadziei, że
102 będzie przydatne dla wielu innych projektów.
103
104 %package -n python3-Sphinx
105 Summary:        Sphinx Python documentation generator (Python 3.x modules)
106 Summary(pl.UTF-8):      Sphinx - narzędzie do tworzenia dokumentacji dla Pythona (moduły Pythona 3.x)
107 Group:          Development/Languages/Python
108 Requires:       python3-alabaster >= 0.7
109 Requires:       python3-modules >= 1:3.5
110 Requires:       python3-devel-tools
111 Conflicts:      sphinx-pdg-3 < 1.0.7-2
112
113 %description -n python3-Sphinx
114 Sphinx Python documentation generator (Python 3.x modules).
115
116 For command-line utilities, see sphinx-pdg-3 package.
117
118 %description -n python3-Sphinx -l pl.UTF-8
119 Sphinx - narzędzie do tworzenia dokumentacji dla Pythona (moduły
120 Pythona 3.x).
121
122 Narzędzia działające z linii poleceń znajdują się w pakiecie
123 sphinx-pdg-3.
124
125 %package doc
126 Summary:        Documentation for Sphinx Python documentation generator
127 Summary(pl.UTF-8):      Dokumentacja do generatora dokumentacji pythonowej Sphinx
128 Group:          Documentation
129
130 %description doc
131 Documentation for Sphinx Python documentation generator.
132
133 %description doc -l pl.UTF-8
134 Dokumentacja do generatora dokumentacji pythonowej Sphinx.
135
136 %prep
137 %setup -q -n Sphinx-%{version}
138 %patch0 -p1
139 %patch1 -p1
140 %patch2 -p1
141
142 # needs python-babel with at least de,en,ja locales installed
143 %{__rm} tests/test_util_i18n.py
144 # requires various latex variants, fails in a ways difficult to diagnose
145 %{__rm} tests/test_build_latex.py
146
147 %build
148 %py3_build
149 %{__rm} -r sphinx/__pycache__
150
151 %if %{with tests}
152 LC_ALL=C.UTF-8 \
153 PYTHONPATH=$(pwd) \
154 %{__python3} -m pytest tests
155 %endif
156
157 %if %{with doc}
158 PYTHONPATH=$(pwd) \
159 %{__make} -C doc -j1 html man
160 %endif
161
162 %install
163 rm -rf $RPM_BUILD_ROOT
164
165 %py3_install
166
167 %{__rm} -r sphinx/__pycache__
168
169 for f in $RPM_BUILD_ROOT%{_bindir}/*; do
170         %{__mv} "${f}" "${f}-3"
171         ln -sf "$(basename "$f")-3" "$f"
172 done
173
174 %if %{with doc}
175 install -d $RPM_BUILD_ROOT%{_mandir}/man1
176 cp -p doc/_build/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
177 for f in $RPM_BUILD_ROOT%{_mandir}/man1/*.1 ; do
178         ln "$f" $RPM_BUILD_ROOT%{_mandir}/man1/$(basename "$f" .1)-3.1
179 done
180 %endif
181
182 %clean
183 rm -rf $RPM_BUILD_ROOT
184
185 %files
186 %defattr(644,root,root,755)
187 %attr(755,root,root) %{_bindir}/sphinx-apidoc
188 %attr(755,root,root) %{_bindir}/sphinx-autogen
189 %attr(755,root,root) %{_bindir}/sphinx-build
190 %attr(755,root,root) %{_bindir}/sphinx-quickstart
191 %attr(755,root,root) %{_bindir}/sphinx-apidoc-3
192 %attr(755,root,root) %{_bindir}/sphinx-autogen-3
193 %attr(755,root,root) %{_bindir}/sphinx-build-3
194 %attr(755,root,root) %{_bindir}/sphinx-quickstart-3
195 %if %{with doc}
196 %{_mandir}/man1/sphinx-all.1*
197 %{_mandir}/man1/sphinx-apidoc.1*
198 %{_mandir}/man1/sphinx-autogen.1*
199 %{_mandir}/man1/sphinx-build.1*
200 %{_mandir}/man1/sphinx-quickstart.1*
201 %{_mandir}/man1/sphinx-all-3.1*
202 %{_mandir}/man1/sphinx-apidoc-3.1*
203 %{_mandir}/man1/sphinx-autogen-3.1*
204 %{_mandir}/man1/sphinx-build-3.1*
205 %{_mandir}/man1/sphinx-quickstart-3.1*
206 %endif
207
208 %files -n python3-Sphinx
209 %defattr(644,root,root,755)
210 %doc AUTHORS CHANGES EXAMPLES LICENSE README.rst
211 %{py3_sitescriptdir}/sphinx
212 %{py3_sitescriptdir}/Sphinx-%{version}-py*.egg-info
213
214 %if %{with doc}
215 %files doc
216 %defattr(644,root,root,755)
217 %doc doc/_build/html/{_downloads,_images,_modules,_static,development,extdev,man,usage,*.html,*.js}
218 %endif
This page took 0.081049 seconds and 3 git commands to generate.