30 lines
1.0 KiB
Diff
30 lines
1.0 KiB
Diff
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
|
|
|
|
#----------------------------------------------------------------------
|
|
|