Well, you can use &quot;setup.py --name --version&quot; to get the name and version.  You can run &quot;setup.py egg_info&quot; pointed to some target directory to inspect the PKG-INFO.  There are quite a few ways to get the information.  I don&#39;t yet understand what criteria you have that make one of these ways any better than another.  If you need the name of the file it&#39;s generating so you can access that file, then I&#39;m not sure why you care *in advance* of it actually generating the file.  ;-)<br>
<br><div class="gmail_quote">On Sat, Mar 17, 2012 at 6:57 PM, Andrea Crotti <span dir="ltr">&lt;<a href="mailto:andrea.crotti.0@gmail.com">andrea.crotti.0@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

  
    
  
  <div bgcolor="#FFFFFF" text="#000000"><div><div></div><div class="h5">
    On 03/16/2012 05:37 PM, PJ Eby wrote:
    <blockquote type="cite">
      <p>On Mar 16, 2012 10:42 AM, &quot;Andrea Crotti&quot; &lt;<a href="mailto:andrea.crotti.0@gmail.com" target="_blank">andrea.crotti.0@gmail.com</a>&gt;
        wrote:<br>
        &gt;<br>
        &gt; Given the setuptools magic done by<br>
        &gt; python setup.py bdist_egg<br>
        &gt;<br>
        &gt; is there a way to find out what will be the name of the
        final egg file?<br>
        &gt; It would be really useful to know for me and I can&#39;t find
        any option<br>
        &gt; to tell bdist_egg to let me know where it will write..</p>
      <p>If you just want the file accessible by a script or some larger
        build process that&#39;s invoking the setup script, the easiest way
        to do it is to specify an empty output directory for the
        distribution to be built in, instead of &#39;dist/&#39;.  Then, there
        will only be one file in that directory after running bdist_egg:
        the egg file.</p>
      <p>(If you meant some other scenario, then you&#39;ll need to explain
        in more detail what you want.)<br>
      </p>
    </blockquote>
    <br></div></div>
    That would be the scenario yes, but it&#39;s quite a lame solution imho
    :/<br>
    I mean setuptools generates the name of this file somehow while
    building the egg file,<br>
    is that impossible to retrieve it before or after actually creating
    it?<br>
  </div>

</blockquote></div><br>