Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
988433fc
Commit
988433fc
authored
Sep 09, 2015
by
Steve Dower
Browse files
Options
Browse Files
Download
Plain Diff
Fixes handling of read-only files when creating zip package.
parents
3e2c8d84
ae69de65
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
Tools/msi/make_zip.py
Tools/msi/make_zip.py
+8
-2
No files found.
Tools/msi/make_zip.py
View file @
988433fc
...
@@ -3,6 +3,7 @@ import py_compile
...
@@ -3,6 +3,7 @@ import py_compile
import
re
import
re
import
sys
import
sys
import
shutil
import
shutil
import
stat
import
os
import
os
import
tempfile
import
tempfile
...
@@ -101,11 +102,16 @@ def copy_to_layout(target, rel_sources):
...
@@ -101,11 +102,16 @@ def copy_to_layout(target, rel_sources):
else:
else:
for s, rel in rel_sources:
for s, rel in rel_sources:
dest = target / rel
try:
try:
(target / rel)
.parent.mkdir(parents=True)
dest
.parent.mkdir(parents=True)
except FileExistsError:
except FileExistsError:
pass
pass
shutil.copy(str(s), str(target / rel))
if dest.is_file():
dest.chmod(stat.S_IWRITE)
shutil.copy(str(s), str(dest))
if dest.is_file():
dest.chmod(stat.S_IWRITE)
count += 1
count += 1
return count
return count
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment