[Python-checkins] r54645 - in python/branches/release25-maint: Lib/distutils/msvccompiler.py Misc/NEWS (original) (raw)

neal.norwitz python-checkins at python.org
Sun Apr 1 20:29:53 CEST 2007


Author: neal.norwitz Date: Sun Apr 1 20:29:47 2007 New Revision: 54645

Modified: python/branches/release25-maint/Lib/distutils/msvccompiler.py python/branches/release25-maint/Misc/NEWS Log: Backport 54644: SF #1685563, MSVCCompiler creates redundant and long PATH strings

If MSVCCompiler.initialize() was called multiple times, the path would get duplicated. On Windows, this is a problem because the path is limited to 4k. There's no benefit in adding a path multiple times, so prevent that from occuring. We also normalize the path before checking for duplicates so things like /a and /a/ won't both be stored.

Modified: python/branches/release25-maint/Lib/distutils/msvccompiler.py

--- python/branches/release25-maint/Lib/distutils/msvccompiler.py (original) +++ python/branches/release25-maint/Lib/distutils/msvccompiler.py Sun Apr 1 20:29:47 2007 @@ -187,6 +187,19 @@ j = string.find(sys.version, ")", i) return sys.version[i+len(prefix):j]

+def normalize_and_reduce_paths(paths):

class MSVCCompiler (CCompiler) : @@ -270,6 +283,7 @@ self.__paths.append(p) except KeyError: pass

Modified: python/branches/release25-maint/Misc/NEWS

--- python/branches/release25-maint/Misc/NEWS (original) +++ python/branches/release25-maint/Misc/NEWS Sun Apr 1 20:29:47 2007 @@ -219,6 +219,8 @@ Library

+- Patch #1685563: remove (don't add) duplicate paths in distutils.MSVCCompiler. +



More information about the Python-checkins mailing list