Files
MINGW-packages/mingw-w64-python-ipywidgets/PKGBUILD
2024-12-06 23:53:43 +01:00

61 lines
2.1 KiB
Bash

# Maintainer: Peter Budai <peterbudai@hotmail.com>
_realname=ipywidgets
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
provides=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
conflicts=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
replaces=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
pkgver=8.1.5
pkgrel=1
pkgdesc="IPython widgets for the Jupyter Notebook (mingw-w64)"
url="https://github.com/jupyter-widgets/ipywidgets"
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
msys2_references=(
'pypi: ipywidgets'
)
license=('spdx:BSD-3-Clause')
depends=("${MINGW_PACKAGE_PREFIX}-python-ipython"
"${MINGW_PACKAGE_PREFIX}-python-comm"
"${MINGW_PACKAGE_PREFIX}-python-jsonschema")
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
"${MINGW_PACKAGE_PREFIX}-python-installer"
"${MINGW_PACKAGE_PREFIX}-python-setuptools")
optdepends=("${MINGW_PACKAGE_PREFIX}-python-jupyterlab-widgets: widgets for Jupyter lab")
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.tar.gz"
'0001-ipywidgets-8.1.1-skip-opt-deps.patch')
sha256sums=('870e43b1a35656a80c18c9503bbf2d16802db1cb487eec6fab27d683381dde17'
'b11f6c9178d9a168a23e966a9b84253d0e5fb91f992ab7bfdc53928c139b674f')
apply_patch_with_msg() {
for _patch in "$@"
do
msg2 "Applying $_patch"
patch -Nbp1 -i "${srcdir}/$_patch"
done
}
prepare() {
rm -rf python-build-${MSYSTEM} | true
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}"
cd "python-build-${MSYSTEM}"
apply_patch_with_msg \
0001-ipywidgets-8.1.1-skip-opt-deps.patch
}
build() {
cd "${srcdir}/python-build-${MSYSTEM}"
${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation
}
package() {
cd "${srcdir}/python-build-${MSYSTEM}"
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
${MINGW_PREFIX}/bin/python -m installer --prefix=${MINGW_PREFIX} \
--destdir="${pkgdir}" dist/*.whl
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
}