[codeface] [PATCH v2 02/24] Move cppstats to most recent version (v0.9.1)

  • From: Claus Hunsen <hunsen@xxxxxxxxxxxxxxxxx>
  • To: codeface@xxxxxxxxxxxxx
  • Date: Thu, 1 Dec 2016 17:10:56 +0100

The most current version of cppstats makes some sed magic obsolete
that has been used during bootstrapping/provisioning.
To make Codeface unaware of minor versions of cppstats, the pattern
to search for to make sure that cppstats is installed is "v0.9."
(note the lacking minor version number).

Signed-off-by: Claus Hunsen <hunsen@xxxxxxxxxxxxxxxxx>
---
 codeface/util.py                        | 2 +-
 integration-scripts/install_cppstats.sh | 9 ++++-----
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/codeface/util.py b/codeface/util.py
index 80aee7b..ec1b6a8 100644
--- a/codeface/util.py
+++ b/codeface/util.py
@@ -395,7 +395,7 @@ def check4cppstats():
     """
     # We can not check the version directly as there is no version switch
     # on cppstats We just check if the first line is OK.
-    line = "cppstats v0.9.0"
+    line = "cppstats v0.9."
     cmd = "/usr/bin/env cppstats --version".split()
     res = execute_command(cmd)
     if not (res.startswith(line)):
diff --git a/integration-scripts/install_cppstats.sh 
b/integration-scripts/install_cppstats.sh
index e3abea2..a068333 100755
--- a/integration-scripts/install_cppstats.sh
+++ b/integration-scripts/install_cppstats.sh
@@ -5,7 +5,7 @@
 # Copyright Wolfgang Mauerer <wolfgang.mauerer@xxxxxxxxxxxxxxxxx>
 # SPDX-License-Identifier:     Apache-2.0 BSD-2-Clause GPL-2.0+ MIT WTFPL
 
-export CPPSTATS_VERSION=0.9.0
+export CPPSTATS_VERSION=0.9.1
 
 echo "Providing cppstats $CPPSTATS_VERSION"
 
@@ -20,10 +20,9 @@ then
     echo "Could not download cppstats from ${CPPSTATS_URL}"
     exit 1
 fi
-(cd ${TMPDIR} && tar -xvf ${TMPDIR}/cppstats.tar.gz &&
-       cd cppstats-${CPPSTATS_VERSION} && sed -i s/enum==0.4.4/enum/ setup.py 
&&
-       sed -i s/cppstats.version\(\)/\"0.9.0\"/ setup.py &&
-       sed -i s/"import cppstats"// setup.py &&
+(cd ${TMPDIR} &&
+        tar -xvf ${TMPDIR}/cppstats.tar.gz &&
+       cd cppstats-${CPPSTATS_VERSION} &&
        sudo python setup.py install)
 
 echo "Providing srcML"
-- 
2.10.2


Other related posts:

  • » [codeface] [PATCH v2 02/24] Move cppstats to most recent version (v0.9.1) - Claus Hunsen