This keeps the list of supported versions in one place so people can do:
        ./runtests.sh --python-versions=supported

No need to hardcode the list of python versions in multiple places.
---
 DEVELOPING  | 6 +++---
 runtests.sh | 5 +++++
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/DEVELOPING b/DEVELOPING
index 5dfd9b7..7aac81b 100644
--- a/DEVELOPING
+++ b/DEVELOPING
@@ -171,9 +171,9 @@ Then create the tarball:
        ./mkrelease.sh --changelog-rev v2.2.7 --tag 2.2.8
 
 Unpack the tarball and run tests:
-       ./runtests.sh
-Make sure you have all supported python versions installed:
-       2.6 2.7 3.2 3.3
+       ./runtests.sh --python-versions=supported
+Make sure you have all supported python versions installed first
+(see PYTHON_SUPPORTED_VERSIONS in runtests.sh).
 
 Version bump the ebuild and verify it can re-install itself:
        emerge portage
diff --git a/runtests.sh b/runtests.sh
index 010a7bf..3006be5 100755
--- a/runtests.sh
+++ b/runtests.sh
@@ -2,6 +2,8 @@
 # Copyright 2010-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
+# These are the versions we care about.  The rest are just "nice to have".
+PYTHON_SUPPORTED_VERSIONS="2.6 2.7 3.2 3.3"
 PYTHON_VERSIONS="2.6 2.7 2.7-pypy-1.8 2.7-pypy-1.9 2.7-pypy-2.0 3.1 3.2 3.3 
3.4"
 
 # has to be run from portage root dir
@@ -44,6 +46,9 @@ while [ $# -gt 0 ] ; do
        esac
        shift
 done
+if [[ ${PYTHON_VERSIONS} == "supported" ]] ; then
+       PYTHON_VERSIONS=${PYTHON_SUPPORTED_VERSIONS}
+fi
 
 set -- "${unused_args[@]}"
 
-- 
1.8.4.3


Reply via email to