From e2b9a4ed2f354a59c59c7002637c24e2625ba727 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 6 Jun 2023 11:16:55 -0400 Subject: [PATCH] Drop and Obsolete PDF docs and -doc subpackage --- python-chardet.spec | 44 ++++---------------------------------------- 1 file changed, 4 insertions(+), 40 deletions(-) diff --git a/python-chardet.spec b/python-chardet.spec index cdddd3e..f9b3867 100644 --- a/python-chardet.spec +++ b/python-chardet.spec @@ -1,9 +1,3 @@ -# Sphinx-generated HTML documentation is not suitable for packaging; see -# https://bugzilla.redhat.com/show_bug.cgi?id=2006555 for discussion. -# -# We can generate PDF documentation as a substitute. -%bcond_without doc_pdf - Name: python-chardet Version: 5.1.0 Release: %autorelease @@ -31,16 +25,6 @@ BuildArch: noarch BuildRequires: python3-devel -%if %{with doc_pdf} -BuildRequires: make -BuildRequires: python3dist(sphinx) -BuildRequires: python3dist(sphinx-rtd-theme) -BuildRequires: python3-sphinx-latex -BuildRequires: latexmk -BuildRequires: tex-xetex-bin -BuildRequires: /usr/bin/xindy -%endif - %global common_description %{expand: Chardet: The Universal Character Encoding Detector @@ -68,23 +52,16 @@ disabled.} %package -n python3-chardet Summary: %{summary} +# We have elected to stop building Sphinx-generated PDF documentation. +Obsoletes: python-chardet-doc < 5.1.0-4 + %description -n python3-chardet %{common_description} -%package doc -Summary: Documentation for python-chardet - -%description doc -%{common_description} - - %prep %autosetup -n chardet-%{version} -# Since pdflatex cannot handle Unicode inputs in general: -echo "latex_engine = 'xelatex'" >> docs/conf.py - %generate_buildrequires %pyproject_buildrequires @@ -93,12 +70,6 @@ echo "latex_engine = 'xelatex'" >> docs/conf.py %build %pyproject_wheel -%if %{with doc_pdf} -PYTHONPATH="${PWD}" %make_build -C docs latex \ - SPHINXOPTS='-j%{?_smp_build_ncpus}' -%make_build -C docs/_build/latex LATEXMKOPTS='-quiet' -%endif - %install %pyproject_install @@ -113,17 +84,10 @@ install -t '%{buildroot}%{_mandir}/man1' -D -p -m 0644 '%{SOURCE2}' %files -n python3-chardet -f %{pyproject_files} +%doc README.rst %{_bindir}/chardetect %{_mandir}/man1/chardetect.1* -%files doc -%license LICENSE -%doc README.rst -%if %{with doc_pdf} -%doc docs/_build/latex/chardet.pdf -%endif - - %changelog %autochangelog