diff --git a/mingw-w64-python-ipywidgets/0001-ipywidgets-8.1.1-skip-opt-deps.patch b/mingw-w64-python-ipywidgets/0001-ipywidgets-8.1.1-skip-opt-deps.patch new file mode 100644 index 0000000000..b80c10c9eb --- /dev/null +++ b/mingw-w64-python-ipywidgets/0001-ipywidgets-8.1.1-skip-opt-deps.patch @@ -0,0 +1,11 @@ +--- ipywidgets-8.1.1/setup.cfg 2023-09-13 11:05:08.957218600 +0300 ++++ python-build-MINGW32/setup.cfg 2023-12-01 23:57:00.642893000 +0300 +@@ -34,8 +34,6 @@ + comm>=0.1.3 + ipython>=6.1.0 + traitlets>=4.3.1 +- widgetsnbextension~=4.0.9 +- jupyterlab_widgets~=3.0.9 + + [options.extras_require] + test = diff --git a/mingw-w64-python-ipywidgets/PKGBUILD b/mingw-w64-python-ipywidgets/PKGBUILD index 3b63d4dac7..3db79cc779 100644 --- a/mingw-w64-python-ipywidgets/PKGBUILD +++ b/mingw-w64-python-ipywidgets/PKGBUILD @@ -6,8 +6,8 @@ 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=7.7.1 -pkgrel=2 +pkgver=8.1.1 +pkgrel=1 pkgdesc="IPython widgets for the Jupyter Notebook (mingw-w64)" url="https://github.com/jupyter-widgets/ipywidgets" arch=('any') @@ -16,24 +16,46 @@ msys2_references=( 'pypi: ipywidgets' ) license=('spdx:BSD-3-Clause') -depends=("${MINGW_PACKAGE_PREFIX}-python") -makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools") -source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.tar.gz") -sha256sums=('5f2fa1b7afae1af32c88088c9828ad978de93ddda393d7ed414e553fee93dcab') +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=('40211efb556adec6fa450ccc2a77d59ca44a060f4f9f136833df59c9f538e6e8' + '13cbd6204c29aa910bc64ee4a08c413607b39b222913a08e1387c47a7380c9a9') + +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 setup.py build + ${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 setup.py install --root=${pkgdir} --prefix=${MINGW_PREFIX} --optimize=1 --skip-build + ${MINGW_PREFIX}/bin/python -m installer --prefix=${MINGW_PREFIX} \ + --destdir="${pkgdir}" dist/*.whl install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE" } diff --git a/mingw-w64-python-jupyterlab-widgets/PKGBUILD b/mingw-w64-python-jupyterlab-widgets/PKGBUILD new file mode 100644 index 0000000000..9310b8a9fe --- /dev/null +++ b/mingw-w64-python-jupyterlab-widgets/PKGBUILD @@ -0,0 +1,42 @@ +# Maintainer: Konstantin Podsvirov + +_realname=jupyterlab_widgets +pkgbase=mingw-w64-python-${_realname/_/-} +pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname/_/-}") +pkgver=3.0.9 +pkgrel=1 +pkgdesc="JupyterLab extension to use ipywidgets (mingw-w64)" +url="https://github.com/jupyter-widgets/ipywidgets" +arch=('any') +mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64') +msys2_references=( + 'pypi: jupyterlab_widgets' +) +license=('spdx:BSD-3-Clause') +depends=("${MINGW_PACKAGE_PREFIX}-python-jupyterlab" + "${MINGW_PACKAGE_PREFIX}-python-ipywidgets") +makedepends=("${MINGW_PACKAGE_PREFIX}-python-build" + "${MINGW_PACKAGE_PREFIX}-python-jupyter-packaging" + "${MINGW_PACKAGE_PREFIX}-python-installer" + "${MINGW_PACKAGE_PREFIX}-python-wheel" + "${MINGW_PACKAGE_PREFIX}-python-setuptools") +source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.tar.gz") +sha256sums=('6005a4e974c7beee84060fdfba341a3218495046de8ae3ec64888e5fe19fdb4c') + +prepare() { + rm -rf python-build-${MSYSTEM} | true + cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}" +} + +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" +}