python-redis: New package
This commit is contained in:
48
mingw-w64-python-redis/PKGBUILD
Normal file
48
mingw-w64-python-redis/PKGBUILD
Normal file
@@ -0,0 +1,48 @@
|
||||
# Maintainer: Konstantin Podsvirov <konstantin@podsvirov.pro>
|
||||
|
||||
_realname=redis
|
||||
pkgbase=mingw-w64-python-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
|
||||
pkgver=4.5.4
|
||||
pkgrel=1
|
||||
pkgdesc="The Python interface to the Redis key-value store (mingw-w64)"
|
||||
arch=('any')
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
|
||||
url='https://github.com/redis/redis-py'
|
||||
license=('MIT')
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-python-async-timeout")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-installer"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-wheel"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-setuptools")
|
||||
optdepends=("${MINGW_PACKAGE_PREFIX}-python-hiredis: faster performance via hiredis"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-cryptography: OCSP certificate validation"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-pyopenssl: OCSP certificate validation"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-requests: OCSP certificate validation")
|
||||
source=("${_realname}-py-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz")
|
||||
sha256sums=('f1d31da6d7fcff696caa41fa808d1bd8df90b38a61c3d303251bb92c4a5ad082')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}"
|
||||
rm -rf python-build-${MSYSTEM} | true
|
||||
cp -r "${_realname}-py-${pkgver}" "python-build-${MSYSTEM}"
|
||||
|
||||
# Set version for setuptools_scm
|
||||
export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver}
|
||||
}
|
||||
|
||||
build() {
|
||||
msg "Python build for ${MSYSTEM}"
|
||||
cd "${srcdir}/python-build-${MSYSTEM}"
|
||||
${MINGW_PREFIX}/bin/python -m build --wheel --no-isolation
|
||||
}
|
||||
|
||||
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 -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
|
||||
}
|
||||
Reference in New Issue
Block a user