[packages/python3-sphinxcontrib-spelling] - updated to 8.0.1, hacked to allow tests and doc without package already installed
qboosh
qboosh at pld-linux.org
Fri Jul 18 20:58:03 CEST 2025
commit ab448312f6a4bab60585166d789ec74f3bebf050
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri Jul 18 20:59:41 2025 +0200
- updated to 8.0.1, hacked to allow tests and doc without package already installed
python3-sphinxcontrib-spelling.spec | 54 +++++++++++++++++--------------------
1 file changed, 25 insertions(+), 29 deletions(-)
---
diff --git a/python3-sphinxcontrib-spelling.spec b/python3-sphinxcontrib-spelling.spec
index 875d7d5..d0beff2 100644
--- a/python3-sphinxcontrib-spelling.spec
+++ b/python3-sphinxcontrib-spelling.spec
@@ -1,35 +1,32 @@
#
# Conditional build:
%bcond_without doc # Sphinx documentation
-%bcond_with tests # unit tests (requires package already installed and en_US dictionary available via pyenchant)
+%bcond_with tests # unit tests (requires en_US dictionary available via pyenchant)
Summary: Sphinx spell checking extension
Summary(pl.UTF-8): Rozszerzenie Sphinksa do sprawdzania pisowni
Name: python3-sphinxcontrib-spelling
-Version: 8.0.0
-Release: 3
+Version: 8.0.1
+Release: 1
License: BSD
Group: Libraries/Python
#Source0Download: https://pypi.org/simple/sphinxcontrib-spelling/
-Source0: https://files.pythonhosted.org/packages/source/s/sphinxcontrib-spelling/sphinxcontrib-spelling-%{version}.tar.gz
-# Source0-md5: f1ff5b879a09b95297bbb55fd9c93c78
+Source0: https://files.pythonhosted.org/packages/source/s/sphinxcontrib-spelling/sphinxcontrib_spelling-%{version}.tar.gz
+# Source0-md5: d115edb60f36af9feebda80c0ebd3038
URL: https://pypi.org/project/sphinxcontrib-spelling/
-BuildRequires: python3-modules >= 1:3.7
+BuildRequires: python3-build
+BuildRequires: python3-installer
+BuildRequires: python3-modules >= 1:3.10
BuildRequires: python3-setuptools >= 1:61
BuildRequires: python3-setuptools_scm >= 6.2
-BuildRequires: python3-toml
%if %{with tests}
BuildRequires: python3-Sphinx >= 3.0.0
-BuildRequires: python3-fixtures >= 3.0.0
-%if "%{py3_ver}" == "3.7"
-BuildRequires: python3-importlib_metadata >= 1.7.0
-%endif
BuildRequires: python3-pyenchant >= 3.1.1
BuildRequires: python3-pytest
-BuildRequires: python3-sphinxcontrib-spelling
+BuildRequires: python3-requests >= 2.32.3
%endif
BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.714
+BuildRequires: rpmbuild(macros) >= 2.044
%if %{with doc} || %{with tests}
# en_US dict for enchant
BuildRequires: aspell-en
@@ -41,10 +38,9 @@ BuildRequires: enchant2-aspell
%endif
%if %{with doc}
BuildRequires: python3-pyenchant >= 3.1.1
-BuildRequires: python3-sphinxcontrib-spelling
BuildRequires: sphinx-pdg >= 3.0.0
%endif
-Requires: python3-modules >= 1:3.7
+Requires: python3-modules >= 1:3.10
Requires: python3-sphinxcontrib
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -71,43 +67,43 @@ API documentation for Python sphinxcontrib-spelling module.
Dokumentacja API modułu Pythona sphinxcontrib-spelling.
%prep
-%setup -q -n sphinxcontrib-spelling-%{version}
-
-cat >setup.py <<EOF
-from setuptools import setup
-setup()
-EOF
+%setup -q -n sphinxcontrib_spelling-%{version}
%build
-%py3_build
+%py3_build_pyproject
+
+# PYTHONPATH must be exported for some tests to work
+# use python -S + explicit site module dirs after our path to avoid catching
+# sphinxcontrib namespace by site-packages/sphinxcontrib/__init__.py
+export PYTHONPATH=$(pwd):%{py3_sitedir}:%{py3_sitescriptdir}
%if %{with tests}
+# test_pypi_filter_factory uses network to access pypi.org
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-PYTHONPATH=$(pwd) \
-%{__python3} -m pytest tests
+%{__python3} -m pytest tests -k 'not test_pypi_filter_factory'
%endif
%if %{with doc}
# enable spell checking to additionally verify particular
# python+sphinx+sphinxcontrib.spelling combo
ENABLE_SPELLING=1 \
-PYTHONPATH=$(pwd) \
-%{__make} -C docs html
+%{__make} -C docs html \
+ SPHINXBUILD="%{__python3} -S -m sphinx"
%endif
%install
rm -rf $RPM_BUILD_ROOT
-%py3_install
+%py3_install_pyproject
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc AUTHORS LICENSE README
+%doc LICENSE README
%{py3_sitescriptdir}/sphinxcontrib/spelling
-%{py3_sitescriptdir}/sphinxcontrib_spelling-%{version}-py*.egg-info
+%{py3_sitescriptdir}/sphinxcontrib_spelling-%{version}.dist-info
%if %{with doc}
%files apidocs
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-sphinxcontrib-spelling.git/commitdiff/ab448312f6a4bab60585166d789ec74f3bebf050
More information about the pld-cvs-commit
mailing list