Skip to content

Commit

Permalink
Fix error with symlinks when building the wheel on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin Dunn authored and RobinD42 committed Apr 23, 2020
1 parent cc88ed1 commit aa8430a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion demo/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# This file was generated by wxPython's wscript.

VERSION_STRING = '4.1.0a1'
VERSION_STRING = '4.1.0'
11 changes: 11 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -308,6 +309,16 @@ def wx_copy_tree(src, dst, preserve_mode=1, preserve_times=1,
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


#----------------------------------------------------------------------

Expand Down

0 comments on commit aa8430a

Please sign in to comment.