[new package] python-archinfo (#22186)

Add python-archinfo
This commit is contained in:
Kreijstal
2024-10-14 21:54:45 +02:00
committed by GitHub
parent 6043aefdf0
commit 82a4cdce66

View File

@@ -0,0 +1,50 @@
_pyname=archinfo
pkgbase=mingw-w64-python-${_pyname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_pyname}")
pkgver=9.2.102
pkgrel=1
pkgdesc="Classes with architecture-specific information useful to other projects (mingw-w64)"
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
url="https://github.com/angr/archinfo"
license=('BSD-2-Clause')
depends=("${MINGW_PACKAGE_PREFIX}-python")
checkdepends=("${MINGW_PACKAGE_PREFIX}-python-pytest")
makedepends=(
"${MINGW_PACKAGE_PREFIX}-python-build"
"${MINGW_PACKAGE_PREFIX}-python-installer"
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
)
optdepends=(
"${MINGW_PACKAGE_PREFIX}-python-capstone"
"${MINGW_PACKAGE_PREFIX}-python-unicorn"
"${MINGW_PACKAGE_PREFIX}-python-keystone"
"${MINGW_PACKAGE_PREFIX}-python-pyvex"
)
source=("${url}/archive/v${pkgver}/${_pyname}-${pkgver}.tar.gz")
sha512sums=('171b236e64ab11b26a229f0f241337fadf57ec0f26a45e2001fa3972ca7912955ba951c4344312ee868de8f09c0872adbe8fa543cd9b505c985c52aabdc404a8')
build() {
cp -r "${_pyname}-${pkgver}" "python-build-${MSYSTEM}" && cd "python-build-${MSYSTEM}"
python -m build --wheel --skip-dependency-check --no-isolation
}
check() {
cd "python-build-${MSYSTEM}"
python -m pytest
}
package() {
cd "python-build-${MSYSTEM}"
MSYS2_ARG_CONV_EXCL="--prefix=" \
python -m installer --prefix=${MINGW_PREFIX} \
--destdir="${pkgdir}" dist/*.whl
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_pyname}/LICENSE"
install -Dm644 README.md "${pkgdir}${MINGW_PREFIX}/share/doc/python-${_pyname}/README.md"
}