Files
MSYS2-packages/python-pluggy/PKGBUILD
2023-08-10 08:44:26 +02:00

50 lines
1.3 KiB
Bash

# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
_realname=pluggy
pkgbase=python-pluggy
pkgname=(python-${_realname})
pkgver=1.1.0
pkgrel=1
pkgdesc="Plugin and hook calling mechanisms for python"
arch=('any')
url="https://github.com/pytest-dev/pluggy"
license=('spdx:MIT')
depends=('python')
makedepends=(
'python-setuptools'
'python-setuptools-scm'
'python-wheel'
'python-build'
'python-installer'
)
checkdepends=('python-pytest-runner')
provides=("python3-${_realname}")
replaces=("python3-${_realname}")
conflicts=("python3-${_realname}")
source=("${pkgbase}-${pkgver}.tar.gz::https://github.com/pytest-dev/pluggy/archive/${pkgver}.tar.gz")
sha512sums=('c55cbd51c67fbcdee0c6911795c9cc21a506ce8aa8dbfcbc1195d06cf35ef5a82974406ec1077c9caf232a584a393b044a9fb5fc66ee81802be0e61aa76b3751')
prepare() {
# Set version for setuptools_scm
export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
}
build() {
cd "${srcdir}/${_realname}-${pkgver}"
python -m build --wheel --skip-dependency-check --no-isolation
}
check() {
cd "${srcdir}/${_realname}-${pkgver}"
python -m pytest
}
package() {
cd "${srcdir}/${_realname}-${pkgver}"
python -m installer --destdir="${pkgdir}" dist/*.whl
install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}