52 lines
1.9 KiB
Bash
52 lines
1.9 KiB
Bash
# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
|
|
|
|
_realname=cmd2
|
|
pkgbase=mingw-w64-python-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
|
|
pkgver=2.7.0
|
|
pkgrel=1
|
|
pkgdesc="Extra features for standard library's cmd module (mingw-w64)"
|
|
arch=('any')
|
|
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
|
url='https://cmd2.readthedocs.io/'
|
|
msys2_repository_url='https://github.com/python-cmd2/cmd2/'
|
|
msys2_references=(
|
|
'purl: pkg:pypi/cmd2'
|
|
)
|
|
license=('spdx:MIT')
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python"
|
|
"${MINGW_PACKAGE_PREFIX}-python-pyperclip"
|
|
"${MINGW_PACKAGE_PREFIX}-python-pyreadline3"
|
|
"${MINGW_PACKAGE_PREFIX}-python-rich-argparse"
|
|
"${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=('6d2e7f3c9e125782da8983fb27a53d5db0c0cc35a8c86eb129961596ff3ff5751622894ee8fb355b0330de3b2cbb7cf18eddaba2ad0b8781e80b479cf53a1c89')
|
|
|
|
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"
|
|
}
|