setuptools-scm-git-archive: update to 1.2

* Add check function.
* Install license file.
This commit is contained in:
Biswapriyo Nath
2022-06-24 09:57:21 +05:30
committed by GitHub
parent 13e46f5f24
commit e2dadc61f7

View File

@@ -3,16 +3,17 @@
_realname=setuptools-scm-git-archive
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
pkgver=1.1
pkgrel=2
pkgver=1.2
pkgrel=1
pkgdesc='setuptools_scm plugin for git archives (mingw-w64)'
url='https://github.com/Changaco/setuptools_scm_git_archive'
license=('MIT')
license=('spdx:MIT')
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
depends=("${MINGW_PACKAGE_PREFIX}-python-setuptools-scm")
checkdepends=("${MINGW_PACKAGE_PREFIX}-python-pytest")
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname//-/_}-${pkgver}.tar.gz")
sha256sums=('6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062')
sha256sums=('92e8149c1f4a62fe170962b4ff8cb3d53bfa90fc944f1f1758cebaef56a67f13')
prepare() {
cd "${srcdir}"
@@ -26,9 +27,16 @@ build() {
${MINGW_PREFIX}/bin/python setup.py build
}
check() {
cd "${srcdir}/python-build-${MSYSTEM}"
"${MINGW_PREFIX}"/bin/python -v tests.py || warning "Tests failed"
}
package() {
cd "${srcdir}/python-build-${MSYSTEM}"
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
${MINGW_PREFIX}/bin/python setup.py install --prefix=${MINGW_PREFIX} \
--root="${pkgdir}" --optimize=1 --skip-build
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
}