[geany/geany-plugins] e7b658: geanypy: Try to locate the real dereferenced Python DSO

Colomban Wendling git-noreply at xxxxx
Sun Oct 11 13:33:19 UTC 2015


Branch:      refs/heads/master
Author:      Colomban Wendling <ban at herbesfolles.org>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Sun, 11 Oct 2015 13:33:19 UTC
Commit:      e7b658483c62cb15baf17de6fefda13c70f85b01
             https://github.com/geany/geany-plugins/commit/e7b658483c62cb15baf17de6fefda13c70f85b01

Log Message:
-----------
geanypy: Try to locate the real dereferenced Python DSO

Try to pre-load the Python library with its real, fully dereferenced
path.

This is necessary because some installations don't have the symlink
from the generic (.so) to the versioned one (.so.X.Y) when the Python
development files aren't installed (i.e. libpython2.7-dev on Debian).

Fortunately for us (at least under Debian) Python has the name of the
final installed library in its `INSTSONAME` sysconfig's config var, so
use this instead of `LDLIBRARY` when it's available.

Closes https://github.com/codebrainz/geanypy/issues/20


Modified Paths:
--------------
    geanypy/m4/ax_python_library.m4

Modified: geanypy/m4/ax_python_library.m4
5 lines changed, 4 insertions(+), 1 deletions(-)
===================================================================
@@ -17,7 +17,10 @@ cvars = get_config_vars()
 # support multiarch-enabled distributions like Ubuntu
 if not 'MULTIARCH' in cvars.keys():
     cvars[['MULTIARCH']] = ''
-print(path_join(cvars[['LIBDIR']], cvars[['MULTIARCH']], cvars[['LDLIBRARY']]))
+# try to find the real installed lib, not the generic link
+if not 'INSTSONAME' in cvars.keys():
+    cvars[['INSTSONAME']] = cvars[['LDLIBRARY']]
+print(path_join(cvars[['LIBDIR']], cvars[['MULTIARCH']], cvars[['INSTSONAME']]))
 EOD`
 
 	AC_SUBST([PYTHON_LIBRARY], [$ax_python_library])



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Plugins-Commits mailing list