diff options
| author | ?ric Araujo <merwok@netwok.org> | 2012-02-09 19:41:19 +0100 |
|---|---|---|
| committer | ?ric Araujo <merwok@netwok.org> | 2012-02-09 19:41:19 +0100 |
| commit | 90b039c8d93fe3fb157fc4fe5bb47265dd8a4399 (patch) | |
| tree | 6ac5d19ea79ec7224288058b6e1ad5b51df03256 /distutils2/compiler | |
| parent | 95256a04b9d2d83e0c6a08a5afaffd07a6978272 (diff) | |
| download | disutils2-90b039c8d93fe3fb157fc4fe5bb47265dd8a4399.tar.gz | |
Use sys.version_info instead of sys.version.
The contents of this attribute are an implementation detail, as
documented for #9442, so we should not parse it, to support non-CPython
VMs in the future.
Unfortunately, one use comes directly from PEP 345, so an edit will have
to be agreed before fixing the code (see comment in d2.markers).
Other remaining uses are found in d2.compiler and could be replaced by
the platform module (which also parses sys.version, but then it wouldn?t
be my fault :)
Diffstat (limited to 'distutils2/compiler')
| -rw-r--r-- | distutils2/compiler/cygwinccompiler.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/distutils2/compiler/cygwinccompiler.py b/distutils2/compiler/cygwinccompiler.py index 8115e9b..63bfc64 100644 --- a/distutils2/compiler/cygwinccompiler.py +++ b/distutils2/compiler/cygwinccompiler.py @@ -56,6 +56,10 @@ from distutils2.errors import PackagingExecError, CompileError, UnknownFileError from distutils2.util import get_compiler_versions from distutils2._backport import sysconfig +# TODO use platform instead of sys.version +# (platform does unholy sys.version parsing too, but at least it gives other +# VMs a chance to override the returned values) + def get_msvcr(): """Include the appropriate MSVC runtime library if Python was built |
