Merge pull request #1015 from andkit/fix-821

Add correct wxpython version to PACKAGES.txt (fixes #821)
This commit is contained in:
Oskar Hahn 2013-11-10 08:32:32 -08:00
commit 7bc0f5a5dc

View File

@ -430,13 +430,13 @@ def write_package_info_content(outfile):
""" """
text = ['Included Packages\n', 17 * '=' + '\n', '\n'] text = ['Included Packages\n', 17 * '=' + '\n', '\n']
for pkg in sorted(SITE_PACKAGES): for pkg in sorted(SITE_PACKAGES):
try: if pkg == "wx":
# wxpython comes from an installer and has no distribution
# --> handle it separately
text.append("wxpython-{0}\n".format(wx.__version__))
else:
dist = pkg_resources.get_distribution(pkg) dist = pkg_resources.get_distribution(pkg)
text.append("{0}-{1}\n".format(dist.project_name, dist.version)) text.append("{0}-{1}\n".format(dist.project_name, dist.version))
except pkg_resources.DistributionNotFound:
# FIXME: wxpython comes from an installer and has no distribution
# see what we can do about that
text.append("{0}-???\n".format(pkg))
with open(outfile, "w") as f: with open(outfile, "w") as f:
f.writelines(text) f.writelines(text)