blob: 08df4edeec5a62afa85bd49f40f1d5638bf4e82f [file] [log] [blame] [edit]
# Maintainer: Naveen M K naveen@syrusdark.website
_pyname=moderngl
_realname=moderngl
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
pkgver=5.6.4
pkgrel=1
pkgdesc='ModernGL: High performance rendering for Python 3 (mingw-w64)'
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64')
url="https://github.com/moderngl/moderngl"
license=('MIT')
depends=(
"${MINGW_PACKAGE_PREFIX}-python"
"${MINGW_PACKAGE_PREFIX}-python-glcontext"
)
makedepends=(
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
)
source=("${_pyname}-${pkgver}.tar.gz::https://pypi.org/packages/source/${_pyname::1}/${_pyname}/${_pyname}-${pkgver}.tar.gz")
sha256sums=('8c6d04559f5e3bf75a18525cd46d213c0f3a8409363718978e6de691bdb551fb')
prepare() {
cd "$srcdir"
rm -rf python-build-${CARCH} | true
cp -r "${_pyname//_/-}-$pkgver" "python-build-${CARCH}"
export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver}
}
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"
}