43 lines
1.5 KiB
Bash
43 lines
1.5 KiB
Bash
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
|
|
# Maintainer: Felix Yan <felixonmars@archlinux.org>
|
|
# Maintainer: Daniel M. Capella <polyzen@archlinux.org>
|
|
# Contributor: Hugo Osvaldo Barrera <hugo@barrera.io>
|
|
|
|
_name=setuptools_scm
|
|
pkgname=python-setuptools-scm
|
|
pkgver=8.1.0
|
|
pkgrel=3
|
|
pkgdesc="Handles managing your python package versions in scm metadata"
|
|
arch=(any)
|
|
url="https://github.com/pypa/setuptools_scm"
|
|
license=('MIT')
|
|
depends=('python-packaging' 'python-setuptools')
|
|
makedepends=('git' 'python-build' 'python-installer' 'python-wheel')
|
|
checkdepends=('mercurial' 'python-pip' 'python-pytest' 'python-rich')
|
|
source=("git+$url.git#tag=v$pkgver")
|
|
b2sums=('0f70cda4362f6beb668b4f5211f82db328ef19a7e17e17aff8b80bf0e390a58d636668a145e1a736531024f248b3cc5e9e9aa94b0cd4739849ba012d0c347bce')
|
|
|
|
build() {
|
|
cd $_name
|
|
python -m build --wheel --skip-dependency-check --no-isolation
|
|
}
|
|
|
|
check() {
|
|
cd $_name
|
|
python -m venv --system-site-packages test-env
|
|
test-env/bin/python -m installer dist/*.whl
|
|
# test_pyproject_support https://gitlab.archlinux.org/archlinux/packaging/packages/python-setuptools-scm/-/issues/1
|
|
test-env/bin/python -m pytest -vk 'not test_not_owner and not test_pyproject_support'
|
|
}
|
|
|
|
package() {
|
|
cd $_name
|
|
python -m installer --destdir="$pkgdir" dist/*.whl
|
|
|
|
# Symlink license file
|
|
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
|
|
install -d "$pkgdir"/usr/share/licenses/$pkgname
|
|
ln -s "$site_packages"/$_name-$pkgver.dist-info/LICENSE \
|
|
"$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
|
}
|