summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>2000-04-22 02:52:44 (GMT)
committerGreg Ward <gward@python.net>2000-04-22 02:52:44 (GMT)
commit4982f98bc919d2a6377e3e0e82c186bc5b1d70ff (patch)
treec01a4f3acaea40c1c6231145ffa72c388761954d /Lib
parent0ae7f76b40a6700491aa739070f2a830dbbb0409 (diff)
downloadcpython-4982f98bc919d2a6377e3e0e82c186bc5b1d70ff.zip
cpython-4982f98bc919d2a6377e3e0e82c186bc5b1d70ff.tar.gz
cpython-4982f98bc919d2a6377e3e0e82c186bc5b1d70ff.tar.bz2
Fix how we generate the meta-data query methods to include 'get_fullname()'
and the other "composite meta-data" methods.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/distutils/dist.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/Lib/distutils/dist.py b/Lib/distutils/dist.py
index a209212..4a83c79 100644
--- a/Lib/distutils/dist.py
+++ b/Lib/distutils/dist.py
@@ -123,9 +123,11 @@ class Distribution:
# worth it. Also delegate 'get_XXX()' methods to the 'metadata'
# object in a sneaky and underhanded (but efficient!) way.
self.metadata = DistributionMetadata ()
- for attr in dir(self.metadata):
- meth_name = "get_" + attr
- setattr(self, meth_name, getattr(self.metadata, meth_name))
+ method_basenames = dir(self.metadata) + \
+ ['fullname', 'contact', 'contact_email']
+ for basename in method_basenames:
+ method_name = "get_" + basename
+ setattr(self, method_name, getattr(self.metadata, method_name))
# 'cmdclass' maps command names to class objects, so we
# can 1) quickly figure out which class to instantiate when