-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deloceate: make copied lib files writeable
- Loading branch information
Showing
3 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
diff --git a/src/repairwheel/_vendor/delocate/delocating.py b/src/repairwheel/_vendor/delocate/delocating.py | ||
index dbdcd80..a8ca72d 100644 | ||
--- a/src/repairwheel/_vendor/delocate/delocating.py | ||
+++ b/src/repairwheel/_vendor/delocate/delocating.py | ||
@@ -7,6 +7,7 @@ import functools | ||
import logging | ||
import os | ||
import shutil | ||
+import stat | ||
import warnings | ||
from os.path import abspath, basename, dirname, exists | ||
from os.path import join as pjoin | ||
@@ -188,6 +189,9 @@ def _copy_required_libs( | ||
"Copying library %s to %s", old_path, relpath(new_path, root_path) | ||
) | ||
shutil.copy(old_path, new_path) | ||
+ statinfo = os.stat(new_path) | ||
+ if not statinfo.st_mode & stat.S_IWRITE: | ||
+ os.chmod(new_path, statinfo.st_mode | stat.S_IWRITE) | ||
# Delocate this file now that it is stored locally. | ||
needs_delocating.add(new_path) | ||
# Update out_lib_dict with the new file paths. |