Files
MINGW-packages/mingw-w64-python-codespell/PKGBUILD
Christoph Reiter aba85f4230 Remove python-wheel dependency everywhere
it's now part of setuptools and shouldn't be needed anymore
2024-11-03 20:19:14 +01:00

51 lines
1.6 KiB
Bash

# Contributor: Mehdi Chinoune <mehdi.chinoune@hotmail.com>
_realname=codespell
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
pkgver=2.3.0
pkgrel=2
pkgdesc="Fix common misspellings in source code (mingw-w64)"
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
msys2_references=(
'archlinux: codespell'
'pypi: codespell'
)
url='https://github.com/codespell-project/codespell'
license=('spdx:GPL-2.0-only')
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")
options=(!strip)
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.tar.gz")
sha256sums=('360c7d10f75e65f67bad720af7007e1060a5d395670ec11a7ed1fed9dd17471f')
prepare() {
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 COPYING "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
}