54 lines
1.9 KiB
Bash
54 lines
1.9 KiB
Bash
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
|
|
|
_realname=pygithub
|
|
_pyname=PyGithub
|
|
pkgbase=mingw-w64-python-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
|
|
pkgver=1.59.0
|
|
pkgrel=2
|
|
pkgdesc="Use the full Github API v3 (mingw-w64)"
|
|
arch=('any')
|
|
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
|
|
url="https://github.com/PyGithub/PyGithub/"
|
|
license=('spdx:LGPL-3.0' 'spdx:GPL-3.0')
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python-deprecated"
|
|
"${MINGW_PACKAGE_PREFIX}-python-pyjwt"
|
|
"${MINGW_PACKAGE_PREFIX}-python-requests"
|
|
"${MINGW_PACKAGE_PREFIX}-python-pynacl")
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
|
|
"${MINGW_PACKAGE_PREFIX}-python-installer"
|
|
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
|
|
"${MINGW_PACKAGE_PREFIX}-python-setuptools-scm"
|
|
"${MINGW_PACKAGE_PREFIX}-python-wheel")
|
|
checkdepends=("${MINGW_PACKAGE_PREFIX}-python-pytest"
|
|
"${MINGW_PACKAGE_PREFIX}-python-cryptography"
|
|
"${MINGW_PACKAGE_PREFIX}-python-httpretty"
|
|
"${MINGW_PACKAGE_PREFIX}-python-parameterized")
|
|
source=("https://pypi.org/packages/source/${_pyname::1}/${_pyname}/${_pyname}-${pkgver}.tar.gz")
|
|
sha256sums=('6e05ff49bac3caa7d1d6177a10c6e55a3e20c85b92424cc198571fd0cf786690')
|
|
|
|
prepare() {
|
|
rm -rf python-build-${MSYSTEM} | true
|
|
cp -r "PyGithub-${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 -vDm644 COPYING "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/COPYING"
|
|
}
|