[Python-checkins] distutils2: [datafiles] remove regex use to detect space. You just can't escape them
tarek.ziade
python-checkins at python.org
Wed Feb 16 22:23:57 CET 2011
tarek.ziade pushed 9d8967f87a31 to distutils2:
http://hg.python.org/distutils2/rev/9d8967f87a31
changeset: 1036:9d8967f87a31
user: Pierre-Yves David <pierre-yves.david at ens-lyon.org>
date: Fri Jan 28 18:53:47 2011 +0100
summary:
[datafiles] remove regex use to detect space. You just can't escape them
files:
distutils2/config.py
diff --git a/distutils2/config.py b/distutils2/config.py
--- a/distutils2/config.py
+++ b/distutils2/config.py
@@ -167,19 +167,17 @@
# manifest template
self.dist.extra_files = files.get('extra_files', [])
-
+
if 'resources' in content:
resources = []
- regex = re.compile(r'[^\\](?:\\{2})* ')
for glob, destination in content['resources'].iteritems():
- splitted_glob = regex.split(glob, 1)
+ splitted_glob = glob.split(' ', 1)
if len(splitted_glob) == 1:
prefix = ''
suffix = splitted_glob[0]
else:
prefix = splitted_glob[0]
suffix = splitted_glob[1]
-
resources.append((prefix, suffix, destination))
dir = os.path.dirname(os.path.join(os.getcwd(), filename))
--
Repository URL: http://hg.python.org/distutils2
More information about the Python-checkins
mailing list