I have created a zip archive in Python with shutil.make_archive, but when I extract it with both shutil.unpack_archive and zipfile.ZipFile(file).extractall() the file modes are changed as:
old mode 100755
new mode 100644
Currently I have to make a subprocess call to run('unzip ...') for it to work? Is there a Python builtin that I can use to preserve the file modes?
As far as I know there is no inbuild way to preserve the permission. I think the argument is, that it is not part of the zip-standard and a unix-extension.
There are two workaround I know:
ZipInfo.external_attrand setting it yourself withos.chmod, described hereOne thing I don't know is if
shutil.make_archivestores these extended permissions. If not one would use the same stragies above for zipping...