[packages/codespell] Initial
arekm
arekm at pld-linux.org
Mon Sep 14 15:02:18 CEST 2026
commit cb39ed68e4250d1dff7f5b9e3534a6c193789ed1
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Mon Sep 14 15:01:33 2026 +0200
Initial
codespell.spec | 118 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 118 insertions(+)
---
diff --git a/codespell.spec b/codespell.spec
new file mode 100644
index 0000000..06700bf
--- /dev/null
+++ b/codespell.spec
@@ -0,0 +1,118 @@
+#
+# Conditional build:
+%bcond_without tests # unit tests
+
+Summary: Fix common misspellings in text files
+Summary(pl.UTF-8): Poprawianie typowych literówek w plikach tekstowych
+Name: codespell
+Version: 2.4.3
+Release: 1
+License: GPL v2 (code), CC-BY-SA v3.0 (dictionaries)
+Group: Development/Tools
+#Source0Download: https://pypi.org/simple/codespell/
+Source0: https://files.pythonhosted.org/packages/source/c/%{name}/%{name}-%{version}.tar.gz
+# Source0-md5: bc499322098d0f77d061dc3a9949f5a7
+URL: https://github.com/codespell-project/codespell
+BuildRequires: help2man
+BuildRequires: python3-build
+BuildRequires: python3-installer
+BuildRequires: python3-modules >= 1:3.9
+BuildRequires: python3-setuptools >= 1:77
+BuildRequires: python3-setuptools_scm >= 6.2
+%if %{with tests}
+BuildRequires: python3-chardet
+BuildRequires: python3-pytest >= 6
+BuildRequires: python3-pytest-dependency
+%endif
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 2.044
+Requires: python3-%{name} = %{version}-%{release}
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+codespell finds and fixes common misspellings in text files. It is
+designed primarily for checking misspelled words in source code, but it
+can be used with other files as well. Instead of checking spelling
+against a full dictionary it looks for entries from a dictionary of
+common typos, so it does not need to know the language of the text and
+rarely reports false positives on code.
+
+This package contains the command line utility.
+
+%description -l pl.UTF-8
+codespell wyszukuje i poprawia typowe literówki w plikach tekstowych.
+Powstał z myślą przede wszystkim o kodzie źródłowym, ale nadaje się
+także do innych plików. Zamiast sprawdzać pisownię przy użyciu pełnego
+słownika języka, wyszukuje wpisy ze słownika typowych błędów, dzięki
+czemu nie musi znać języka tekstu i rzadko zgłasza fałszywe alarmy w
+kodzie.
+
+Ten pakiet zawiera narzędzie wiersza poleceń.
+
+%package -n python3-%{name}
+Summary: Python 3 library for fixing common misspellings in text files
+Summary(pl.UTF-8): Biblioteka Pythona 3 do poprawiania typowych literówek w plikach tekstowych
+Group: Libraries/Python
+Requires: python3-modules >= 1:3.9
+# for --hard-encoding-detection
+Suggests: python3-chardet
+
+%description -n python3-%{name}
+codespell finds and fixes common misspellings in text files. It is
+designed primarily for checking misspelled words in source code, but it
+can be used with other files as well. Instead of checking spelling
+against a full dictionary it looks for entries from a dictionary of
+common typos, so it does not need to know the language of the text and
+rarely reports false positives on code.
+
+This package contains the Python 3 library along with the dictionaries.
+
+%description -n python3-%{name} -l pl.UTF-8
+codespell wyszukuje i poprawia typowe literówki w plikach tekstowych.
+Powstał z myślą przede wszystkim o kodzie źródłowym, ale nadaje się
+także do innych plików. Zamiast sprawdzać pisownię przy użyciu pełnego
+słownika języka, wyszukuje wpisy ze słownika typowych błędów, dzięki
+czemu nie musi znać języka tekstu i rzadko zgłasza fałszywe alarmy w
+kodzie.
+
+Ten pakiet zawiera bibliotekę Pythona 3 wraz ze słownikami.
+
+%prep
+%setup -q
+
+%build
+%py3_build_pyproject
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%py3_install_pyproject
+
+install -d $RPM_BUILD_ROOT%{_mandir}/man1
+# upstream builds the man page this way; its codespell.1.include is not shipped in the sdist
+PYTHONPATH=$RPM_BUILD_ROOT%{py3_sitescriptdir} \
+help2man --no-info --name='detect spelling mistakes in source code' \
+ $RPM_BUILD_ROOT%{_bindir}/%{name} > $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1
+
+%if %{with tests}
+# upstream addopts ask for coverage and a junit report, neither wanted here
+PATH=$RPM_BUILD_ROOT%{_bindir}:$PATH \
+PYTHONPATH=$RPM_BUILD_ROOT%{py3_sitescriptdir} \
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+%{__python3} -m pytest -p pytest_dependency -o addopts= codespell_lib/tests
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/codespell
+%{_mandir}/man1/codespell.1*
+
+%files -n python3-%{name}
+%defattr(644,root,root,755)
+%doc COPYING README.rst
+%{py3_sitescriptdir}/codespell_lib
+%{py3_sitescriptdir}/codespell-%{version}.dist-info
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/codespell.git/commitdiff/cb39ed68e4250d1dff7f5b9e3534a6c193789ed1
More information about the pld-cvs-commit
mailing list