[cfe-dev] Supply an alternate Python for tests
Douglas Gregor
dgregor at apple.com
Tue Sep 29 07:57:18 PDT 2009
On Sep 23, 2009, at 12:36 PM, Ken Dyck wrote:
> How should one specify an alternate version of Python to use for
> running
> the regression tests?
I don't know of an easy way to do this.
> Background: The default version of Python on my system is 2.3, which
> doesn't support the annotations used in lit.py. I'm wary of upgrading
> the default to 2.6 for fear of breaking some system script that relies
> on it. So, following the instructions in the Python documentation,
> I've
> installed 2.6 in the same directory as the default 2.3 under a
> different
> name, python2.6. I'd like to specify that 2.6 version for running the
> tests, but I can't see how to do it without modifying the Makefile.
>
> The attached patch shows the approach that I've been taking so far. It
> introduces an environment/make variable named PYTHON that can be set
> to
> specify a version of Python. If it is not set, the default python
> (according to the shebang line at the top of the script) is used.
>
> If there is some other trick to using a non-default Python, I'd like
> to
> hear it. Otherwise, is there any chance of applying the patch?
I think the "right" answer is for configure and CMake to have an
option to set the Python executable to use at configuration time.
However, I've put this in as a stop-gap solution.
- Doug
More information about the cfe-dev
mailing list