50 lines
1.3 KiB
Bash
50 lines
1.3 KiB
Bash
# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
|
|
|
|
_realname=pluggy
|
|
pkgbase=python-pluggy
|
|
pkgname=(python-${_realname})
|
|
pkgver=1.0.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=('88f1180d2607115d6516cba07fa7c1f0e284d1e16fb7ed42c4a05d5d2b0dc1419d2bdbdadc34e2eb7f6b0cc9fc97715c6b184542c01f6bc33242a872c46d7903')
|
|
|
|
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
|
|
}
|