From 026a9ac7322ace58f279a0d411d7e6c67a5c4dd4 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 17 Mar 2023 09:55:48 -0400 Subject: [PATCH 1/4] =?UTF-8?q?Don=E2=80=99t=20assume=20%=5Fsmp=5Fmflags?= =?UTF-8?q?=20is=20-j%=5Fsmp=5Fbuild=5Fncpus?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- python-chardet.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python-chardet.spec b/python-chardet.spec index a84cad8..cdddd3e 100644 --- a/python-chardet.spec +++ b/python-chardet.spec @@ -94,7 +94,8 @@ echo "latex_engine = 'xelatex'" >> docs/conf.py %pyproject_wheel %if %{with doc_pdf} -PYTHONPATH="${PWD}" %make_build -C docs latex SPHINXOPTS='%{?_smp_mflags}' +PYTHONPATH="${PWD}" %make_build -C docs latex \ + SPHINXOPTS='-j%{?_smp_build_ncpus}' %make_build -C docs/_build/latex LATEXMKOPTS='-quiet' %endif From ce9ff1d2dcfd6630d98e02666172b63e1c4d00be Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 6 Jul 2023 21:05:56 -0400 Subject: [PATCH 2/4] Use new (rpm 4.17.1+) bcond style --- python-chardet.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-chardet.spec b/python-chardet.spec index cdddd3e..7746f6e 100644 --- a/python-chardet.spec +++ b/python-chardet.spec @@ -2,7 +2,7 @@ # https://bugzilla.redhat.com/show_bug.cgi?id=2006555 for discussion. # # We can generate PDF documentation as a substitute. -%bcond_without doc_pdf +%bcond doc_pdf 1 Name: python-chardet Version: 5.1.0 From 2d53ba6cffc6248f8481459e6ffbd1bf52b32ae3 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 11 Jul 2023 08:13:08 -0400 Subject: [PATCH 3/4] When PDF docs are disabled, omit the -doc subpackage --- python-chardet.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/python-chardet.spec b/python-chardet.spec index 7746f6e..dc600a0 100644 --- a/python-chardet.spec +++ b/python-chardet.spec @@ -2,7 +2,7 @@ # https://bugzilla.redhat.com/show_bug.cgi?id=2006555 for discussion. # # We can generate PDF documentation as a substitute. -%bcond doc_pdf 1 +%bcond doc 1 Name: python-chardet Version: 5.1.0 @@ -31,7 +31,7 @@ BuildArch: noarch BuildRequires: python3-devel -%if %{with doc_pdf} +%if %{with doc} BuildRequires: make BuildRequires: python3dist(sphinx) BuildRequires: python3dist(sphinx-rtd-theme) @@ -93,7 +93,7 @@ echo "latex_engine = 'xelatex'" >> docs/conf.py %build %pyproject_wheel -%if %{with doc_pdf} +%if %{with doc} PYTHONPATH="${PWD}" %make_build -C docs latex \ SPHINXOPTS='-j%{?_smp_build_ncpus}' %make_build -C docs/_build/latex LATEXMKOPTS='-quiet' @@ -113,14 +113,17 @@ install -t '%{buildroot}%{_mandir}/man1' -D -p -m 0644 '%{SOURCE2}' %files -n python3-chardet -f %{pyproject_files} +%if %{without doc} +%doc README.rst +%endif %{_bindir}/chardetect %{_mandir}/man1/chardetect.1* +%if %{with doc} %files doc %license LICENSE %doc README.rst -%if %{with doc_pdf} %doc docs/_build/latex/chardet.pdf %endif From 79352f26ed1b4215b51e1102115c51dfb70853d9 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 1 Aug 2023 21:01:12 -0400 Subject: [PATCH 4/4] Update to 5.2.0 (close RHBZ#2228250) --- .gitignore | 1 + python-chardet.spec | 2 +- sources | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index a4332f7..9a81b57 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /chardet-4.0.0-filtered.tar.xz /chardet-5.0.0-filtered.tar.xz /chardet-5.1.0-filtered.tar.xz +/chardet-5.2.0-filtered.tar.xz diff --git a/python-chardet.spec b/python-chardet.spec index dc600a0..dc60893 100644 --- a/python-chardet.spec +++ b/python-chardet.spec @@ -5,7 +5,7 @@ %bcond doc 1 Name: python-chardet -Version: 5.1.0 +Version: 5.2.0 Release: %autorelease Summary: Python character encoding detector diff --git a/sources b/sources index 75041bb..44e7115 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (chardet-5.1.0-filtered.tar.xz) = 7682933114ae0a13534af95d2afdf297cd5f6003f9d6430fbcf63c080c175e7859de62efcf990f392f590da93b0a7979bdf00134b52f6d45198b253a030056f0 +SHA512 (chardet-5.2.0-filtered.tar.xz) = 4f865b958503596cdaf690d0cb586c7c477419ca528b4701d93577c34764fcbab2246d79b82fe25a06246c59cedb9344ec332540efb76cc02d49158fb4903974