On Fri, Mar 26, 2010 at 9:31 AM, Martin Raspaud <martin.rasp...@smhi.se> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > > I am writing a recipe for buildout, and as such I would like to get the full > name of a develop egg programatically as it would appear if I installed it. > For example if the setup.py defines the name to "myproject", I would like to > get > myproject-0.3.0-py2.5-linux-x86_64.egg > > How to I get this ? > > I look a little bit in the setuptools source code, but it's not easy to find.
It's provided by the egg_name() function in the Distribution class (the one in pkg_resources, not the one in setuptools.dist) >>> from pkg_resources import Distribution, get_build_platform >>> from distutils.sysconfig import get_python_version >>> dist = Distribution(None, None, 'myproject', '0.3.0', get_python_version(), >>> get_build_platform()) >>> dist.egg_name() + '.egg' 'myproject-0.3.0-py2.6-macosx-10.3-fat.egg' > > Thanks, > Martin > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ > > iQEcBAEBAgAGBQJLrHDPAAoJEBdvyODiyJI4LhkH/0ep+wfUtAT7IzHdStNUcInT > i9WQx9zyzMmIlWKzgHwSjtN48os3JfKE6iww6QHI6bNH6srDR+dSgeuytfEX8eeh > oMuIYKR5LNgsrol1ZYulQHVz2UGdY308uI4rjxGSFhbwMEs3TGIX4VqrisHK/0uq > RciBMtsa2cmuLrjeTVZVlLHnjGEpili7OUMcjiwcrNch0n24UtuS+hmGDx30E6bl > rGIdr8rWDz7L5KwkbVu/tDAiqy7WRE4uQ8Voc/KDCLks4bXG6CjtcqC264hFqhYS > XmYGqXkk32rJOV6NR2hqAfUapq7EaAVv50DJ2QopvxIiI5lpkxIkgcfbUFvH0aM= > =KIh9 > -----END PGP SIGNATURE----- > > _______________________________________________ > Distutils-SIG maillist - distutils-...@python.org > http://mail.python.org/mailman/listinfo/distutils-sig > > -- Tarek Ziadé | http://ziade.org _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig