From 94576f1938604cdce2b2106e7f530eed33ff42ce Mon Sep 17 00:00:00 2001 From: ciciwu <89900858+ciciwu213@users.noreply.github.com> Date: Fri, 29 Apr 2022 08:47:48 +0000 Subject: [PATCH] add new python packages pybase64 new packages: pybase64 --- mingw-w64-python-pybase64/PKGBUILD | 56 ++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 mingw-w64-python-pybase64/PKGBUILD diff --git a/mingw-w64-python-pybase64/PKGBUILD b/mingw-w64-python-pybase64/PKGBUILD new file mode 100644 index 0000000000..519cefe26d --- /dev/null +++ b/mingw-w64-python-pybase64/PKGBUILD @@ -0,0 +1,56 @@ +# Maintainer: ciciwu + +_realname=pybase64 +pkgbase=mingw-w64-python-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}") +pkgver=1.2.1 +pkgrel=1 +pkgdesc='Fast Base64 encoding/decoding' +arch=('any') +mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32') +url="https://pypi.org/project/pybase64/" +license=('BSD') +depends=("${MINGW_PACKAGE_PREFIX}-python" "${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-python-pytest" "${MINGW_PACKAGE_PREFIX}-python-wheel" "${MINGW_PACKAGE_PREFIX}-python-sphinx") +makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools") +source=("https://files.pythonhosted.org/packages/dc/0d/72c5b24b79d60d5957ad43220c2ee934852cea43a52866c9ce9796e88ac0/pybase64-${pkgver}.tar.gz") +sha256sums=('d2016a3a487d3d4501d8281f61ee54c25efd65e37a4c7dce8011e0de7183c956') + +prepare() { + cd "${srcdir}" + + rm -rf python-build-${CARCH} | true + cp -r "${_realname}-${pkgver}" "python-build-${CARCH}" + + # Set version for setuptools_scm + export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver} +} + +# Note that build() is sometimes skipped because it's done in +# the packages setup.py install for simplicity if you can do so. +# but sometimes, you want to do a check before install which would +# also trigger the build. +build() { + msg "Python build for ${CARCH}" + cd "${srcdir}/python-build-${CARCH}" + ${MINGW_PREFIX}/bin/python setup.py build +} + +#check() { +# msg "Python test for ${CARCH}" +# cd "${srcdir}/python-build-${CARCH}" +# PYTHONPATH=. ${MINGW_PREFIX}/bin/pytest . +#} + +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" + +} + + + +