python3-nbclassic: rebuild for python3-3.13

This commit is contained in:
Andrew J. Hesford 2024-11-16 09:28:27 -05:00
parent a5d01ec299
commit cb3b130110
2 changed files with 45 additions and 3 deletions

View File

@ -0,0 +1,41 @@
From 2545d900b40bbb9fa3ea266afa617e6e0be70c71 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lum=C3=ADr=20=27Frenzy=27=20Balhar?= <lbalhar@redhat.com>
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)

View File

@ -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}"
}