mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 09:40:07 +01:00
Fix error with symlinks when building the wheel on Linux
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
# This file was generated by wxPython's wscript.
|
||||
|
||||
VERSION_STRING = '4.1.0a1'
|
||||
VERSION_STRING = '4.1.0'
|
||||
|
||||
11
setup.py
11
setup.py
@@ -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
|
||||
@@ -308,6 +309,16 @@ 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
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user