Re: [Lldb-commits] [PATCH] D15566: Patch cmake to allow detection of python 2.7.9+

2015-12-17 Thread Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL255893: Patch cmake to allow detection of python 2.7.9+ 
(authored by aidandodds).

Changed prior to commit:
  http://reviews.llvm.org/D15566?vs=42994&id=43127#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D15566

Files:
  lldb/trunk/cmake/modules/LLDBConfig.cmake

Index: lldb/trunk/cmake/modules/LLDBConfig.cmake
===
--- lldb/trunk/cmake/modules/LLDBConfig.cmake
+++ lldb/trunk/cmake/modules/LLDBConfig.cmake
@@ -71,8 +71,8 @@
   if(EXISTS "${PYTHON_INCLUDE_DIRS}/patchlevel.h")
 file(STRINGS "${PYTHON_INCLUDE_DIRS}/patchlevel.h" python_version_str
  REGEX "^#define[ \t]+PY_VERSION[ \t]+\"[^\"]+\"")
-string(REGEX REPLACE "^#define[ \t]+PY_VERSION[ \t]+\"([^\"]+)\".*" "\\1"
- PYTHONLIBS_VERSION_STRING "${python_version_str}")
+string(REGEX REPLACE "^#define[ \t]+PY_VERSION[ \t]+\"([^\"+]+)[+]?\".*" 
"\\1"
+ PYTHONLIBS_VERSION_STRING "${python_version_str}")
 message("-- Found Python version ${PYTHONLIBS_VERSION_STRING}")
 string(REGEX REPLACE "([0-9]+)[.]([0-9]+)[.][0-9]+" "python\\1\\2" 
PYTHONLIBS_BASE_NAME "${PYTHONLIBS_VERSION_STRING}")
 unset(python_version_str)


Index: lldb/trunk/cmake/modules/LLDBConfig.cmake
===
--- lldb/trunk/cmake/modules/LLDBConfig.cmake
+++ lldb/trunk/cmake/modules/LLDBConfig.cmake
@@ -71,8 +71,8 @@
   if(EXISTS "${PYTHON_INCLUDE_DIRS}/patchlevel.h")
 file(STRINGS "${PYTHON_INCLUDE_DIRS}/patchlevel.h" python_version_str
  REGEX "^#define[ \t]+PY_VERSION[ \t]+\"[^\"]+\"")
-string(REGEX REPLACE "^#define[ \t]+PY_VERSION[ \t]+\"([^\"]+)\".*" "\\1"
- PYTHONLIBS_VERSION_STRING "${python_version_str}")
+string(REGEX REPLACE "^#define[ \t]+PY_VERSION[ \t]+\"([^\"+]+)[+]?\".*" "\\1"
+ PYTHONLIBS_VERSION_STRING "${python_version_str}")
 message("-- Found Python version ${PYTHONLIBS_VERSION_STRING}")
 string(REGEX REPLACE "([0-9]+)[.]([0-9]+)[.][0-9]+" "python\\1\\2" PYTHONLIBS_BASE_NAME "${PYTHONLIBS_VERSION_STRING}")
 unset(python_version_str)
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D15566: Patch cmake to allow detection of python 2.7.9+

2015-12-17 Thread Aidan Dodds via lldb-commits
ADodds added a comment.

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.


Repository:
  rL LLVM

http://reviews.llvm.org/D15566



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D15566: Patch cmake to allow detection of python 2.7.9+

2015-12-16 Thread Kamil Rytarowski via lldb-commits
krytarowski added a subscriber: krytarowski.
krytarowski added a comment.

In http://reviews.llvm.org/D15566#311998, @zturner wrote:

> 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.


Repository:
  rL LLVM

http://reviews.llvm.org/D15566



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [PATCH] D15566: Patch cmake to allow detection of python 2.7.9+

2015-12-16 Thread Zachary Turner via lldb-commits
zturner accepted this revision.
zturner added a comment.
This revision is now accepted and ready to land.

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


Repository:
  rL LLVM

http://reviews.llvm.org/D15566



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D15566: Patch cmake to allow detection of python 2.7.9+

2015-12-16 Thread Aidan Dodds via lldb-commits
ADodds created this revision.
ADodds added a reviewer: zturner.
ADodds added a subscriber: lldb-commits.
ADodds set the repository for this revision to rL LLVM.

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.

Repository:
  rL LLVM

http://reviews.llvm.org/D15566

Files:
  cmake/modules/LLDBConfig.cmake

Index: cmake/modules/LLDBConfig.cmake
===
--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -71,8 +71,8 @@
   if(EXISTS "${PYTHON_INCLUDE_DIRS}/patchlevel.h")
 file(STRINGS "${PYTHON_INCLUDE_DIRS}/patchlevel.h" python_version_str
  REGEX "^#define[ \t]+PY_VERSION[ \t]+\"[^\"]+\"")
-string(REGEX REPLACE "^#define[ \t]+PY_VERSION[ \t]+\"([^\"]+)\".*" "\\1"
- PYTHONLIBS_VERSION_STRING "${python_version_str}")
+string(REGEX REPLACE "^#define[ \t]+PY_VERSION[ \t]+\"([^\"+]+)[+]?\".*" 
"\\1"
+ PYTHONLIBS_VERSION_STRING "${python_version_str}")
 message("-- Found Python version ${PYTHONLIBS_VERSION_STRING}")
 string(REGEX REPLACE "([0-9]+)[.]([0-9]+)[.][0-9]+" "python\\1\\2" 
PYTHONLIBS_BASE_NAME "${PYTHONLIBS_VERSION_STRING}")
 unset(python_version_str)


Index: cmake/modules/LLDBConfig.cmake
===
--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -71,8 +71,8 @@
   if(EXISTS "${PYTHON_INCLUDE_DIRS}/patchlevel.h")
 file(STRINGS "${PYTHON_INCLUDE_DIRS}/patchlevel.h" python_version_str
  REGEX "^#define[ \t]+PY_VERSION[ \t]+\"[^\"]+\"")
-string(REGEX REPLACE "^#define[ \t]+PY_VERSION[ \t]+\"([^\"]+)\".*" "\\1"
- PYTHONLIBS_VERSION_STRING "${python_version_str}")
+string(REGEX REPLACE "^#define[ \t]+PY_VERSION[ \t]+\"([^\"+]+)[+]?\".*" "\\1"
+ PYTHONLIBS_VERSION_STRING "${python_version_str}")
 message("-- Found Python version ${PYTHONLIBS_VERSION_STRING}")
 string(REGEX REPLACE "([0-9]+)[.]([0-9]+)[.][0-9]+" "python\\1\\2" PYTHONLIBS_BASE_NAME "${PYTHONLIBS_VERSION_STRING}")
 unset(python_version_str)
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits