]> granicus.if.org Git - python/commitdiff
Fix how we generate the meta-data query methods to include 'get_fullname()'
authorGreg Ward <gward@python.net>
Sat, 22 Apr 2000 02:52:44 +0000 (02:52 +0000)
committerGreg Ward <gward@python.net>
Sat, 22 Apr 2000 02:52:44 +0000 (02:52 +0000)
and the other "composite meta-data" methods.

Lib/distutils/dist.py

index a20921277842defad575493138377247f8c532f4..4a83c794ffc6da4fac4f253f0c1afa62e3075bd7 100644 (file)
@@ -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