archrelease: copy trunk to community-any
[ArchLinux/community.git] / python-pydocstyle / trunk / PKGBUILD
blobce81e8b9d972fa10411b5ff67fb7e1ff131ca3c6
1 # Maintainer: Morten Linderud <foxboron@archlinux.org>
3 pkgname=python-pydocstyle
4 pkgver=6.3.0
5 pkgrel=3
6 pkgdesc="Docstring style checker"
7 arch=("any")
8 url="http://www.pydocstyle.org/"
9 license=("MIT")
10 depends=("python-snowballstemmer")
11 makedepends=("python-build" "python-installer" "python-poetry-core")
12 checkdepends=("python-pytest" "python-pytest-runner" "python-pip" "python-snowballstemmer")
13 source=("$pkgname-$pkgver.tar.gz::https://github.com/PyCQA/pydocstyle/archive/${pkgver}.tar.gz")
14 sha256sums=('29ed0e8b1abe5f4590132f456b6f9cbf0866b89fabf836bc9474fde706e2e13e')
16 prepare() {
17     cd "pydocstyle-${pkgver}"
18     # Fix version number in metadata
19     sed -e "s|^version = .*|version = \"$pkgver\"|" -i pyproject.toml
22 build() {
23     cd "pydocstyle-${pkgver}"
24     python -m build --wheel --no-isolation
27 check() {
28     cd "pydocstyle-${pkgver}"
29     PYTHONPATH="$PWD"/src \
30     pytest -k 'not test_integration'
33 package() {
34     cd "pydocstyle-${pkgver}"
35     python -m installer --destdir="${pkgdir}/" dist/*.whl
36     install -Dm644 LICENSE-MIT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"