Python version for scripts in LLVM?

Hi,

Is there a rule or guideline about what Python versions

must be supported for scripts in the LLVM tree?

I am working on some patches to some scripts in LLVM

to use features in Python 2.7, so that these scripts

can run under Python 2.7 and Python 3.x

Is that OK?

For example, here is a patch to use print as a function,

so that the scripts can work in Python 2.7 and Python 3.x

print_function.txt (11.4 KB)

Both cmake & configure test for Python >= 2.7. Given the amount of python code in the various scripts inside the LLVM projects, I wouldn’t expect Python 3.x to work for everything without changes.

  • Vasileios

I just saw that Python 2.7 is listed as a dependency:
http://lldb.llvm.org/build.html

So that is reasonable.

    Both cmake & configure test for Python >= 2.7. Given the amount of
    python code in the various scripts inside the LLVM projects, I
    wouldn't expect Python 3.x to work for everything without changes.

I just saw that Python 2.7 is listed as a dependency:
http://lldb.llvm.org/build.html

So that is reasonable.

I've seen patches go into LIT to use idioms that support both 3.x and 2.7... so I'm sure such changes would be welcome elsewhere in the codebase.

Jon

I use Arch, which defaults to Python 3, and I got no warnings from
CMake, only errors in lit.py. But that was about 6 months ago, when I
changed my default cmake line to force the python version.

--renato

I’m using Python 3.4.3 and LIT without any problem.

Hum, maybe I should try again, then... :slight_smile:

It seems it worked. Oh well, one less hack on my CMake lines. :slight_smile:

Thanks!
--renato