File tree Expand file tree Collapse file tree 2 files changed +32
-2
lines changed
installer/rpm/rpmbuild/SPECS Expand file tree Collapse file tree 2 files changed +32
-2
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,22 @@ cp usr/share/pixmaps/laps.png $RPM_BUILD_ROOT/usr/share/pixmaps
3737
3838%post
3939DIR=/usr/share/laps4linux-client
40- python3 -m venv --system-site-packages $DIR /venv
40+ PYTHON_BIN=python3
41+ if [[ " $( python3 --version) " == " Python 3.0" * ]] \
42+ || [[ " $( python3 --version) " == " Python 3.1" * ]] \
43+ || [[ " $( python3 --version) " == " Python 3.2" * ]] \
44+ || [[ " $( python3 --version) " == " Python 3.3" * ]] \
45+ || [[ " $( python3 --version) " == " Python 3.4" * ]] \
46+ || [[ " $( python3 --version) " == " Python 3.5" * ]] \
47+ || [[ " $( python3 --version) " == " Python 3.6" * ]] \
48+ || [[ " $( python3 --version) " == " Python 3.7" * ]]; then
49+ echo " Default Python version on this system ($( python3 --version) ) is not compatible with LAPS4LINUX! Install at least Python 3.8."
50+ if command -v python3.8; then
51+ PYTHON_BIN=python3.8
52+ echo " Found compatible Python version: $PYTHON_BIN "
53+ fi
54+ fi
55+ $PYTHON_BIN -m venv --system-site-packages --clear $DIR /venv
4156$DIR /venv/bin/pip3 install --upgrade pip==25.0.0
4257$DIR /venv/bin/pip3 install --upgrade $DIR [barcode]
4358$DIR /venv/bin/pip3 uninstall -y pip
Original file line number Diff line number Diff line change @@ -37,7 +37,22 @@ cp usr/sbin/laps-runner-pam $RPM_BUILD_ROOT/%{_sbindir}/laps-runner-pam
3737
3838%post
3939DIR=/usr/share/laps4linux-runner
40- python3 -m venv --system-site-packages $DIR /venv
40+ PYTHON_BIN=python3
41+ if [[ " $( python3 --version) " == " Python 3.0" * ]] \
42+ || [[ " $( python3 --version) " == " Python 3.1" * ]] \
43+ || [[ " $( python3 --version) " == " Python 3.2" * ]] \
44+ || [[ " $( python3 --version) " == " Python 3.3" * ]] \
45+ || [[ " $( python3 --version) " == " Python 3.4" * ]] \
46+ || [[ " $( python3 --version) " == " Python 3.5" * ]] \
47+ || [[ " $( python3 --version) " == " Python 3.6" * ]] \
48+ || [[ " $( python3 --version) " == " Python 3.7" * ]]; then
49+ echo " Default Python version on this system ($( python3 --version) ) is not compatible with LAPS4LINUX! Install at least Python 3.8."
50+ if command -v python3.8; then
51+ PYTHON_BIN=python3.8
52+ echo " Found compatible Python version: $PYTHON_BIN "
53+ fi
54+ fi
55+ $PYTHON_BIN -m venv --system-site-packages --clear $DIR /venv
4156$DIR /venv/bin/pip3 install --upgrade pip==25.0.0
4257$DIR /venv/bin/pip3 install --upgrade $DIR
4358$DIR /venv/bin/pip3 uninstall -y pip
You can’t perform that action at this time.
0 commit comments