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