50 lines
1.8 KiB
Bash
50 lines
1.8 KiB
Bash
# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
|
|
|
|
_realname=cmd2
|
|
pkgbase=mingw-w64-python-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
|
|
pkgver=2.5.8
|
|
pkgrel=1
|
|
pkgdesc="Extra features for standard library's cmd module (mingw-w64)"
|
|
arch=('any')
|
|
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
|
msys2_repository_url='https://github.com/python-cmd2/cmd2/'
|
|
url='https://cmd2.readthedocs.io/'
|
|
msys2_references=(
|
|
'pypi: cmd2'
|
|
)
|
|
license=('spdx:MIT')
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python-pyperclip"
|
|
"${MINGW_PACKAGE_PREFIX}-python-pyreadline3"
|
|
"${MINGW_PACKAGE_PREFIX}-python-wcwidth")
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
|
|
"${MINGW_PACKAGE_PREFIX}-python-installer"
|
|
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
|
|
"${MINGW_PACKAGE_PREFIX}-python-setuptools-scm")
|
|
checkdepends=("${MINGW_PACKAGE_PREFIX}-python-pytest"
|
|
"${MINGW_PACKAGE_PREFIX}-python-pytest-cov"
|
|
"${MINGW_PACKAGE_PREFIX}-python-mock")
|
|
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.tar.gz")
|
|
sha512sums=('ce19006dff46279f14ac7d23ab4177b7926b061565ceff054291a508773ed0c037bdd20ffc72ecc99d44bcbc3751a486a14dd9d1d43c2e61a7ebd45cf967f06c')
|
|
|
|
build() {
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION="${pkgver}"
|
|
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}" && cd "python-build-${MSYSTEM}"
|
|
python -m build --wheel --skip-dependency-check --no-isolation
|
|
}
|
|
|
|
check() {
|
|
cd "python-build-${MSYSTEM}"
|
|
python -m pytest || warning "Tests failed"
|
|
}
|
|
|
|
package() {
|
|
cd "python-build-${MSYSTEM}"
|
|
|
|
MSYS2_ARG_CONV_EXCL="--prefix=" \
|
|
python -m installer --prefix=${MINGW_PREFIX} \
|
|
--destdir="${pkgdir}" dist/*.whl
|
|
|
|
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
|
|
}
|