[cfe-dev] Supply an alternate Python for tests

Ken Dyck Ken.Dyck at onsemi.com
Wed Sep 23 12:36:27 PDT 2009

How should one specify an alternate version of Python to use for running
the regression tests? 

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?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: python-var.patch
Type: application/octet-stream
Size: 394 bytes
Desc: python-var.patch
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20090923/e9330e89/attachment.obj>

More information about the cfe-dev mailing list