56 lines
2.0 KiB
Bash
56 lines
2.0 KiB
Bash
# Maintainer: Sarah Ottinger <schalaalexiazeal@gmail.com>
|
|
|
|
_realname=zstandard
|
|
pkgbase=mingw-w64-python-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
|
|
pkgver=0.25.0
|
|
pkgrel=1
|
|
pkgdesc='Python bindings to the Zstandard (zstd) compression library (mingw-w64)'
|
|
arch=('any')
|
|
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
|
url='https://python-zstandard.readthedocs.io/'
|
|
msys2_repository_url='https://github.com/indygreg/python-zstandard/'
|
|
msys2_references=(
|
|
'archlinux: python-zstandard'
|
|
'cygwin: python-zstandard'
|
|
'gentoo: dev-python/zstandard'
|
|
'purl: pkg:pypi/zstandard'
|
|
)
|
|
license=('spdx:BSD-3-Clause')
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python")
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
|
|
"${MINGW_PACKAGE_PREFIX}-python-build"
|
|
"${MINGW_PACKAGE_PREFIX}-python-installer"
|
|
"${MINGW_PACKAGE_PREFIX}-python-setuptools")
|
|
checkdepends=("${MINGW_PACKAGE_PREFIX}-python-hypothesis")
|
|
optdepends=("${MINGW_PACKAGE_PREFIX}-python-cffi")
|
|
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.tar.gz"
|
|
0001-python-zstandard-check-compiler-type.patch)
|
|
sha256sums=('7713e1179d162cf5c7906da876ec2ccb9c3a9dcbdffef0cc7f70c3667a205f0b'
|
|
'9b2affb073fb5f5d757701b98fa3ee87a84f90c9c58d17d06c8a4e8339041afe')
|
|
|
|
prepare() {
|
|
cd "${_realname}-$pkgver"
|
|
patch -p1 -i "${srcdir}/0001-python-zstandard-check-compiler-type.patch"
|
|
}
|
|
|
|
build() {
|
|
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}" && cd "python-build-${MSYSTEM}"
|
|
${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation
|
|
}
|
|
|
|
check() {
|
|
cd "${srcdir}/python-build-${MSYSTEM}"
|
|
${MINGW_PREFIX}/bin/python -m pytest || warning "Tests failed"
|
|
}
|
|
|
|
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"
|
|
}
|