52 lines
1.8 KiB
Bash
52 lines
1.8 KiB
Bash
# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
|
|
|
|
_realname=pyglet
|
|
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.0.8
|
|
pkgrel=2
|
|
pkgdesc="A cross-platform windowing and multimedia library for Python (mingw-w64)"
|
|
arch=('any')
|
|
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
|
|
url='https://github.com/pyglet/pyglet'
|
|
license=('spdx:BSD-3-Clause')
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python")
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
|
|
"${MINGW_PACKAGE_PREFIX}-python-installer"
|
|
"${MINGW_PACKAGE_PREFIX}-python-flit-core"
|
|
"${MINGW_PACKAGE_PREFIX}-python-wheel")
|
|
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.zip")
|
|
sha256sums=('c5cf9a132c1c01a67f54bf79f5a4cd8b4466d426f56852033078a3f67cd883c6')
|
|
|
|
prepare() {
|
|
cd "${srcdir}/${_realname}-${pkgver}"
|
|
sed -e "s|build-backend = \[\"flit_core.buildapi\", \"flit_core.wheel\"\]|build-backend = \"flit_core.buildapi\"|g" -i pyproject.toml
|
|
|
|
cd "${srcdir}"
|
|
rm -rf python-build-${MSYSTEM} | true
|
|
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}"
|
|
}
|
|
|
|
build() {
|
|
cd "${srcdir}/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
|
|
}
|
|
|
|
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"
|
|
}
|