[Git][NTPsec/ntpsec][master] 2 commits: Address GitLab issue #588: Buildprep --ntpviz missing psutil dependency
Eric S. Raymond
gitlab at mg.gitlab.com
Wed Jun 19 15:23:27 UTC 2019
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
6e86bedf by Eric S. Raymond at 2019-06-19T14:39:06Z
Address GitLab issue #588: Buildprep --ntpviz missing psutil dependency
- - - - -
aa477cc3 by Eric S. Raymond at 2019-06-19T15:23:00Z
Prepare buildprep for Python 2 end-of-life.
- - - - -
1 changed file:
- buildprep
Changes:
=====================================
buildprep
=====================================
@@ -9,6 +9,7 @@
DRYRUN="no"
NTPVIZ="no"
DOC="no"
+PYVERS=""
OS=`uname -s`
@@ -49,6 +50,16 @@ EOF
esac
done
+# Some Python 2 packages (e.g python-devel, python-psutils) conventionally have
+# Python 3 equivalents with a python3 prefix. Compute the correct value for the
+# infix based on system Python. This eill start to be significant after Python 2
+# EOLs at the beginning of 2020.
+PYVERS=`python --version 2>&1 | sed -n -e '/Python \([0-9]\).*/s//\1/p'`
+if [ "$PYVERS" = "2" ]
+then
+ PYVERS=""
+fi
+
cat <<EOF
# Preparing your system for ntpsec source build...
# This script presently knows about:
@@ -154,7 +165,7 @@ daemon () {
case $installer in
apk)
$install build-base python # basic tools
- $install bison python-dev linux-headers
+ $install bison python${PYVERS}-dev linux-headers
$install openssl-dev libcap-dev libseccomp-dev
# probably needs more, but this builds
# can't find timepps.h: gpsd and chrony have their own ??
@@ -208,7 +219,7 @@ daemon () {
$install libcap-devel libseccomp-devel # build
$install openssl-devel # build
$install libcap2 openssl-libs
- $install python-curses
+ $install python${PYVERS}-curses
;;
zypper)
$install -t pattern devel_basis # Build environment
@@ -219,7 +230,7 @@ daemon () {
$install pps-tools-devel # build
$install pps-tools
$install libcap2 openssl-libs
- $install python-curses
+ $install python${PYVERS}-curses
;;
esac
}
@@ -228,10 +239,10 @@ tools () {
# Prerequisites for the client Python tools: python extensions
case $installer in
apt)
- $install python-dev
+ $install python${PYVERS}-dev
;;
yum|dnf|yast|zypper)
- $install python-devel
+ $install python${PYVERS}-devel
;;
esac
}
@@ -253,7 +264,7 @@ ntpviz () {
echo "# Looks like a generic Debian system"
$install gnuplot
fi
- $install fonts-liberation
+ $install fonts-liberation python${PYVERS}-psutil
;;
emerge)
$install sci-visualization/gnuplot
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/fbc2015460939c0befd2940ff125d4e85bc320ab...aa477cc36a3becd3845b3744a0459dc6278be107
--
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/fbc2015460939c0befd2940ff125d4e85bc320ab...aa477cc36a3becd3845b3744a0459dc6278be107
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20190619/d60402e7/attachment-0001.htm>
More information about the vc
mailing list