<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Why can’t we use VS 2015 with Python 2.7?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>--<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Qualcomm Innovation Center, Inc.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> lldb-dev [<a href="mailto:lldb-dev-bounces@lists.llvm.org">mailto:lldb-dev-bounces@lists.llvm.org</a>] <b>On Behalf Of </b>Zachary Turner via lldb-dev<br><b>Sent:</b> Thursday, November 19, 2015 12:01 PM<br><b>To:</b> Aidan Dodds; LLDB<br><b>Subject:</b> Re: [lldb-dev] LLDB Windows Python Bindings<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>+lldb-dev since this could be useful to other people.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal>I'm actively working on getting Python 3.5 support working.  If you want to go this route, it will make your life much easier.  But I don't have a fully passing test suite yet, there are still about 30 failing tests.  So consider Python 3.5 experimental, and at your own risk.  (Patches welcome!)<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>If you want to go with Python 2.7 then the test suite should pass fully, but there are 1-2 flaky timeouts that happen occasionally.  But it is a lot more work to set up and nobody ever gets it right because it's so complicated.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>So, <b>for Python 3.5:</b><o:p></o:p></p></div><div><p class=MsoNormal>1) You must use Visual Studio 2015.  2013 or earlier will not work.<o:p></o:p></p></div><div><p class=MsoNormal>2) Install Python 3.5 from <a href="http://python.org">python.org</a><o:p></o:p></p></div><div><p class=MsoNormal>3) Run CMake with -DPYTHON_HOME=C:\Python35<o:p></o:p></p></div><div><p class=MsoNormal>4) That's it.  You're done.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>You don't need to build your own Python 3.5, which it sounds like what you're doing.  If you're not trying to build your own Python 3.5, then check to make sure your PYTHONPATH is not set to anything.  Mixed environments could be a problem.  If that doesn't fix it, then debugging into it a little bit could help.  For example, try running C:\Python35\python_d.exe and then typing "import _ctypes".  It should work.  If you're doing a release build then try making sure that finish_swig is running python.exe, and if you're doing a debug build then try making sure that finish_swig is running python_d.exe.  <o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><b>For Python 2.7</b><o:p></o:p></p></div><div><p class=MsoNormal>1) You must <b>not </b>be using Visual Studio 2015.  Only 2013 will work<o:p></o:p></p></div><div><p class=MsoNormal>2) Can you tell me what command line you're invoking CMake with? <o:p></o:p></p></div><div><p class=MsoNormal>3) Can you open up build.ninja and search for this line:<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><i>Custom command for tools\lldb\CMakeFiles\finish_swig</i><o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>And then paste the line under it back into this email?<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>On Thu, Nov 19, 2015 at 8:55 AM Aidan Dodds <<a href="mailto:aidan@codeplay.com">aidan@codeplay.com</a>> wrote:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'><p class=MsoNormal>Hi Zachary,<br><br>I am currently trying to produce a windows build of LLDB that has python<br>bindings.<br>There seems to be a lot of discussion on the mailing list regarding<br>python at the moment.<br><br>I couldn't see any documentation or instructions anywhere about how to<br>produce them.<br><br>I have tried with python2.7 and 3.5 varying degrees of success.<br>While I was able to produce a debug version of the 2.7 interpreter,<br>CMake seems to be looking for<br>python27_d+.lib, and I am not sure why the + has been appended.<br>My build using python 3.5 fails on finish_swig, with: ImportError: No<br>module named '_ctypes'.<br><br>It would be very much appreciated if you could point me to a reference<br>for building the bindings<br>on windows or even just give me some direction to the simplest way to<br>produce them.<br><br>Also out of interest what is that state of the lldb test suite on windows?<br><br>Thanks,<br>Aidan<o:p></o:p></p></blockquote></div></div></div></body></html>