]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Reverted changes which were inadvertently committed.
authorVinay Sajip <vinay_sajip@yahoo.co.uk>
Mon, 20 Sep 2010 10:29:54 +0000 (10:29 +0000)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>
Mon, 20 Sep 2010 10:29:54 +0000 (10:29 +0000)
Lib/distutils/sysconfig.py
Lib/sysconfig.py

index 3567db83497f5e8930c79048197662013f80f670..48f3fe4d599a806f253cadcd44c4f6092c868e93 100644 (file)
@@ -56,18 +56,6 @@ def get_python_version():
     """
     return sys.version[:3]
 
-def _get_build_dir(name, plat_specific):
-    # Assume the executable is in the build directory.  The
-    # pyconfig.h file should be in the same directory.  Since
-    # the build directory may not be the source directory, we
-    # must use "srcdir" from the makefile to find the "Include"
-    # directory.
-    base = os.path.dirname(os.path.abspath(sys.executable))
-    if plat_specific:
-        return base
-    else:
-        thedir = os.path.join(get_config_var('srcdir'), name)
-        return os.path.normpath(thedir)
 
 def get_python_inc(plat_specific=0, prefix=None):
     """Return the directory containing installed Python header files.
@@ -84,7 +72,17 @@ def get_python_inc(plat_specific=0, prefix=None):
         prefix = plat_specific and EXEC_PREFIX or PREFIX
     if os.name == "posix":
         if python_build:
-            return _get_build_dir('Include', plat_specific)
+            # Assume the executable is in the build directory.  The
+            # pyconfig.h file should be in the same directory.  Since
+            # the build directory may not be the source directory, we
+            # must use "srcdir" from the makefile to find the "Include"
+            # directory.
+            base = os.path.dirname(os.path.abspath(sys.executable))
+            if plat_specific:
+                return base
+            else:
+                incdir = os.path.join(get_config_var('srcdir'), 'Include')
+                return os.path.normpath(incdir)
         return os.path.join(prefix, "include", "python" + get_python_version())
     elif os.name == "nt":
         return os.path.join(prefix, "include")
@@ -119,8 +117,6 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
         prefix = plat_specific and EXEC_PREFIX or PREFIX
 
     if os.name == "posix":
-        if python_build:
-            return _get_build_dir('Lib', plat_specific)
         libpython = os.path.join(prefix,
                                  "lib", "python" + get_python_version())
         if standard_lib:
index 7372e3eb4737cae082e10d5f370cb9a0a6bf6041..147bd6d4fc2740deae05ca937aa7e5dc2ff95f7a 100644 (file)
@@ -123,9 +123,8 @@ _PYTHON_BUILD = is_python_build()
 
 if _PYTHON_BUILD:
     for scheme in ('posix_prefix', 'posix_home'):
-        _INSTALL_SCHEMES[scheme]['include'] = '{projectbase}/Include'
+        _INSTALL_SCHEMES[scheme]['include'] = '{srcdir}/Include'
         _INSTALL_SCHEMES[scheme]['platinclude'] = '{projectbase}/.'
-        _INSTALL_SCHEMES[scheme]['stdlib'] = '{projectbase}/Lib'
 
 def _subst_vars(s, local_vars):
     try: