diff --git a/srcpkgs/python3-jupyter_core/patches/platform_dirs_true.patch b/srcpkgs/python3-jupyter_core/patches/platform_dirs_true.patch new file mode 100644 index 00000000000..7f8a56d62bd --- /dev/null +++ b/srcpkgs/python3-jupyter_core/patches/platform_dirs_true.patch @@ -0,0 +1,24 @@ +Default to using platformdirs + +--- a/jupyter_core/paths.py 2020-02-01 21:00:00.000000000 -0300 ++++ b/jupyter_core/paths.py 2023-06-04 00:49:36.985844333 -0300 +@@ -53,7 +53,7 @@ + We plan for this to default to False in jupyter_core version 5 and to True + in jupyter_core version 6. + """ +- return envset("JUPYTER_PLATFORM_DIRS", False) # type:ignore[return-value] ++ return envset("JUPYTER_PLATFORM_DIRS", True) # type:ignore[return-value] + + + def get_home_dir() -> str: +--- a/jupyter_core/tests/test_paths.py 2020-02-01 21:00:00.000000000 -0300 ++++ b/jupyter_core/tests/test_paths.py 2023-06-04 00:49:05.967219753 -0300 +@@ -86,7 +86,7 @@ + return os.path.abspath(os.path.realpath(os.path.expanduser(path))) + + +-home_jupyter = realpath("~/.jupyter") ++home_jupyter = realpath("~/.config/jupyter") + + + def test_envset(): diff --git a/srcpkgs/python3-jupyter_core/template b/srcpkgs/python3-jupyter_core/template index 092921c77a5..57af2b9eff9 100644 --- a/srcpkgs/python3-jupyter_core/template +++ b/srcpkgs/python3-jupyter_core/template @@ -1,20 +1,30 @@ # Template file for 'python3-jupyter_core' pkgname=python3-jupyter_core -version=5.0.0 -revision=3 +version=5.3.1 +revision=1 build_style=python3-pep517 -hostmakedepends="python3-flit_core hatchling" +hostmakedepends="hatchling" depends="python3-traitlets python3-platformdirs" +checkdepends="$depends python3-pytest python3-pip" short_desc="Jupyter core package" -maintainer="Orphaned " +maintainer="Gonzalo TornarĂ­a " license="BSD-3-Clause" homepage="https://jupyter.org" +changelog="https://raw.githubusercontent.com/jupyter/jupyter_core/main/CHANGELOG.md" distfiles="${PYPI_SITE}/j/jupyter_core/jupyter_core-${version}.tar.gz" -checksum=4ed68b7c606197c7e344a24b7195eef57898157075a69655a886074b6beb7043 +checksum=5ba5c7938a7f97a6b0481463f7ff0dbac7c15ba48cf46fa4035ca6e838aa1aba conflicts="python-jupyter_core<=4.4.0_3" -# checks create a cycle with python3-jypter_client and python3-ipython_ipykernel -make_check=no + +do_check() { + # Running via PYTHONPATH breaks a few tests so we use a venv + local testdir="${wrksrc}/.xbps-testdir/$(date +%s)" + python3 -m venv --system-site-packages --without-pip "${testdir}" + + local testpy="${testdir}/bin/python3" + "${testpy}" -m installer dist/*.whl + PATH="${testdir}/bin:${PATH}" "${testpy}" -m pytest +} post_install() { - vlicense COPYING.md LICENSE + vlicense LICENSE } diff --git a/srcpkgs/python3-jupyter_core/update b/srcpkgs/python3-jupyter_core/update index 25ef51d109a..a42c0d0b9f1 100644 --- a/srcpkgs/python3-jupyter_core/update +++ b/srcpkgs/python3-jupyter_core/update @@ -1 +1,4 @@ ignore="*a* *b* *rc*" +# 5.3.2 breaks jupyter_client +# (https://github.com/jupyter/jupyter_core/pull/362) +ignore+=" 5.3.2"