[New-bugs-announce] [issue2975] VS8 include dirs grow without bound

Jim Kleckner report at bugs.python.org
Mon May 26 21:56:36 CEST 2008

New submission from Jim Kleckner <jek-python at kleckner.net>:

I tracked down a testing failure for Cython tests
on the Windows platform to be the result of how the
Visual C environment variables are being detected.

In the function, query_vcvarsall, the .bat file:
 "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"
is being run with the arguments:
 x86 & set

This in turn calls the platform-specific file vcvars32.bat (or other).
In this file, the PATH, INCLUDE, and LIBPATH environment variables are
simply being appended/prepended with their values.

initialize() then just overrides the os.environ values with these
monotonically growing variables.

It seems that duplicate names should be filtered out from these paths
to prevent overflow.

The attached patch seems to fix this issue, if a bit brute force.
Please review as a candidate.

.NET Framework 3.5 (Pre-Release


components: Distutils
files: dist.patch
keywords: patch
messages: 67387
nosy: jkleckner
severity: normal
status: open
title: VS8 include dirs grow without bound
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file10442/dist.patch

Tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list