Remove Python3 hack from spec file

Python 3 module has been marked as stable upstream, so we no longer need
this hack, disabling Python 2 support with a configure option is enough.

Signed-off-by: Antonio Torres <antorres@redhat.com>
This commit is contained in:
Antonio Torres 2022-10-17 17:07:42 +02:00
parent d2db6eed8c
commit 38b3f086ca
No known key found for this signature in database
GPG Key ID: 359FAF777296F653

View File

@ -215,18 +215,10 @@ This plugin provides the REST support for the FreeRADIUS server project.
# Force compile/link options, extra security for network facing daemon
%global _hardened_build 1
# Hack: rlm_python3 as stable; prevents building other unstable modules.
sed 's/rlm_python/rlm_python3/g' src/modules/stable -i
%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
# we can run reconfig before cleaning up after ourselves and running
# configure for real.
./configure && make reconfig && (make clean distclean || true)
%configure \
--libdir=%{_libdir}/freeradius \
--enable-reproducible-builds \
@ -245,6 +237,7 @@ export PY3_INC_DIR="$(python3 -c 'import sysconfig; print(sysconfig.get_config_v
--with-rlm_python3 \
--with-rlm-python3-lib-dir=$PY3_LIB_DIR \
--with-rlm-python3-include-dir=$PY3_INC_DIR \
--without-rlm_python \
--without-rlm_eap_ikev2 \
--without-rlm_eap_tnc \
--without-rlm_sql_iodbc \