46 lines
1.7 KiB
Bash
46 lines
1.7 KiB
Bash
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
|
|
|
_realname=pycryptodome
|
|
pkgbase=mingw-w64-python-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
|
|
pkgver=3.19.0
|
|
pkgrel=1
|
|
pkgdesc="Collection of cryptographic algorithms and protocols, implemented for use from Python (mingw-w64)"
|
|
url="https://www.pycryptodome.org/"
|
|
license=('spdx:BSD-2-Clause')
|
|
arch=('any')
|
|
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64' 'clang32')
|
|
depends=("${MINGW_PACKAGE_PREFIX}-gmp"
|
|
"${MINGW_PACKAGE_PREFIX}-python")
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
|
|
"${MINGW_PACKAGE_PREFIX}-python-installer"
|
|
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
|
|
"${MINGW_PACKAGE_PREFIX}-python-wheel"
|
|
"${MINGW_PACKAGE_PREFIX}-cc")
|
|
checkdepends=("${MINGW_PACKAGE_PREFIX}-python-pytest")
|
|
source=("${_realname}-${pkgver}.tar.gz::https://github.com/Legrandin/pycryptodome/archive/v${pkgver}.tar.gz")
|
|
sha256sums=('30354c769a508f644cf5c9647ef1f3a346b6fb3e64034fc3a8a364f6986beeb1')
|
|
|
|
prepare() {
|
|
cd "${srcdir}/${_realname}-${pkgver}"
|
|
}
|
|
|
|
build() {
|
|
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}" && cd "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 || warning "Tests failed"
|
|
}
|
|
|
|
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.rst "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE.rst"
|
|
}
|