[Python-checkins] distutils2: make sure we don't convert packages_root into a multiline value

tarek.ziade python-checkins at python.org
Sat Jan 29 14:21:48 CET 2011


tarek.ziade pushed 317bff9e4495 to distutils2:

http://hg.python.org/distutils2/rev/317bff9e4495
changeset:   913:317bff9e4495
tag:         tip
user:        Tarek Ziade <tarek at ziade.org>
date:        Sat Jan 29 14:21:43 2011 +0100
summary:
  make sure we don't convert packages_root into a multiline value

files:
  distutils2/config.py

diff --git a/distutils2/config.py b/distutils2/config.py
--- a/distutils2/config.py
+++ b/distutils2/config.py
@@ -135,11 +135,18 @@
                 if metadata.is_metadata_field(key):
                     metadata[key] = self._convert_metadata(key, value)
 
+
         if 'files' in content:
-            files = dict([(key, self._multiline(value))
+            def _convert(key, value):
+                if key not in ('packages_root',):
+                    value = self._multiline(value)
+                return value
+
+            files = dict([(key, _convert(key, value))
                           for key, value in content['files'].iteritems()])
             self.dist.packages = []
             self.dist.package_dir = pkg_dir = files.get('packages_root')
+
             packages = files.get('packages', [])
             if isinstance(packages, str):
                 packages = [packages]

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


More information about the Python-checkins mailing list