From 8f2d2c4e121a1368cfa7560e046c3ce2a8161e83 Mon Sep 17 00:00:00 2001 From: Antonio Torres Date: Wed, 30 Jun 2021 11:37:43 +0200 Subject: [PATCH] Fix python3 not being correctly linked Since Python 3.8, there is a new way to link against libpython: https://docs.python.org/3/whatsnew/3.8.html#debug-build-uses-the-same-abi-as-release-build Resolves: #1948622 Signed-off-by: Antonio Torres --- freeradius.spec | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/freeradius.spec b/freeradius.spec index a3b2db9..c33844e 100644 --- a/freeradius.spec +++ b/freeradius.spec @@ -214,9 +214,8 @@ This plugin provides the REST support for the FreeRADIUS server project. # Hack: rlm_python3 as stable; prevents building other unstable modules. sed 's/rlm_python/rlm_python3/g' src/modules/stable -i -# python3-config is broken: -# https://bugzilla.redhat.com/show_bug.cgi?id=1772988 -export PY3_LIB_DIR=%{_libdir}/"$(python3-config --configdir | sed 's#/usr/lib/##g')" +%global build_ldflags %{build_ldflags} $(python3-config --embed --libs) +export PY3_LIB_DIR="$(python3-config --configdir)" export PY3_INC_DIR="$(python3 -c 'import sysconfig; print(sysconfig.get_config_var("INCLUDEPY"))')" # In order for the above hack to stick, do a fake configure so