diff options
-rw-r--r-- | changelog.d/1424.change.rst | 1 | ||||
-rw-r--r-- | setuptools/command/build_py.py | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/changelog.d/1424.change.rst b/changelog.d/1424.change.rst new file mode 100644 index 00000000..361997dd --- /dev/null +++ b/changelog.d/1424.change.rst @@ -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.
\ No newline at end of file diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index b0314fd4..6fc0a4e4 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -120,7 +120,7 @@ class build_py(orig.build_py, Mixin2to3): 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): |