]> granicus.if.org Git - python/commitdiff
- Issue #17752: Fix distutils tests when run from the installed location.
authordoko@ubuntu.com <doko@ubuntu.com>
Wed, 7 May 2014 02:44:42 +0000 (04:44 +0200)
committerdoko@ubuntu.com <doko@ubuntu.com>
Wed, 7 May 2014 02:44:42 +0000 (04:44 +0200)
Lib/distutils/tests/support.py
Misc/NEWS
configure
configure.ac

index 71ad4f42b2caccfe183c41222586339022b50fc4..7385c6bbf67171c55c428ff46abfbd0277c74e94 100644 (file)
@@ -207,4 +207,4 @@ def fixup_build_ext(cmd):
                 cmd.library_dirs = []
             else:
                 name, equals, value = runshared.partition('=')
-                cmd.library_dirs = value.split(os.pathsep)
+                cmd.library_dirs = [d for d in value.split(os.pathsep) if d]
index 2ca47f047be959b5431b773ed636c46e10bbe0bc..f7dd62c9190d1ee640a8ef4d9f169770ed27e16f 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -38,6 +38,8 @@ Library
 Tests
 -----
 
+- Issue #17752: Fix distutils tests when run from the installed location.
+
 - Issue #20946: Correct alignment assumptions of some ctypes tests.
 
 - Issue #20939: Fix test_geturl failure in test_urllibnet due to
index 6be41f506c9a9f298bc5aa7208cb9c8b77ba93a7..c278c8e055202a7cbd2a93b3f54b2dfe6b1a697e 100755 (executable)
--- a/configure
+++ b/configure
@@ -5576,7 +5576,7 @@ $as_echo_n "checking LDLIBRARY... " >&6; }
 if test "$enable_framework"
 then
   LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
-  RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
+  RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
   BLDLIBRARY=''
 else
   BLDLIBRARY='$(LDLIBRARY)'
@@ -5595,7 +5595,7 @@ $as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
     SunOS*)
          LDLIBRARY='libpython$(LDVERSION).so'
          BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
-         RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
+         RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
          INSTSONAME="$LDLIBRARY".$SOVERSION
          if test "$with_pydebug" != yes
          then
@@ -5605,7 +5605,7 @@ $as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
     Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
          LDLIBRARY='libpython$(LDVERSION).so'
          BLDLIBRARY='-L. -lpython$(LDVERSION)'
-         RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
+         RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
          case $ac_sys_system in
              FreeBSD*)
                SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
@@ -5627,16 +5627,16 @@ $as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
                        ;;
          esac
          BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
-         RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
+         RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
          ;;
     Darwin*)
        LDLIBRARY='libpython$(LDVERSION).dylib'
        BLDLIBRARY='-L. -lpython$(LDVERSION)'
-       RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
+       RUNSHARED='DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}'
        ;;
     AIX*)
        LDLIBRARY='libpython$(LDVERSION).so'
-       RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
+       RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
        ;;
 
   esac
index 6a64bff46ec2027bf43af45d2616a03c97928624..0e67f032b3aca5700bec3a9336d4a9026178deb0 100644 (file)
@@ -909,7 +909,7 @@ AC_MSG_CHECKING(LDLIBRARY)
 if test "$enable_framework"
 then
   LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
-  RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
+  RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
   BLDLIBRARY=''
 else
   BLDLIBRARY='$(LDLIBRARY)'
@@ -926,7 +926,7 @@ if test $enable_shared = "yes"; then
     SunOS*)
          LDLIBRARY='libpython$(LDVERSION).so'
          BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
-         RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
+         RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
          INSTSONAME="$LDLIBRARY".$SOVERSION
          if test "$with_pydebug" != yes
          then
@@ -936,7 +936,7 @@ if test $enable_shared = "yes"; then
     Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
          LDLIBRARY='libpython$(LDVERSION).so'
          BLDLIBRARY='-L. -lpython$(LDVERSION)'
-         RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
+         RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
          case $ac_sys_system in
              FreeBSD*)
                SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
@@ -958,16 +958,16 @@ if test $enable_shared = "yes"; then
                        ;;
          esac
          BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
-         RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
+         RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
          ;;
     Darwin*)
        LDLIBRARY='libpython$(LDVERSION).dylib'
        BLDLIBRARY='-L. -lpython$(LDVERSION)'
-       RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
+       RUNSHARED='DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}'
        ;;
     AIX*)
        LDLIBRARY='libpython$(LDVERSION).so'
-       RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
+       RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
        ;;
 
   esac