https://github.com/python-cmd2/cmd2/blob/2.4.2/setup.py#L47 https://github.com/marcelotduarte/cx_Freeze/blob/v6.11.1/setup.cfg#L45 https://github.com/pallets/flask/blob/2.1.3/setup.py#L11 https://github.com/Python-Markdown/markdown/blob/master/setup.py#L77 https://github.com/jaraco/path/blob/v16.4.0/setup.cfg#L23 https://github.com/pytest-dev/pytest/blob/7.1.2/setup.cfg#L52 https://github.com/sphinx-doc/sphinx/blob/v5.1.1/setup.py#L30 https://github.com/jwodder/versioningit/blob/v2.0.0/setup.cfg#L54 The only two packages that still depends on it are: https://github.com/rst2pdf/rst2pdf/blob/0.99/setup.py#L32 https://github.com/jaraco/pytest-checkdocs/blob/v2.7.1/setup.cfg#L23
78 lines
2.6 KiB
Bash
78 lines
2.6 KiB
Bash
# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
|
|
|
|
_realname=cmd2
|
|
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=2.4.2
|
|
pkgrel=2
|
|
pkgdesc="Extra features for standard library's cmd module (mingw-w64)"
|
|
arch=('any')
|
|
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
|
|
url='https://github.com/python-cmd2/cmd2'
|
|
license=('MIT')
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python-attrs"
|
|
"${MINGW_PACKAGE_PREFIX}-python-pyperclip"
|
|
"${MINGW_PACKAGE_PREFIX}-python-typing_extensions"
|
|
"${MINGW_PACKAGE_PREFIX}-python-pyreadline3"
|
|
"${MINGW_PACKAGE_PREFIX}-python-wcwidth")
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools"
|
|
"${MINGW_PACKAGE_PREFIX}-python-setuptools-scm")
|
|
checkdepends=("${MINGW_PACKAGE_PREFIX}-python-pytest-runner"
|
|
"${MINGW_PACKAGE_PREFIX}-python-pytest-xdist"
|
|
"${MINGW_PACKAGE_PREFIX}-python-mock")
|
|
options=('staticlibs' 'strip' '!debug')
|
|
source=("${_realname}-${pkgver}.tar.gz::https://github.com/python-cmd2/cmd2/archive/${pkgver}.tar.gz")
|
|
sha512sums=('ce7dd490cca657914f20a26937e1ae1914ef884167584ec9fabde891e1e2740addddd7900bf02a127ff39f53aa5dc9545fc01aa534192bb7a39e3c591357db45')
|
|
|
|
# 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() {
|
|
cd "${srcdir}"
|
|
rm -rf python-build-${MSYSTEM} || true
|
|
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}"
|
|
# Set version for setuptools_scm
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver}
|
|
export PBR_VERSION=${pkgver}
|
|
}
|
|
|
|
build() {
|
|
msg "Python build for ${MSYSTEM}"
|
|
cd "${srcdir}/python-build-${MSYSTEM}"
|
|
${MINGW_PREFIX}/bin/python setup.py build
|
|
}
|
|
|
|
check() {
|
|
msg "Python test for ${MSYSTEM}"
|
|
cd "${srcdir}/python-build-${MSYSTEM}"
|
|
${MINGW_PREFIX}/bin/python setup.py pytest || true
|
|
}
|
|
|
|
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"
|
|
}
|