How to determine if archive is an sdist or bdist
James Carpenter <[email protected]> Thu, 28 Mar 2013 14:57:09 -0500
| Newsgroups | gmane.comp.python.catalog |
|---|---|
| Message-ID | <CAAndj4sB=4KC1VC_n3upAEWkJ=GV+K=-ht539xJ7KBU5putXzQ@mail.gmail.com> |
--===============1650476407== Content-Type: multipart/alternative; boundary=089e016350464c8cf104d9018fd0 --089e016350464c8cf104d9018fd0 Content-Type: text/plain; charset=ISO-8859-1 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 or: 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. --089e016350464c8cf104d9018fd0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Is there an easy way to programmatically tell if an archiv= e (tar.gz, zip, etc.) in the dist directory is a binary or sdist? I would l= ike to post-process the contents of a dist directory and classify each buil= d artifact there (egg, sdist, bdist, etc.).<div> <br></div><div>Currently the only approach I know of is to have my own comm= and that is run along with the relevant build command. =A0For example:</div= ><div><br></div><div style>python setup.py sdist be_funky</div><div style> <br></div><div style>or:</div><div style>python setup.py sdist bdist bdist_= egg be_funky</div><div style><br></div><div style>Using this approach the t= uples in =A0self.distribution.dist_files provide the command, python versio= n and file created. Unfortunately this solution is slightly more complicate= d in my use case than simply having an easy way to classify each build arti= fact and extract it's pkg-info.</div> <div style><br></div></div> --089e016350464c8cf104d9018fd0-- --===============1650476407== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Catalog-SIG mailing list [email protected] http://mail.python.org/mailman/listinfo/catalog-sig --===============1650476407==--