]> granicus.if.org Git - graphviz/commitdiff
Use specific Python version to run shapes.py
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Sun, 12 Apr 2020 06:31:51 +0000 (08:31 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Mon, 13 Apr 2020 06:35:53 +0000 (08:35 +0200)
The script runs fine with both Python 2 and Python 3, but on
e.g. Fedora 31, Centos 8 & Ubuntu 20.04 there is no "python"
program. Only "python2" and "python3".

For some rationale regarding Centos 8, see
https://www.liquidweb.com/kb/how-to-install-python-on-centos-8/

tests/regression_tests/shapes/Makefile.am

index d9533eb9d94687df7d4ce3e400e34305b19e721d..ac2ca2e0de4da21fdd5ceed651b2038e539e8980 100644 (file)
@@ -1,6 +1,10 @@
 SUBDIRS = reference
 
 check test rtest:
-       python shapes.py
+       if command -v python3; then \
+               python3 shapes.py; \
+       else \
+               python2 shapes.py; \
+       fi
 
 EXTRA_DIST = shapes.py