It also needs python-asttokens (and potentially python-littleutils, but that's currently not packaged for MSYS2) during checks.
57 lines
1.8 KiB
Bash
57 lines
1.8 KiB
Bash
# Contributor: Mehdi Chinoune <mehdi.chinoune@hotmail.com>
|
|
# Contributor: Dirk Stolle
|
|
|
|
_realname=executing
|
|
pkgbase=mingw-w64-python-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
|
|
pkgver=2.2.1
|
|
pkgrel=1
|
|
pkgdesc="Get the currently executing AST node of a frame, and other information (mingw-w64)"
|
|
arch=('any')
|
|
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
|
msys2_references=(
|
|
'archlinux: python-executing'
|
|
'gentoo: dev-python/executing'
|
|
'purl: pkg:pypi/executing'
|
|
)
|
|
url='https://github.com/alexmojaki/executing'
|
|
license=('spdx:MIT')
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python")
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
|
|
"${MINGW_PACKAGE_PREFIX}-python-installer"
|
|
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
|
|
"${MINGW_PACKAGE_PREFIX}-python-setuptools-scm")
|
|
checkdepends=("${MINGW_PACKAGE_PREFIX}-python-asttokens"
|
|
"${MINGW_PACKAGE_PREFIX}-python-pytest")
|
|
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.tar.gz")
|
|
sha256sums=('3632cc370565f6648cc328b32435bd120a1e4ebb20c77e3fdde9a13cd1e533c4')
|
|
|
|
prepare() {
|
|
cd "${srcdir}/${_realname}-${pkgver}"
|
|
|
|
# Set version for setuptools_scm
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION=${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
|
|
}
|
|
|
|
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.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
|
|
}
|