Get Python LDFLAGS from 'pkg-config'. The other approach is more complex and gets it wrong: it returns "-L/path/to/python/lib/python-2.7.10/lib/python2.7/config -lpython -lwhatever"; since that config/ sub-directory contains libpython2.7.a, we end up statically linking Python in Weechat's python.so, which we do not want. --- weechat-1.3/configure.ac 2015-08-16 08:27:07.000000000 +0200 +++ weechat-1.3/configure.ac 2015-11-29 18:18:52.975197048 +0100 @@ -535,29 +535,7 @@ if test "x$enable_python" = "xyes" ; the if test -r "$PYTHON_INCLUDE/Python.h"; then PYTHON_CFLAGS="-I$PYTHON_INCLUDE" AC_MSG_RESULT(found) - PYTHON_LIB=`$PYTHON -c "import sys, distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_config_var('LIBPL'))"` - PYTHON_LFLAGS="-lpython$PYTHON_VERSION "`$PYTHON -c "import sys, distutils.sysconfig; sys.stdout.write(distutils.sysconfig.get_config_var('LIBS')+' '+distutils.sysconfig.get_config_var('SYSLIBS')+' '+distutils.sysconfig.get_config_var('LINKFORSHARED'))"` - AC_MSG_CHECKING(for Python library) - if test -r "$PYTHON_LIB/libpython$PYTHON_VERSION.so"; then - PYTHON_LFLAGS="-L$PYTHON_LIB $PYTHON_LFLAGS" - AC_MSG_RESULT(found) - elif test -r "$PYTHON_LIB/libpython$PYTHON_VERSION.a"; then - PYTHON_LFLAGS="-L$PYTHON_LIB $PYTHON_LFLAGS" - AC_MSG_RESULT(found) - elif test -r "$PYTHON_LIB/libpython$PYTHON_VERSION.dll.a"; then - PYTHON_LFLAGS="-L$PYTHON_LIB $PYTHON_LFLAGS" - AC_MSG_RESULT(found) - elif test -r "$PYTHON_SYSPREFIX/lib/libpython$PYTHON_VERSION.so"; then - PYTHON_LFLAGS="-L$PYTHON_SYSPREFIX/lib/ $PYTHON_LFLAGS" - AC_MSG_RESULT(found) - else - AC_MSG_WARN([ -*** Python library couldn't be found on your system. -*** Try to install it with your software package manager. -*** WeeChat will be built without Python support.]) - enable_python="no" - not_found="$not_found python" - fi + PYTHON_LFLAGS=`pkg-config python2 --libs` else AC_MSG_WARN([ *** Python header files couldn't be found on your system. Commit message (Expand)Author 2021-01-16guix: Move narinfo code from substitute script to module....This separation between the code for dealing with narinfos from the code doing that for a purpose should make things clearer, and better support components other that the substitute script in using this code. This is just moving the code around, no code should have been significantly changed. * guix/scripts/substitute.scm (<narinfo>): Move record type to (guix narinfo). (fields->alist, narinfo-hash-algorithm+value, narinfo-hash->sha256, narinfo-signature->canonical-sexp, narinfo-maker, read-narinfo, narinfo-sha256, valid-narinfo?, write-narinfo, narinfo->string, string->narinfo, equivalent-narinfo?, supported-compression?, compresses-better?, narinfo-best-uri): Move procedures to (guix narinfo). (%compression-methods): Move variable to (guix narinfo). * guix/narinfo.scm: New file. * Makefile.am (MODULES): Add it. * po/guix/POTFILES.in: Add 'guix/narinfo.scm'. Christopher Baines 2020-05-22packages: Introduce <content-hash> and use it in <origin>....* guix/packages.scm (<content-hash>): New record type. (define-content-hash-constructor, build-content-hash) (content-hash): New macros. (print-content-hash): New procedure. (<origin>): Rename constructor to '%origin'. [sha256]: Remove field. [hash]: New field. Adjust users. (origin-compatibility-helper, origin): New macros. (origin-sha256): New deprecated procedure. (origin->derivation): Adjust accordingly. * tests/packages.scm ("package-source-derivation, origin, sha512"): New test. * guix/tests.scm: Hide (gcrypt hash) 'sha256' for proper syntax matching. * tests/challenge.scm: Add #:prefix for (gcrypt hash) and adjust users. * tests/derivations.scm: Likewise. * tests/store.scm: Likewise. * tests/graph.scm ("bag DAG, including origins"): Provide 'sha256' field with the right length. * gnu/packages/aspell.scm (aspell-dictionary) (aspell-dict-ca, aspell-dict-it): Use 'hash' and 'content-hash' for proper syntax matching. * gnu/packages/bash.scm (bash-patch): Rename 'sha256' to 'sha256-bv'. * gnu/packages/bootstrap.scm (bootstrap-executable): Rename 'sha256' to 'bv'. * gnu/packages/readline.scm (readline-patch): Likewise. * gnu/packages/virtualization.scm (qemu-patch): Rename 'sha256' to 'sha256-bv'. * guix/import/utils.scm: Hide (gcrypt hash) 'sha256'. Ludovic Courtès