Skip to content

Commit

Permalink
Don't keep file modes for package data.
Browse files Browse the repository at this point in the history
  • Loading branch information
jorikdima committed Dec 13, 2018
1 parent 4de8dc8 commit 7843688
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/1424.change.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Prevent keeping files mode for package_data build. It may break a build if user's package data has read only flag.
2 changes: 1 addition & 1 deletion setuptools/command/build_py.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def build_package_data(self):
target = os.path.join(build_dir, filename)
self.mkpath(os.path.dirname(target))
srcfile = os.path.join(src_dir, filename)
outf, copied = self.copy_file(srcfile, target)
outf, copied = self.copy_file(srcfile, target, preserve_mode=False)
srcfile = os.path.abspath(srcfile)
if (copied and
srcfile in self.distribution.convert_2to3_doctests):
Expand Down

0 comments on commit 7843688

Please sign in to comment.