]> granicus.if.org Git - python/commitdiff
- Issue #16754: Fix the incorrect shared library extension on linux. Introduce
authordoko@ubuntu.com <doko@ubuntu.com>
Thu, 21 Mar 2013 20:39:52 +0000 (13:39 -0700)
committerdoko@ubuntu.com <doko@ubuntu.com>
Thu, 21 Mar 2013 20:39:52 +0000 (13:39 -0700)
  two makefile macros SHLIB_SUFFIX and EXT_SUFFIX. SO now has the value of
  SHLIB_SUFFIX again (as in 2.x and 3.1). The SO macro is removed in 3.4.

1  2 
Lib/distutils/command/build_ext.py
Lib/distutils/sysconfig.py
Lib/distutils/tests/test_install.py
Lib/sysconfig.py
Makefile.pre.in
Misc/NEWS
configure
configure.ac
setup.py

index f7c71b3e8f22ba1bf129511c9c48a9f792a58ece,1ad0d5ff58d4f8c69d53c6eee2eb46c984b1a077..a6aad53ddf1f0e7ddd12edbc0b7b75747c2affb4
@@@ -665,11 -673,14 +665,11 @@@ class build_ext(Command)
          """
          from distutils.sysconfig import get_config_var
          ext_path = ext_name.split('.')
 -        # OS/2 has an 8 character module (extension) limit :-(
 -        if os.name == "os2":
 -            ext_path[len(ext_path) - 1] = ext_path[len(ext_path) - 1][:8]
          # extensions in debug_mode are named 'module_d.pyd' under windows
-         so_ext = get_config_var('SO')
+         ext_suffix = get_config_var('EXT_SUFFIX')
          if os.name == 'nt' and self.debug:
-             return os.path.join(*ext_path) + '_d' + so_ext
-         return os.path.join(*ext_path) + so_ext
+             return os.path.join(*ext_path) + '_d' + ext_suffix
+         return os.path.join(*ext_path) + ext_suffix
  
      def get_export_symbols(self, ext):
          """Return the list of symbols that a shared extension has to
index 71492f306cba8871f9d22261513b0bcda2e899ea,b73503d296c82ff7d149825a82efb539ae851cdb..898aa267327df997c1d76480e6d42334eb0ee663
@@@ -479,7 -486,8 +479,7 @@@ def _init_nt()
      # XXX hmmm.. a normal install puts include files here
      g['INCLUDEPY'] = get_python_inc(plat_specific=0)
  
--    g['SO'] = '.pyd'
+     g['EXT_SUFFIX'] = '.pyd'
      g['EXE'] = ".exe"
      g['VERSION'] = get_python_version().replace(".", "")
      g['BINDIR'] = os.path.dirname(os.path.abspath(sys.executable))
Simple merge
index a98cc71533fa68cd3e7fbb1bf5bb011a934ac5cc,2f5f7404fff5c80a1e6e5f50213d025a843ab5c5..20956573587a2077365a6c88789f25d10f1da4ce
@@@ -416,7 -436,8 +416,7 @@@ def _init_non_posix(vars)
      vars['LIBDEST'] = get_path('stdlib')
      vars['BINLIBDEST'] = get_path('platstdlib')
      vars['INCLUDEPY'] = get_path('include')
--    vars['SO'] = '.pyd'
+     vars['EXT_SUFFIX'] = '.pyd'
      vars['EXE'] = '.exe'
      vars['VERSION'] = _PY_VERSION_SHORT_NO_DOT
      vars['BINDIR'] = os.path.dirname(_safe_realpath(sys.executable))
