[Catalog-sig] How to determine if archive is an sdist or bdist

James Carpenter nawkboy at gmail.com
Thu Mar 28 20:57:09 CET 2013

Is there an easy way to programmatically tell if an archive (tar.gz, zip,
etc.) in the dist directory is a binary or sdist? I would like to
post-process the contents of a dist directory and classify each build
artifact there (egg, sdist, bdist, etc.).

Currently the only approach I know of is to have my own command that is run
along with the relevant build command.  For example:

python setup.py sdist be_funky

python setup.py sdist bdist bdist_egg be_funky

Using this approach the tuples in  self.distribution.dist_files provide the
command, python version and file created. Unfortunately this solution is
slightly more complicated in my use case than simply having an easy way to
classify each build artifact and extract it's pkg-info.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/catalog-sig/attachments/20130328/bbdd049b/attachment-0001.html>

More information about the Catalog-SIG mailing list