This is an archive of the discontinued LLVM Phabricator instance.

Patch cmake to allow detection of python 2.7.9+
ClosedPublic

Authored by ADodds on Dec 16 2015, 5:41 AM.

Details

Summary

Some distributions of python have their version defined as follows in patchlevel.h (note the '+'):

#define PY_VERSION "2.7.9+"

The '+' char needs to be stripped by the cmake regex so that LLDBs python lib detection is successfull.

Note: \+ would have been nicer instead of [+] but that doesn't seem to be supported by CMake.

Diff Detail

Repository
rL LLVM

Event Timeline

ADodds updated this revision to Diff 42994.Dec 16 2015, 5:41 AM
ADodds retitled this revision from to Patch cmake to allow detection of python 2.7.9+.
ADodds updated this object.
ADodds added a reviewer: zturner.
ADodds set the repository for this revision to rL LLVM.
ADodds added a subscriber: lldb-commits.
ADodds updated this object.Dec 16 2015, 5:46 AM
zturner accepted this revision.Dec 16 2015, 8:15 AM
zturner edited edge metadata.

Where did you get this version of Python? I don't see anything wrong with this patch, but I'm a little curious what this + means

This revision is now accepted and ready to land.Dec 16 2015, 8:15 AM

Where did you get this version of Python? I don't see anything wrong with this patch, but I'm a little curious what this + means

I think a patched version. I don't know what vendor is changing Python's version. Perhaps good to stop doing it if it breaks software.

Its currently present in the official 2.7.10 windows x64 python distro from python.org.

Its also present in some of the prebuilds I have been using from here:
http://p-nand-q.com/python/building-python-27-with-vs2010.html

I can only assume that perhaps it signifies that this is a x64 build as it doesnt seem to be present on x86 distros.

This revision was automatically updated to reflect the committed changes.