Merged revisions 70017 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70017 | tarek.ziade | 2009-02-27 13:53:34 +0100 (Fri, 27 Feb 2009) | 1 line

  Issue #5052: make Distutils compatible with 2.3 again.
........
This commit is contained in:
Tarek Ziadé 2009-02-27 12:58:56 +00:00
parent 89fc2b7821
commit 38e3d51ea7
7 changed files with 186 additions and 38 deletions

View file

@ -7,7 +7,6 @@ extensions ASAP)."""
__revision__ = "$Id$"
import sys, os, re
from site import USER_BASE
from distutils.core import Command
from distutils.errors import *
from distutils.sysconfig import customize_compiler, get_python_version
@ -16,6 +15,14 @@ from distutils.extension import Extension
from distutils.util import get_platform
from distutils import log
# this keeps compatibility from 2.3 to 2.5
if sys.version < "2.6":
USER_BASE = None
HAS_USER_SITE = False
else:
from site import USER_BASE
HAS_USER_SITE = True
if os.name == 'nt':
from distutils.msvccompiler import get_build_version
MSVC_VERSION = int(get_build_version())
@ -91,11 +98,14 @@ class build_ext(Command):
"list of SWIG command line options"),
('swig=', None,
"path to the SWIG executable"),
('user', None,
"add user include, library and rpath"),
]
boolean_options = ['inplace', 'debug', 'force', 'swig-cpp', 'user']
boolean_options = ['inplace', 'debug', 'force', 'swig-cpp']
if HAS_USER_SITE:
user_options.append(('user', None,
"add user include, library and rpath"))
boolean_options.append('user')
help_options = [
('help-compiler', None,