1 |
On Sun, 2014-01-05 at 10:50 -0500, Mike Frysinger wrote: |
2 |
> This keeps the list of supported versions in one place so people can do: |
3 |
> ./runtests.sh --python-versions=supported |
4 |
> |
5 |
> No need to hardcode the list of python versions in multiple places. |
6 |
> --- |
7 |
> DEVELOPING | 6 +++--- |
8 |
> runtests.sh | 5 +++++ |
9 |
> 2 files changed, 8 insertions(+), 3 deletions(-) |
10 |
> |
11 |
> diff --git a/DEVELOPING b/DEVELOPING |
12 |
> index 5dfd9b7..7aac81b 100644 |
13 |
> --- a/DEVELOPING |
14 |
> +++ b/DEVELOPING |
15 |
> @@ -171,9 +171,9 @@ Then create the tarball: |
16 |
> ./mkrelease.sh --changelog-rev v2.2.7 --tag 2.2.8 |
17 |
> |
18 |
> Unpack the tarball and run tests: |
19 |
> - ./runtests.sh |
20 |
> -Make sure you have all supported python versions installed: |
21 |
> - 2.6 2.7 3.2 3.3 |
22 |
> + ./runtests.sh --python-versions=supported |
23 |
> +Make sure you have all supported python versions installed first |
24 |
> +(see PYTHON_SUPPORTED_VERSIONS in runtests.sh). |
25 |
> |
26 |
> Version bump the ebuild and verify it can re-install itself: |
27 |
> emerge portage |
28 |
> diff --git a/runtests.sh b/runtests.sh |
29 |
> index 010a7bf..3006be5 100755 |
30 |
> --- a/runtests.sh |
31 |
> +++ b/runtests.sh |
32 |
> @@ -2,6 +2,8 @@ |
33 |
> # Copyright 2010-2012 Gentoo Foundation |
34 |
> # Distributed under the terms of the GNU General Public License v2 |
35 |
> |
36 |
> +# These are the versions we care about. The rest are just "nice to have". |
37 |
> +PYTHON_SUPPORTED_VERSIONS="2.6 2.7 3.2 3.3" |
38 |
> 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" |
39 |
> |
40 |
> # has to be run from portage root dir |
41 |
> @@ -44,6 +46,9 @@ while [ $# -gt 0 ] ; do |
42 |
> esac |
43 |
> shift |
44 |
> done |
45 |
> +if [[ ${PYTHON_VERSIONS} == "supported" ]] ; then |
46 |
> + PYTHON_VERSIONS=${PYTHON_SUPPORTED_VERSIONS} |
47 |
> +fi |
48 |
> |
49 |
> set -- "${unused_args[@]}" |
50 |
> |
51 |
|
52 |
I like it :) |