playonlinux: patch for python 3.13

This commit is contained in:
toadwastoast 2024-12-23 14:39:55 -03:00 committed by classabbyamp
parent 79bf887693
commit 6c08a0602e
2 changed files with 60 additions and 5 deletions
srcpkgs/playonlinux

View File

@ -0,0 +1,40 @@
From 10f7853c84f456f19289c22fe19a9a99f94d9dda Mon Sep 17 00:00:00 2001
From: Robert Scheck <robert@fedoraproject.org>
Date: Mon, 14 Oct 2024 00:00:52 +0200
Subject: [PATCH] Replace pipes.quote() from deprecated Python pipes
---
python/lib/playonlinux.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/python/lib/playonlinux.py b/python/lib/playonlinux.py
index fa9b90fb9..b39f8a9a9 100755
--- a/python/lib/playonlinux.py
+++ b/python/lib/playonlinux.py
@@ -5,7 +5,7 @@
from . import Variables
import os
-import subprocess, shlex, pipes, wx
+import subprocess, shlex, wx
import natsort
def winpath(script, path):
@@ -373,7 +373,7 @@ def getArgs(shortcut): # Get prefix name from shortcut
try:
args = shlex.split(fichier[i])[2:-1]
#print args
- args = " ".join([ pipes.quote(x) for x in args])
+ args = " ".join([ shlex.quote(x) for x in args])
#print args
except:
args = ""
@@ -432,7 +432,7 @@ def writeArgs(game, args):
old_string = shlex.split(fichier[i])
new_string = shlex.split(str(args))
new_string = old_string[0:2] + new_string
- new_string = " ".join([ pipes.quote(x) for x in new_string])
+ new_string = " ".join([ shlex.quote(x) for x in new_string])
new_string = new_string+' "$@"'
line.append(new_string)

View File

@ -1,25 +1,40 @@
# Template file for 'playonlinux'
pkgname=playonlinux
version=4.4
revision=4
revision=5
# contains pre-compiled binaries linked against glibc
archs="i686 x86_64"
pycompile_dirs="usr/share/$pkgname/python"
depends="icoutils netcat ImageMagick xterm wxPython cabextract unzip glxinfo
gnupg xdg-user-dirs libXmu wget p7zip curl jq python3-natsort xrdb gettext
perl python3-pyasyncore"
short_desc="GUI for managing Windows programs under linux"
maintainer="Helmut Pozimski <helmut@pozimski.eu>"
license="GPL-2.0-or-later"
homepage="http://www.playonlinux.com"
distfiles="http://www.playonlinux.com/script_files/PlayOnLinux/${version}/PlayOnLinux_${version}.tar.gz"
homepage="https://www.playonlinux.com"
distfiles="https://repository.playonlinux.com/PlayOnLinux/${version}/PlayOnLinux_${version}.tar.gz"
checksum=aaeedec5249df3ffd56cd8b3e3e06ea7117828ffc868eb2653d232c48e488058
pycompile_dirs="usr/share/$pkgname/python"
python_version=3
do_install() {
vmkdir usr/share/$pkgname
vmkdir usr/bin
cp -r * $DESTDIR/usr/share/$pkgname
vcopy bash /usr/share/$pkgname
vcopy bin /usr/share/$pkgname
vcopy doc /usr/share/$pkgname
vcopy etc /usr/share/$pkgname
vcopy lang /usr/share/$pkgname
vcopy lib /usr/share/$pkgname
vcopy plugins /usr/share/$pkgname
vcopy python /usr/share/$pkgname
vcopy resources /usr/share/$pkgname
vcopy src /usr/share/$pkgname
vcopy tests /usr/share/$pkgname
vcopy playonlinux /usr/share/$pkgname
vdoc README.md
vdoc CHANGELOG.md
vdoc TRANSLATORS
echo "#!/bin/bash" > $DESTDIR/usr/bin/$pkgname
echo "/usr/share/$pkgname/$pkgname \"\$@\"" >> $DESTDIR/usr/bin/$pkgname