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 <antorres@redhat.com>
This commit is contained in:
Antonio Torres 2021-06-30 11:37:43 +02:00
parent c4f13d4c66
commit 8f2d2c4e12
1 changed files with 2 additions and 3 deletions

View File

@ -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