From efe205b8d47cdebd63cf368d08b78f376a883d8a Mon Sep 17 00:00:00 2001 From: Skaendo <40816707+skaendo@users.noreply.github.com> Date: Mon, 13 Jan 2020 05:06:42 +0000 Subject: [PATCH] cinnamon: Fix for python 3.8 Signed-off-by: Willy Sudiarto Raharjo --- cinnamon/cinnamon.SlackBuild | 3 +++ cinnamon/python_3.8_platform.patch | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 cinnamon/python_3.8_platform.patch diff --git a/cinnamon/cinnamon.SlackBuild b/cinnamon/cinnamon.SlackBuild index 0ab16f5..2320e48 100644 --- a/cinnamon/cinnamon.SlackBuild +++ b/cinnamon/cinnamon.SlackBuild @@ -71,6 +71,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +# Patch to fix platform.linux_distribution with python 3.8 +patch -p1 < $CWD/python_3.8_platform.patch + # Use cinnamon theme by default patch -p1 < $CWD/default-theme.patch diff --git a/cinnamon/python_3.8_platform.patch b/cinnamon/python_3.8_platform.patch new file mode 100644 index 0000000..47fe9a1 --- /dev/null +++ b/cinnamon/python_3.8_platform.patch @@ -0,0 +1,20 @@ +--- a/files/usr/share/cinnamon/cinnamon-settings/modules/cs_info.py ++++ b/files/usr/share/cinnamon/cinnamon-settings/modules/cs_info.py +@@ -1,6 +1,7 @@ + #!/usr/bin/python3 + + import platform ++import distro + import subprocess + import shlex + import os +@@ -105,7 +106,7 @@ + title = ' '.join(contents[:2]) or "Manjaro Linux" + infos.append((_("Operating System"), title)) + else: +- s = '%s (%s)' % (' '.join(platform.linux_distribution()), arch) ++ s = '%s (%s)' % (' '.join(distro.linux_distribution()), arch) + # Normalize spacing in distribution name + s = re.sub('\s{2,}', ' ', s) + infos.append((_("Operating System"), s)) +