From 91080f28aef6236a697fe65ffd12a3a7685fe8bd Mon Sep 17 00:00:00 2001 From: Alexey Pavlov Date: Fri, 15 Jan 2021 12:45:57 +0300 Subject: [PATCH] python-pygithub: New package --- mingw-w64-python-pygithub/PKGBUILD | 45 ++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 mingw-w64-python-pygithub/PKGBUILD diff --git a/mingw-w64-python-pygithub/PKGBUILD b/mingw-w64-python-pygithub/PKGBUILD new file mode 100644 index 0000000000..f9387123a3 --- /dev/null +++ b/mingw-w64-python-pygithub/PKGBUILD @@ -0,0 +1,45 @@ +# Maintainer: Alexey Pavlov + +_realname=pygithub +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}") +pkgver=1.54.1 +pkgrel=1 +pkgdesc="Use the full Github API v3 (mingw-w64)" +arch=('any') +url="https://github.com/PyGithub/PyGithub/" +license=('LGPL') +depends=("${MINGW_PACKAGE_PREFIX}-python-deprecated" + "${MINGW_PACKAGE_PREFIX}-python-pyjwt" + "${MINGW_PACKAGE_PREFIX}-python-requests") +makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools") +checkdepends=("${MINGW_PACKAGE_PREFIX}-python-pytest" + "${MINGW_PACKAGE_PREFIX}-python-cryptography" + "${MINGW_PACKAGE_PREFIX}-python-httpretty" + "${MINGW_PACKAGE_PREFIX}-python-parameterized") +source=("${_realname}-${pkgver}.tar.gz::https://github.com/PyGithub/PyGithub/archive/v${pkgver}.tar.gz") +sha256sums=('40e6b59cda272e0094d6044efb60b14f0c3b94eba006c9f360f6f3e338a478ed') + +prepare() { + cd "${srcdir}" + rm -rf python-build-${CARCH} | true + cp -r "PyGithub-${pkgver}" "python-build-${CARCH}" +} + +check() { + cd "${srcdir}/python-build-${CARCH}" + ${MINGW_PREFIX}/bin/python -m pytest +} + +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 +}