mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-27 12:50:33 +01:00
build-from-source: select python interpretor in build script
On rhel-8, python2 is available and in the path, but it doesn't actually work because required modules are missing.
This commit is contained in:
parent
582c45cd15
commit
5c51bfea86
1 changed files with 9 additions and 0 deletions
|
|
@ -56,6 +56,7 @@ $SUDO yum install \
|
|||
polkit-devel \
|
||||
ppp-devel \
|
||||
pygobject3-base \
|
||||
python3 \
|
||||
readline-devel \
|
||||
rpm-build \
|
||||
strace \
|
||||
|
|
@ -70,6 +71,12 @@ $SUDO yum install \
|
|||
# for the tests, let's pre-load some modules:
|
||||
$SUDO modprobe ip_gre
|
||||
|
||||
# in particular on rhel-8, the pygobject module does not exist for
|
||||
# python2. Hence, we prefer python3 over python2.
|
||||
PYTHON=$(which python3) || \
|
||||
PYTHON=$(which python2) || \
|
||||
PYTHON=$(which python)
|
||||
|
||||
mkdir -p "$BUILD_DIR"
|
||||
cd "$BUILD_DIR"
|
||||
|
||||
|
|
@ -96,6 +103,7 @@ if [[ "$DO_TEST_BUILD" == yes ]]; then
|
|||
NOCONFIGURE=yes ./autogen.sh
|
||||
|
||||
./configure \
|
||||
PYTHON="${PYTHON}" \
|
||||
--enable-maintainer-mode \
|
||||
--enable-more-warnings=error \
|
||||
--prefix=/opt/test \
|
||||
|
|
@ -143,6 +151,7 @@ if [[ "$DO_TEST_PACKAGE" == yes || "$DO_INSTALL" == yes ]]; then
|
|||
A=("${A[@]}" --without sanitizer)
|
||||
fi
|
||||
NM_BUILD_SNAPSHOT="${BUILD_SNAPSHOT}" \
|
||||
PYTHON="${PYTHON}" \
|
||||
./contrib/fedora/rpm/build_clean.sh -c "${A[@]}"
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue