[Python-checkins] distutils2: Move one method to ease diffing with configure.py.

tarek.ziade python-checkins at python.org
Sun Aug 8 11:50:48 CEST 2010


tarek.ziade pushed d1a4938bc04b to distutils2:

http://hg.python.org/distutils2/rev/d1a4938bc04b
changeset:   514:d1a4938bc04b
user:        ?ric Araujo <merwok at netwok.org>
date:        Sat Aug 07 18:16:04 2010 +0200
summary:     Move one method to ease diffing with configure.py.
files:       src/distutils2/command/install.py

diff --git a/src/distutils2/command/install.py b/src/distutils2/command/install.py
--- a/src/distutils2/command/install.py
+++ b/src/distutils2/command/install.py
@@ -333,23 +333,6 @@
         if self.no_distinfo is None:
             self.no_distinfo = False
 
-    def dump_dirs(self, msg):
-        """Dumps the list of user options."""
-        from distutils2.fancy_getopt import longopt_xlate
-        log.debug(msg + ":")
-        for opt in self.user_options:
-            opt_name = opt[0]
-            if opt_name[-1] == "=":
-                opt_name = opt_name[0:-1]
-            if opt_name in self.negative_opt:
-                opt_name = self.negative_opt[opt_name]
-                opt_name = opt_name.translate(longopt_xlate)
-                val = not getattr(self, opt_name)
-            else:
-                opt_name = opt_name.translate(longopt_xlate)
-                val = getattr(self, opt_name)
-            log.debug("  %s: %s" % (opt_name, val))
-
     def finalize_unix(self):
         """Finalizes options for posix platforms."""
         if self.install_base is not None or self.install_platbase is not None:
@@ -412,6 +395,22 @@
                 raise DistutilsPlatformError, \
                       "I don't know how to install stuff on '%s'" % os.name
 
+    def dump_dirs(self, msg):
+        """Dumps the list of user options."""
+        log.debug(msg + ":")
+        for opt in self.user_options:
+            opt_name = opt[0]
+            if opt_name[-1] == "=":
+                opt_name = opt_name[0:-1]
+            if opt_name in self.negative_opt:
+                opt_name = self.negative_opt[opt_name]
+                opt_name = opt_name.replace('-', '_')
+                val = not getattr(self, opt_name)
+            else:
+                opt_name = opt_name.replace('-', '_')
+                val = getattr(self, opt_name)
+            log.debug("  %s: %s" % (opt_name, val))
+
     def select_scheme(self, name):
         """Sets the install directories by applying the install schemes."""
         # it's the caller's problem if they supply a bad name!

--
Repository URL: http://hg.python.org/distutils2


More information about the Python-checkins mailing list