Группа :: Development/Tools
Пакет: codespell
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
# SPDX-License-Identifier: GPL-2.0-only
%define _unpackaged_files_terminate_build 1
%define _stripped_files_terminate_build 1
Name: codespell
Version: 2.2.4
Release: alt1
Summary: Check code for common misspellings
Group: Development/Tools
License: GPL-2.0-only
Url: https://github.com/codespell-project/codespell
Source: %name-%version.tar
BuildArch: noarch
BuildRequires(pre): rpm-build-python3
BuildRequires: help2man
BuildRequires: python3-devel >= 3.6
BuildRequires: python3-module-setuptools_scm
BuildRequires: python3-module-wheel
%description
Fix common misspellings in text files. It's designed primarily for checking
misspelled words in source code, but it can be used with other files as well.
%prep
%setup
subst 's/help2man/& -L en_US.UTF-8 --no-discard-stderr/' Makefile
%build
export SETUPTOOLS_SCM_PRETEND_VERSION=%version
%pyproject_build
make codespell.1
%install
export SETUPTOOLS_SCM_PRETEND_VERSION=%version
%pyproject_install
install -D -m644 %name.1 %buildroot%_man1dir/%name.1
# Compatibility with scripts/checkpatch.pl
ln -sf -r %buildroot%python3_sitelibdir/codespell_lib/data %buildroot%_datadir/codespell
# I think we don't need this:
rm -rf %buildroot%python3_sitelibdir/codespell_lib/data/{__pycache__,__init__.py}
%check
cd %buildroot
export PYTHONPATH=%buildroot%python3_sitelibdir
PATH=%buildroot%_bindir:$PATH
codespell --version
echo Millenium > /tmp/example.txt
! codespell /tmp/example.txt
codespell --ignore-words-list=millenium /tmp/example.txt
! codespell --summary --write-changes /tmp/example.txt
codespell /tmp/example.txt
grep -qx Millennium /tmp/example.txt
%files
%define _customdocdir %_docdir/%name
%doc COPYING README.rst
%_bindir/%name
%_man1dir/%name.1*
%python3_sitelibdir/*
%_datadir/codespell
%changelog
…
Полный changelog можно просмотреть здесь
%define _unpackaged_files_terminate_build 1
%define _stripped_files_terminate_build 1
Name: codespell
Version: 2.2.4
Release: alt1
Summary: Check code for common misspellings
Group: Development/Tools
License: GPL-2.0-only
Url: https://github.com/codespell-project/codespell
Source: %name-%version.tar
BuildArch: noarch
BuildRequires(pre): rpm-build-python3
BuildRequires: help2man
BuildRequires: python3-devel >= 3.6
BuildRequires: python3-module-setuptools_scm
BuildRequires: python3-module-wheel
%description
Fix common misspellings in text files. It's designed primarily for checking
misspelled words in source code, but it can be used with other files as well.
%prep
%setup
subst 's/help2man/& -L en_US.UTF-8 --no-discard-stderr/' Makefile
%build
export SETUPTOOLS_SCM_PRETEND_VERSION=%version
%pyproject_build
make codespell.1
%install
export SETUPTOOLS_SCM_PRETEND_VERSION=%version
%pyproject_install
install -D -m644 %name.1 %buildroot%_man1dir/%name.1
# Compatibility with scripts/checkpatch.pl
ln -sf -r %buildroot%python3_sitelibdir/codespell_lib/data %buildroot%_datadir/codespell
# I think we don't need this:
rm -rf %buildroot%python3_sitelibdir/codespell_lib/data/{__pycache__,__init__.py}
%check
cd %buildroot
export PYTHONPATH=%buildroot%python3_sitelibdir
PATH=%buildroot%_bindir:$PATH
codespell --version
echo Millenium > /tmp/example.txt
! codespell /tmp/example.txt
codespell --ignore-words-list=millenium /tmp/example.txt
! codespell --summary --write-changes /tmp/example.txt
codespell /tmp/example.txt
grep -qx Millennium /tmp/example.txt
%files
%define _customdocdir %_docdir/%name
%doc COPYING README.rst
%_bindir/%name
%_man1dir/%name.1*
%python3_sitelibdir/*
%_datadir/codespell
%changelog
…
Полный changelog можно просмотреть здесь