* update codespell to 2.2.5-2
This commit is contained in:
parent
6ff3331053
commit
cb265be4e2
@ -4,21 +4,37 @@
|
|||||||
|
|
||||||
pkgname=codespell
|
pkgname=codespell
|
||||||
pkgver=2.2.5
|
pkgver=2.2.5
|
||||||
pkgrel=1
|
pkgrel=2
|
||||||
pkgdesc='check code for common misspellings'
|
pkgdesc='check code for common misspellings'
|
||||||
arch=(any)
|
arch=(any)
|
||||||
url='https://github.com/codespell-project/codespell'
|
url='https://github.com/codespell-project/codespell'
|
||||||
license=('GPL2')
|
license=('GPL2')
|
||||||
depends=('python-chardet')
|
depends=('python-chardet')
|
||||||
makedepends=('python-build' 'python-installer' 'python-wheel' 'python-setuptools-scm')
|
makedepends=('python-build' 'python-installer' 'python-wheel' 'python-setuptools-scm')
|
||||||
source=("https://pypi.io/packages/source/c/codespell/${pkgname}-${pkgver}.tar.gz")
|
checkdepends=('python-pytest-cov' 'python-pytest-dependency')
|
||||||
sha256sums=('6d9faddf6eedb692bf80c9a94ec13ab4f5fb585aabae5f3750727148d7b5be56')
|
source=("https://pypi.io/packages/source/c/codespell/${pkgname}-${pkgver}.tar.gz"
|
||||||
|
"remove-check-test_command.patch")
|
||||||
|
sha256sums=('6d9faddf6eedb692bf80c9a94ec13ab4f5fb585aabae5f3750727148d7b5be56'
|
||||||
|
'17a5390c0123480c794d293e0a6b95a9f941ea9d5d9168649746dd55faf0b833')
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
cd "${pkgname}-${pkgver}"
|
||||||
|
|
||||||
|
# Remove the "test_command" check which makes check() fail
|
||||||
|
# https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/development/tools/codespell/default.nix#L43
|
||||||
|
patch -Np1 <"${srcdir}"/remove-check-test_command.patch
|
||||||
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd "${pkgname}-${pkgver}"
|
cd "${pkgname}-${pkgver}"
|
||||||
python -m build --wheel --no-isolation
|
python -m build --wheel --no-isolation
|
||||||
}
|
}
|
||||||
|
|
||||||
|
check() {
|
||||||
|
cd "${pkgname}-${pkgver}"
|
||||||
|
pytest
|
||||||
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
cd "${pkgname}-${pkgver}"
|
cd "${pkgname}-${pkgver}"
|
||||||
python -m installer --destdir="${pkgdir}" dist/*.whl
|
python -m installer --destdir="${pkgdir}" dist/*.whl
|
||||||
|
19
codespell/remove-check-test_command.patch
Normal file
19
codespell/remove-check-test_command.patch
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
diff --git a/codespell_lib/tests/test_basic.py b/codespell_lib/tests/test_basic.py
|
||||||
|
index 9c35ce09..1d0ea656 100644
|
||||||
|
--- a/codespell_lib/tests/test_basic.py
|
||||||
|
+++ b/codespell_lib/tests/test_basic.py
|
||||||
|
@@ -72,14 +72,6 @@ def run_codespell(
|
||||||
|
return count
|
||||||
|
|
||||||
|
|
||||||
|
-def test_command(tmp_path: Path) -> None:
|
||||||
|
- """Test running the codespell executable."""
|
||||||
|
- # With no arguments does "."
|
||||||
|
- assert run_codespell(cwd=tmp_path) == 0
|
||||||
|
- (tmp_path / "bad.txt").write_text("abandonned\nAbandonned\nABANDONNED\nAbAnDoNnEd")
|
||||||
|
- assert run_codespell(cwd=tmp_path) == 4
|
||||||
|
-
|
||||||
|
-
|
||||||
|
def test_basic(
|
||||||
|
tmp_path: Path,
|
||||||
|
capsys: pytest.CaptureFixture[str],
|
Loading…
x
Reference in New Issue
Block a user