62 lines
2.2 KiB
Bash
62 lines
2.2 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.3
|
|
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-wheel"
|
|
"${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=('f5f9eeaae082b1823ce9eac2575272952f40d748893972956dc09700a6392d9c'
|
|
'eb8578aaa6b323f625acad43ac56050ed785a9598805cc53804c1261c651d7a0')
|
|
|
|
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"
|
|
}
|