Quantcast

Distutils sdist formats best practice

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Distutils sdist formats best practice

Alex Clark
Hi,

What is the best practice for creating sdists with varying compression
formats?

I just noticed that the format is largely platform-specific[1]. So I'm
inclined to have pythonpackages.com create all popular formats and make
them available for download, i.e.:

- bzip2
- zip
- gzip


What do pip/easy_install/etc do when they encounter both a .zip and a
.tar.gz, for example? Is it "better" or "worse" to upload more than a
single format?


Alex



[1] http://docs.python.org/distutils/sourcedist.html



--
Alex Clark ยท http://pythonpackages.com

_______________________________________________
Catalog-SIG mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/catalog-sig
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Distutils sdist formats best practice

Hanno Schlichting-4
On Mon, Feb 6, 2012 at 6:19 PM, Alex Clark <[hidden email]> wrote:
> What is the best practice for creating sdists with varying compression
> formats?

In the past it was best to create .zip files for all platforms. This
was largely to avoid problems in Python's tarfile module in Python 2.4
and maybe 2.5, which failed to extract files whose combined path and
file name was exactly 100 characters long.

These days that's likely no longer a major concern.

Personally I'd still use zip files for all platforms, as all of them
by default have tools to open and extract these files. On *nix
platforms it's also not always clear if Python was built with bzip2
support or if that option was omitted.

Hanno
_______________________________________________
Catalog-SIG mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/catalog-sig
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Distutils sdist formats best practice

PJ Eby
In reply to this post by Alex Clark
On Mon, Feb 6, 2012 at 12:19 PM, Alex Clark <[hidden email]> wrote:
What do pip/easy_install/etc do when they encounter both a .zip and a .tar.gz, for example?

IIRC, easy_install will take the longer filename in preference to the shorter one, all else being equal; that's its final tiebreaker after what kind of thing it expects to find at a given URL.

_______________________________________________
Catalog-SIG mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/catalog-sig
Loading...