88 lines
2.9 KiB
Bash
88 lines
2.9 KiB
Bash
# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
|
|
|
|
_realname=cliff
|
|
pkgbase=mingw-w64-python-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
|
|
provides=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
|
conflicts=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
|
replaces=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
|
pkgver=4.6.0
|
|
pkgrel=1
|
|
pkgdesc="Command Line Interface Formulation Framewor (mingw-w64)"
|
|
arch=('any')
|
|
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
|
|
msys2_references=(
|
|
'archlinux: python-cliff'
|
|
'pypi: cliff'
|
|
)
|
|
msys2_repository_url='https://opendev.org/openstack/cliff/'
|
|
msys2_documentation_url='https://docs.openstack.org/cliff/latest/'
|
|
msys2_issue_tracker_url='https://launchpad.net/python-openstackclient/'
|
|
url='https://docs.openstack.org/cliff/latest/'
|
|
license=('spdx:Apache-2.0')
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python-autopage"
|
|
"${MINGW_PACKAGE_PREFIX}-python-cmd2"
|
|
"${MINGW_PACKAGE_PREFIX}-python-prettytable"
|
|
"${MINGW_PACKAGE_PREFIX}-python-stevedore"
|
|
"${MINGW_PACKAGE_PREFIX}-python-yaml")
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
|
|
"${MINGW_PACKAGE_PREFIX}-python-installer"
|
|
"${MINGW_PACKAGE_PREFIX}-python-pbr"
|
|
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
|
|
"${MINGW_PACKAGE_PREFIX}-python-wheel")
|
|
#checkdepends=("${MINGW_PACKAGE_PREFIX}-python-testrepository"
|
|
# "${MINGW_PACKAGE_PREFIX}-python-mock"
|
|
# "${MINGW_PACKAGE_PREFIX}-python-sphinx"
|
|
# "${MINGW_PACKAGE_PREFIX}-python-oslosphinx"
|
|
# "${MINGW_PACKAGE_PREFIX}-python-testscenarios")
|
|
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname/-/_}-${pkgver}.tar.gz")
|
|
sha256sums=('2f38ce8bd1ea4958d66f15b066ac47e65d61f600b9319b921e12e9e9cbcd99d0')
|
|
|
|
# Helper macros to help make tasks easier #
|
|
apply_patch_with_msg() {
|
|
for _patch in "$@"
|
|
do
|
|
msg2 "Applying $_patch"
|
|
patch -Nbp1 -i "${srcdir}/$_patch"
|
|
done
|
|
}
|
|
|
|
del_file_exists() {
|
|
for _fname in "$@"
|
|
do
|
|
if [ -f $_fname ]; then
|
|
rm -rf $_fname
|
|
fi
|
|
done
|
|
}
|
|
# =========================================== #
|
|
|
|
prepare() {
|
|
rm -rf python-build-${MSYSTEM} | true
|
|
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}"
|
|
|
|
# Set version for pbr
|
|
export PBR_VERSION=${pkgver}
|
|
}
|
|
|
|
build() {
|
|
cd "${srcdir}/python-build-${MSYSTEM}"
|
|
${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation
|
|
}
|
|
|
|
#check() {
|
|
# msg "Python test for ${MSYSTEM}"
|
|
# cd "${srcdir}/python-build-${MSYSTEM}"
|
|
# PYTHON=${MINGW_PREFIX}/bin/python3 \
|
|
# ${MINGW_PREFIX}/bin/python setup.py testr
|
|
#}
|
|
|
|
package() {
|
|
cd "${srcdir}/python-build-${MSYSTEM}"
|
|
MSYS2_ARG_CONV_EXCL="--prefix=" \
|
|
${MINGW_PREFIX}/bin/python -m installer --prefix=${MINGW_PREFIX} \
|
|
--destdir="${pkgdir}" dist/*.whl
|
|
|
|
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
|
|
}
|