summaryrefslogtreecommitdiff
path: root/libraries/wxPython4
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2020-11-05 23:01:40 +0100
committerRobby Workman <rworkman@slackbuilds.org>2021-04-18 00:09:04 -0500
commit875bd0ee11741b212835cbb95ff59272adae670f (patch)
tree276ba0fe90524c603565ee5952a1341694fc8e07 /libraries/wxPython4
parent4ed258d353416c40002ba4d70961d290dbfa685b (diff)
downloadslackbuilds-875bd0ee11741b212835cbb95ff59272adae670f.tar.gz
libraries/wxPython4: Patched for the newer setuptools.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'libraries/wxPython4')
-rw-r--r--libraries/wxPython4/newer_setuptools.patch29
-rw-r--r--libraries/wxPython4/wxPython4.SlackBuild2
2 files changed, 31 insertions, 0 deletions
diff --git a/libraries/wxPython4/newer_setuptools.patch b/libraries/wxPython4/newer_setuptools.patch
new file mode 100644
index 0000000000..8def77882a
--- /dev/null
+++ b/libraries/wxPython4/newer_setuptools.patch
@@ -0,0 +1,29 @@
+based on the upstream commit aa8430ad391d93391988451f43ecedd76ca4dd77
+
+diff -Naur wxPython-4.0.7.post2.orig/setup.py wxPython-4.0.7.post2/setup.py
+--- wxPython-4.0.7.post2.orig/setup.py 2019-11-12 03:54:31.000000000 +0100
++++ wxPython-4.0.7.post2/setup.py 2020-11-05 19:00:12.489380000 +0100
+@@ -11,6 +11,7 @@
+
+ import sys, os
+ import glob
++import stat
+
+ from setuptools import setup, find_packages
+ from distutils.command.build import build as orig_build
+@@ -306,7 +307,15 @@
+ orig_copy_tree = distutils.dir_util.copy_tree
+ distutils.dir_util.copy_tree = wx_copy_tree
+
++# Monkey-patch make_writeable too. Sometimes the link is copied before the
++# target, and the original make_writable will fail on a link to a missing
++# target.
++def wx_make_writable(target):
++ if not os.path.islink(target):
++ os.chmod(target, os.stat(target).st_mode | stat.S_IWRITE)
+
++import setuptools.command.build_py
++setuptools.command.build_py.make_writable = wx_make_writable
+
+ #----------------------------------------------------------------------
+
diff --git a/libraries/wxPython4/wxPython4.SlackBuild b/libraries/wxPython4/wxPython4.SlackBuild
index fb1167e6df..c47043b4ac 100644
--- a/libraries/wxPython4/wxPython4.SlackBuild
+++ b/libraries/wxPython4/wxPython4.SlackBuild
@@ -73,6 +73,8 @@ 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 -p1 < $CWD/newer_setuptools.patch
+
python3 setup.py install --root=$PKG
mkdir -p $PKG/usr/share/{applications,pixmaps} $PKG/usr/share/icons/hicolor/{16x16,32x32}/apps