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.21.0
|
|
pkgrel=2
|
|
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=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
|
msys2_references=(
|
|
'archlinux: python-pycryptodome'
|
|
'pypi: pycryptodome'
|
|
)
|
|
msys2_repository_url='https://github.com/Legrandin/pycryptodome/'
|
|
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}-cc")
|
|
checkdepends=("${MINGW_PACKAGE_PREFIX}-python-pytest")
|
|
source=("${_realname}-${pkgver}.tar.gz::https://github.com/Legrandin/pycryptodome/archive/v${pkgver}.tar.gz")
|
|
sha256sums=('195e5cdfbb550b03f83f2af2aa4652c14b64783574d835fe61bb06c8fc06ba21')
|
|
|
|
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"
|
|
}
|