
On Thu, Jun 18, 2009 at 3:57 AM, Ben Finneyben+python@benfinney.id.au wrote:
Trent Mick trentm@gmail.com writes:
My preferences is for .zip (that is what I use for my packages), the main reason is that Windows users can always unpack a .zip file. Often that is not true for .tar.gz or .tar.bz2 files.
The reverse is true on Unix. The tar-and-gzip format is extensively used so it is pretty much guaranteed to be readable on any Unix system; the Zip format does not have anywhere near the same level of guarantee.
I would think the best solution is to use the tar format (since, as pointed out elsewhere, it has better support for symlinks and permission flags that are often important when distributing works), and ensure that distutils will include a tool for unpacking them with pure Python on those platforms without external support for the format.
+1
A end-user that uses easy_install ends up calling the stdlib tarfile module to unpack the archives, so it works out of the box. I guess pip is also using that code (unpack_archive in setuptools.archive_util)
Although, I would rather see a new high-level function in tarfile itself, callable from the __main__ section, to pack/unpack an archive provided in the arguments. (like the doctest modules has).
Cheers Tarek