Author serhiy.storchaka
Recipients dstufft, eric.araujo, serhiy.storchaka
Date 2018-09-19.13:47:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1537364847.56.0.956365154283.issue34738@psf.upfronthosting.co.za>
In-reply-to
Content
ZIP files created by distutils don't include entries for directories. For example, if the directory structure is

    dist/
        file1.py
        sub/
            file2.py

the ZIP file will contain entries 'dist/file1.py' and 'dist/sub/file2.py', but not 'dist/' and 'dist/sub/'.

This only when use the zipfile module. If it is not available for some reasons, the zip command is used. In that case directory entries are created. The are created also in TAR files.

All other methods of packing a tree to a ZIP in the stdlib (shutil.make_archive(), zipfile CLI, zipapp, Tools/msi/make_zip.py) create directory entries too.

zipimport doesn't support implicit namespace packages if directory entries are not added (issue14905).

The proposed PR makes distutils adding directory entries in a ZIP file.
History
Date User Action Args
2018-09-19 13:47:27serhiy.storchakasetrecipients: + serhiy.storchaka, eric.araujo, dstufft
2018-09-19 13:47:27serhiy.storchakasetmessageid: <1537364847.56.0.956365154283.issue34738@psf.upfronthosting.co.za>
2018-09-19 13:47:27serhiy.storchakalinkissue34738 messages
2018-09-19 13:47:27serhiy.storchakacreate