diff options
author | Éric Araujo <merwok@netwok.org> | 2012-02-10 04:20:53 (GMT) |
---|---|---|
committer | Éric Araujo <merwok@netwok.org> | 2012-02-10 04:20:53 (GMT) |
commit | 9f90a731eb9a09e9e2fc022800475ff22206ac01 (patch) | |
tree | 9d026480d581f750298603d300bc053e8fce745f /Lib/packaging/compiler | |
parent | ea0b1edf45c5fa33163fa59f33849029cd58c9e1 (diff) | |
download | cpython-9f90a731eb9a09e9e2fc022800475ff22206ac01.zip cpython-9f90a731eb9a09e9e2fc022800475ff22206ac01.tar.gz cpython-9f90a731eb9a09e9e2fc022800475ff22206ac01.tar.bz2 |
Use sys.version_info instead of sys.version in packaging.
The contents of this attribute are an implementation detail, as
documented for #9442, so we should not parse it, to support non-CPython
VMs with distutils2 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 p7g.markers).
Other remaining uses are found in p7g.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 'Lib/packaging/compiler')
-rw-r--r-- | Lib/packaging/compiler/cygwinccompiler.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/packaging/compiler/cygwinccompiler.py b/Lib/packaging/compiler/cygwinccompiler.py index 3eec067..9552667 100644 --- a/Lib/packaging/compiler/cygwinccompiler.py +++ b/Lib/packaging/compiler/cygwinccompiler.py @@ -56,6 +56,10 @@ from packaging.errors import PackagingExecError, CompileError, UnknownFileError from packaging.util import get_compiler_versions 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 |