Files
MINGW-packages/mingw-w64-python-scikit-build-core/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

70 lines
2.3 KiB
Bash

# Contributor: Marcelo Duarte https://github.com/marcelotduarte
_realname=scikit-build-core
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
pkgver=0.10.7
pkgrel=3
pkgdesc="A next generation Python CMake adaptor and Python API for plugins (mingw-w64)"
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
msys2_references=(
'pypi: scikit-build-core'
)
url='https://github.com/scikit-build/scikit-build-core'
license=('spdx:Apache-2.0')
depends=(
"${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-ninja"
"${MINGW_PACKAGE_PREFIX}-python"
"${MINGW_PACKAGE_PREFIX}-python-packaging"
"${MINGW_PACKAGE_PREFIX}-python-pathspec"
)
makedepends=(
"${MINGW_PACKAGE_PREFIX}-python-build"
"${MINGW_PACKAGE_PREFIX}-python-hatchling"
"${MINGW_PACKAGE_PREFIX}-python-hatch-vcs"
"${MINGW_PACKAGE_PREFIX}-python-installer"
)
checkdepends=(
"${MINGW_PACKAGE_PREFIX}-pybind11"
"${MINGW_PACKAGE_PREFIX}-python-build"
"${MINGW_PACKAGE_PREFIX}-python-cattrs"
"${MINGW_PACKAGE_PREFIX}-python-pip"
"${MINGW_PACKAGE_PREFIX}-python-pytest"
"${MINGW_PACKAGE_PREFIX}-python-pytest-subprocess"
"${MINGW_PACKAGE_PREFIX}-python-rich"
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
"${MINGW_PACKAGE_PREFIX}-python-virtualenv"
)
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname//-/_}-${pkgver}.tar.gz")
sha256sums=('04cbb59fe795202a7eeede1849112ee9dcbf3469feebd9b8b36aa541336ac4f8')
prepare() {
rm -rf build-${MSYSTEM} | true
cp -r "${_realname//-/_}-${pkgver}" "build-${MSYSTEM}"
}
build() {
cd "build-${MSYSTEM}"
${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation
}
check() {
cd "build-${MSYSTEM}"
${MINGW_PREFIX}/bin/pip install ${_realname} -f dist --no-deps --no-index
${MINGW_PREFIX}/bin/python -m pytest -ra --showlocals -m "not broken_on_urct" -k "not sdist_time_hash_set_epoch and not sdist_hash and not symlink"
${MINGW_PREFIX}/bin/pip uninstall -y ${_realname}
}
package() {
cd "build-${MSYSTEM}"
MSYS2_ARG_CONV_EXCL="--prefix=" \
${MINGW_PREFIX}/bin/python -m installer --prefix=${MINGW_PREFIX} \
--destdir="${pkgdir}" dist/*.whl
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
}