Name python-inflect
Description Correctly generate plurals, singular nouns, ordinals, indefinite articles
Version 7.5.0-2
Package Base python-inflect
Homepage https://github.com/jaraco/inflect
Maintainers ['David Runge <dvzrv@archlinux.org>', 'Jelle van der Waa <jelle@archlinux.org>']
Contributors []
Distro-repo https://gitlab.archlinux.org/archlinux/packaging/packages/python-inflect
Sources ['inflect-7.5.0.tar.gz::https://github.com/jaraco/inflect/archive/refs/tags/v7.5.0.tar.gz']
Dependencies ['python', 'python-more-itertools', 'python-typeguard', 'python-typing_extensions']
Optional-Dependencies []
Build-Dependencies ['python-build', 'python-installer', 'python-setuptools-scm', 'python-toml', 'python-wheel']
Provides []
Builddate 14-12-2025 19:32:51
Architecture any
Distro-Version
Licenses ['MIT']
Hash 9d0ffecad5197b86c5f02f29e927485ce0efa1c3fa515922b7298b9ce317024a
# Maintainer: David Runge <dvzrv@archlinux.org>

_name=inflect
pkgname=python-inflect
pkgver=7.5.0
pkgrel=2
pkgdesc="Correctly generate plurals, singular nouns, ordinals, indefinite articles"
arch=(any)
url="https://github.com/jaraco/inflect"
license=(MIT)
depends=(
  python
  python-more-itertools
  python-typeguard
  python-typing_extensions
)
makedepends=(
  python-build
  python-installer
  python-setuptools-scm
  python-toml
  python-wheel
)
checkdepends=(
  python-pytest
)
source=($_name-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz)
sha512sums=('139ddfc73ce2f62e781eb2eefe1dc56d51e2af8380b23af1f542f63ec125921ce6cdacfcaf26b0221776ff83d9e4bea728df2dd58e3a2f25e32c6a5f0cc07d25')
b2sums=('81f31bc89abd1d0d0b6f5774b5c83586dab68721f9a77394a3b6f5f0ba3380574e2261bbe7d2086503e6643b70a26e8d9efb46643660dc5125cf4ef9d5b8d8a3')

build() {
  cd $_name-$pkgver
  SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver python -m build --wheel --no-isolation
}

check() {
  local pytest_options=(
    -vv
  )

  cd $_name-$pkgver
  PYTHONPATH="$PWD:$PYTHONPATH" pytest "${pytest_options[@]}"
}

package() {
  cd $_name-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -vDm 644 {NEWS,README}.rst -t "$pkgdir/usr/share/doc/$pkgname/"
  install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
}