diff --git a/srcpkgs/python3-nbclassic/patches/python3.13.patch b/srcpkgs/python3-nbclassic/patches/python3.13.patch new file mode 100644 index 00000000000..af7962b20c3 --- /dev/null +++ b/srcpkgs/python3-nbclassic/patches/python3.13.patch @@ -0,0 +1,41 @@ +From 2545d900b40bbb9fa3ea266afa617e6e0be70c71 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Lum=C3=ADr=20=27Frenzy=27=20Balhar?= +Date: Sat, 7 Sep 2024 03:37:00 +0200 +Subject: [PATCH] Replace pipes with shlex (#286) + +pipes module has been deprecated in Python 3.11 and removed in 3.13. https://peps.python.org/pep-0594/ +--- + setupbase.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/setupbase.py b/setupbase.py +index 80f28b6eb..4e7a4feec 100644 +--- a/setupbase.py ++++ b/setupbase.py +@@ -12,7 +12,7 @@ + + import os + import re +-import pipes ++import shlex + import shutil + import sys + +@@ -27,7 +27,7 @@ + from subprocess import list2cmdline + else: + def list2cmdline(cmd_list): +- return ' '.join(map(pipes.quote, cmd_list)) ++ return ' '.join(map(shlex.quote, cmd_list)) + + #------------------------------------------------------------------------------- + # Useful globals and utility functions +@@ -486,7 +486,7 @@ def run(self): + try: + run(['lessc', + '--source-map', +- '--include-path=%s' % pipes.quote(static), ++ '--include-path=%s' % shlex.quote(static), + src, + dst, + ], cwd=repo_root, env=env) diff --git a/srcpkgs/python3-nbclassic/template b/srcpkgs/python3-nbclassic/template index a4d8ae6362c..65fdd842511 100644 --- a/srcpkgs/python3-nbclassic/template +++ b/srcpkgs/python3-nbclassic/template @@ -1,7 +1,7 @@ # Template file for 'python3-nbclassic' pkgname=python3-nbclassic version=1.1.0 -revision=1 +revision=2 build_style=python3-pep517 make_build_args="--skip-dependency-check" hostmakedepends="python3-jupyter_packaging python3-jupyter_server" @@ -20,6 +20,7 @@ post_install() { mv ${DESTDIR}/usr/etc ${DESTDIR} # use system mathjax2 - rm -rf ${DESTDIR}/${py3_sitelib}/nbclassic/static/components/MathJax - ln -sf /usr/share/mathjax ${DESTDIR}/${py3_sitelib}/nbclassic/static/components/MathJax + local _mathjax="${DESTDIR}/${py3_sitelib}/nbclassic/static/components/MathJax" + rm -r "${_mathjax}" + ln -s /usr/share/mathjax "${_mathjax}" }