Files
MINGW-packages/mingw-w64-python-manhole/PKGBUILD
Christoph Reiter 09fc5ff426 Python rebuilds
2023-07-24 18:19:03 +02:00

48 lines
1.7 KiB
Bash

# Maintainer: Alexey Pavlov <alexpux@gmail.com>
_realname=manhole
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
pkgver=1.8.0
pkgrel=3
pkgdesc="Debugging manhole for python applications (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
url='https://github.com/ionelmc/python-manhole'
license=('BSD')
depends=("${MINGW_PACKAGE_PREFIX}-python")
makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools")
checkdepends=("${MINGW_PACKAGE_PREFIX}-python-pytest-runner"
"${MINGW_PACKAGE_PREFIX}-python-requests"
#"${MINGW_PACKAGE_PREFIX}-python-process-tests"
#"${MINGW_PACKAGE_PREFIX}-python-virtualenv"
)
options=('staticlibs' 'strip' '!debug')
source=("${_realname}-${pkgver}.tar.gz::https://github.com/ionelmc/python-manhole/archive/v$pkgver.tar.gz")
sha512sums=('041452d602895f7ceaafc74ac50713acd470120b022a942946de83f90d2d839ee15b333dfc329f88597b13e0b3fee436af526beae95a3ff94e51376fd2cc27e6')
prepare() {
rm -rf python-build-${CARCH} || true
cp -r "python-${_realname}-${pkgver}" "python-build-${CARCH}"
}
build() {
msg "Python build for ${CARCH}"
cd "${srcdir}/python-build-${CARCH}"
${MINGW_PREFIX}/bin/python setup.py build
}
package() {
cd "${srcdir}/python-build-${CARCH}"
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"
for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*-script.py; do
# Remove shebang line
sed -e '1 { s/^#!.*$// }' -i "${_f}"
done
}