mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-08 13:00:07 +01:00
Merge pull request #1369 from wxWidgets/fix-issue1363
Explicitly set permissions of the files and folders in source tarball
(cherry picked from commit 4c3e4296f9)
This commit is contained in:
14
build.py
14
build.py
@@ -914,6 +914,18 @@ def do_regenerate_sysconfig():
|
||||
|
||||
del pwd
|
||||
|
||||
|
||||
def _setTarItemPerms(tarinfo):
|
||||
"""
|
||||
Used to set permissions of the files and fodlers in the source tarball
|
||||
"""
|
||||
if tarinfo.isdir():
|
||||
tarinfo.mode = 0o755
|
||||
else:
|
||||
tarinfo.mode = 0o644
|
||||
return tarinfo
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Command functions and helpers
|
||||
#---------------------------------------------------------------------------
|
||||
@@ -1994,7 +2006,7 @@ def cmd_sdist(options, args):
|
||||
tarball = tarfile.open(name=tarfilename, mode="w:gz")
|
||||
pwd = pushDir(PDEST)
|
||||
for name in glob.glob('*'):
|
||||
tarball.add(name, os.path.join(rootname, name))
|
||||
tarball.add(name, os.path.join(rootname, name), filter=_setTarItemPerms)
|
||||
tarball.close()
|
||||
msg('Cleaning up...')
|
||||
del pwd
|
||||
|
||||
Reference in New Issue
Block a user