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

58 lines
2.1 KiB
Bash

# Maintainer: Antoine Martin <totaam@xpra.org>
_realname=lz4
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.3.2
pkgrel=2
pkgdesc="This package provides python bindings for the LZ4 compression library (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64' 'clang32')
url='https://github.com/python-lz4/python-lz4'
license=('spdx:BSD-3-Clause')
depends=("${MINGW_PACKAGE_PREFIX}-python")
makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools-scm"
"${MINGW_PACKAGE_PREFIX}-python-pkgconfig"
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
"${MINGW_PACKAGE_PREFIX}-cc")
checkdepends=("${MINGW_PACKAGE_PREFIX}-python-pytest-runner"
"${MINGW_PACKAGE_PREFIX}-python-pytest-cov"
"${MINGW_PACKAGE_PREFIX}-python-psutil")
options=('staticlibs' 'strip' '!debug')
source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/python-lz4/python-lz4/archive/v${pkgver}.tar.gz")
sha512sums=('4474c995bf0ccbd5d8bc537dacbb4aae567f1a066c1bf65a70d671d8b4fe23245fc41a991fe18509a240172fab02e94bbe0d9f5e2a55b91f8c872ce0dfc4e7ad')
prepare() {
cd "${srcdir}"
rm -rf python-build-${CARCH} | true
cp -r "python-${_realname}-${pkgver}" "python-build-${CARCH}"
# Set version for setuptools_scm
export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver}
}
build() {
msg "Python build for ${CARCH}"
cd "${srcdir}/python-build-${CARCH}"
${MINGW_PREFIX}/bin/python setup.py build
}
check() {
msg "Python test for ${CARCH}"
cd "${srcdir}/python-build-${CARCH}"
${MINGW_PREFIX}/bin/python setup.py test
}
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=2 --skip-build
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
}