59 lines
2.1 KiB
Bash
59 lines
2.1 KiB
Bash
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
|
|
|
_realname=pygithub
|
|
_pyname=PyGithub
|
|
pkgbase=mingw-w64-python-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
|
|
pkgver=2.1.1
|
|
pkgrel=1
|
|
pkgdesc="Use the full Github API v3 (mingw-w64)"
|
|
arch=('any')
|
|
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
|
|
msys2_references=(
|
|
'pypi: PyGithub'
|
|
)
|
|
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-dateutil"
|
|
"${MINGW_PACKAGE_PREFIX}-python-typing_extensions"
|
|
"${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=('ecf12c2809c44147bce63b047b3d2e9dac8a41b63e90fcb263c703f64936b97c')
|
|
|
|
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"
|
|
}
|