diff --cc Makefile.pre.in
index ad91c302e063831d4521f81ce5f26ca52c2ded8b,6709f4a68a0fad6436b3af7213414dc101464a2f..534ddc0dc550c3b5ebc6d44681dadc2b9bb168ed
@@@ -125,7 -125,9 +125,8 @@@ INCLUDEPY= $(INCLUDEDIR)/python$(LDVERS
  CONFINCLUDEPY=        $(CONFINCLUDEDIR)/python$(LDVERSION)
  
  # Symbols used for using shared libraries
- SO=           @SO@
+ SHLIB_SUFFIX= @SHLIB_SUFFIX@
+ EXT_SUFFIX=   @EXT_SUFFIX@
 -SO=           $(SHLIB_SUFFIX)
  LDSHARED=     @LDSHARED@ $(PY_LDFLAGS)
  BLDSHARED=    @BLDSHARED@ $(PY_LDFLAGS)
  LDCXXSHARED=  @LDCXXSHARED@
diff --cc Misc/NEWS
Simple merge
diff --cc configure
index c5256642d13df8091760870b9adfeac8f07493ca,fa8d518783438ec30cd4c1a5e61c6b2edf4ece30..aefad26880838a442a17eed7c791a1ccc378bbaf
+++ b/configure
@@@ -625,8 -625,7 +625,9 @@@ ac_includes_default="
  ac_subst_vars='LTLIBOBJS
  SRCDIRS
  THREADHEADERS
 +LIBPL
 +PY_ENABLE_SHARED
+ EXT_SUFFIX
  SOABI
  LIBC
  LIBM
@@@ -13695,49 -13719,6 +13723,10 @@@ LDVERSION='$(VERSION)$(ABIFLAGS)
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
  $as_echo "$LDVERSION" >&6; }
  
- # SO is the extension of shared libraries `(including the dot!)
- # -- usually .so, .sl on HP-UX, .dll on Cygwin
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
- $as_echo_n "checking SO... " >&6; }
- if test -z "$SO"
- then
-       case $ac_sys_system in
-       hp*|HP*)
-               case `uname -m` in
-                       ia64) SO=.so;;
-                       *)    SO=.sl;;
-               esac
-               ;;
-       CYGWIN*)   SO=.dll;;
-       Linux*|GNU*)
-                  SO=.${SOABI}.so;;
-       *)         SO=.so;;
-       esac
- else
-       # this might also be a termcap variable, see #610332
-       echo
-       echo '====================================================================='
-       echo '+                                                                   +'
-       echo '+ WARNING: You have set SO in your environment.                     +'
-       echo '+ Do you really mean to change the extension for shared libraries?  +'
-       echo '+ Continuing in 10 seconds to let you to ponder.                    +'
-       echo '+                                                                   +'
-       echo '====================================================================='
-       sleep 10
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
- $as_echo "$SO" >&6; }
- cat >>confdefs.h <<_ACEOF
- #define SHLIB_EXT "$SO"
- _ACEOF
 +
 +LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}"
 +
 +
  # Check whether right shifting a negative integer extends the sign bit
  # or fills with zeros (like the Cray J90, according to Tim Peters).
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
diff --cc configure.ac
index 34f19f3bd9645671e4fa81bbab015a3e5dbcf7ad,8cf0e9251b70d1f5a2c4377c38221306c2867cca..12dde47be4c754a7ea531350cc38bf851ba3632e
@@@ -3931,44 -3954,6 +3956,11 @@@ AC_MSG_CHECKING(LDVERSION
  LDVERSION='$(VERSION)$(ABIFLAGS)'
  AC_MSG_RESULT($LDVERSION)
  
- # SO is the extension of shared libraries `(including the dot!)
- # -- usually .so, .sl on HP-UX, .dll on Cygwin
- AC_MSG_CHECKING(SO)
- if test -z "$SO"
- then
-       case $ac_sys_system in
-       hp*|HP*)
-               case `uname -m` in
-                       ia64) SO=.so;;
-                       *)    SO=.sl;;
-               esac
-               ;;
-       CYGWIN*)   SO=.dll;;
-       Linux*|GNU*)
-                  SO=.${SOABI}.so;;
-       *)         SO=.so;;
-       esac
- else
-       # this might also be a termcap variable, see #610332
-       echo
-       echo '====================================================================='
-       echo '+                                                                   +'
-       echo '+ WARNING: You have set SO in your environment.                     +'
-       echo '+ Do you really mean to change the extension for shared libraries?  +'
-       echo '+ Continuing in 10 seconds to let you to ponder.                    +'
-       echo '+                                                                   +'
-       echo '====================================================================='
-       sleep 10
- fi
- AC_MSG_RESULT($SO)
- AC_DEFINE_UNQUOTED(SHLIB_EXT, "$SO", [Define this to be extension of shared libraries (including the dot!).])
 +dnl define LIBPL after ABIFLAGS and LDVERSION is defined.
 +AC_SUBST(PY_ENABLE_SHARED)
 +LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}"
 +AC_SUBST(LIBPL)
 +
  # Check whether right shifting a negative integer extends the sign bit
  # or fills with zeros (like the Cray J90, according to Tim Peters).
  AC_MSG_CHECKING(whether right shift extends the sign bit)
diff --cc setup.py
Simple merge