Gentoo Archives: gentoo-portage-dev

From: Mike Gilbert <floppym@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH] runtests: rewrite in python
Date: Sat, 30 May 2015 18:42:29
Message-Id: CAJ0EP40qHErCh1z9HnQwch2jRgwfSXz=q8ydRssgaosWoh4dRw@mail.gmail.com
In Reply to: Re: [gentoo-portage-dev] [PATCH] runtests: rewrite in python by Brian Dolbec
1 On Sat, May 30, 2015 at 1:18 PM, Brian Dolbec <dolsen@g.o> wrote:
2 > On Sat, 30 May 2015 12:29:14 -0400
3 > Mike Frysinger <vapier@g.o> wrote:
4 >
5 >> The bash was getting ugly, and this allows us to add more smarts
6 >> sanely to the main script.
7 >> ---
8 >> DEVELOPING | 2 +-
9 >> runtests | 156
10 >> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11 >> runtests.sh | 109 ------------------------------------------ 3 files
12 >> changed, 157 insertions(+), 110 deletions(-) create mode 100755
13 >> runtests delete mode 100755 runtests.sh
14 >>
15 >> diff --git a/DEVELOPING b/DEVELOPING
16 >> index 0b0bb60..31b5594 100644
17 >> --- a/DEVELOPING
18 >> +++ b/DEVELOPING
19 >> @@ -225,7 +225,7 @@ Second create a git tag for this release:
20 >> Then create the tarball and run the tests:
21 >> ./mkrelease.sh --changelog-rev v2.2.7 --tag --runtests 2.2.8
22 >> Make sure you have all supported python versions installed first
23 >> -(see PYTHON_SUPPORTED_VERSIONS in runtests.sh).
24 >> +(see PYTHON_SUPPORTED_VERSIONS in runtests).
25 >>
26 >> Version bump the ebuild and verify it can re-install itself:
27 >> emerge portage
28 >> diff --git a/runtests b/runtests
29 >> new file mode 100755
30 >> index 0000000..d1f7b6f
31 >> --- /dev/null
32 >> +++ b/runtests
33 >> +
34 >
35 >
36 >> +from __future__ import print_function
37 >>
38 >
39 > If I'm not mistaken, this is not needed for 2.7+ anymore. It is
40 > still for 2.6 though.
41
42 You are mistaken. Without this, print is still treated as a statement
43 and anything in parens is treated as a tuple.
44
45 % python2.7 --version
46 Python 2.7.10
47
48 % python2.7 -c "print(1, 2, 3)"
49 (1, 2, 3)
50
51 % python2.7 -c "from __future__ import print_function; print(1, 2, 3)"
52 1 2 3

Replies

Subject Author
Re: [gentoo-portage-dev] [PATCH] runtests: rewrite in python Mike Frysinger <vapier@g.o>