Why can’t we use VS 2015 with Python 2.7?

 

--

Qualcomm Innovation Center, Inc.

The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux 
Foundation Collaborative Project

 

From: lldb-dev [mailto:lldb-dev-boun...@lists.llvm.org] On Behalf Of Zachary 
Turner via lldb-dev
Sent: Thursday, November 19, 2015 12:01 PM
To: Aidan Dodds; LLDB
Subject: Re: [lldb-dev] LLDB Windows Python Bindings

 

+lldb-dev since this could be useful to other people.

 

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!)

 

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.

 

So, for Python 3.5:

1) You must use Visual Studio 2015.  2013 or earlier will not work.

2) Install Python 3.5 from python.org <http://python.org> 

3) Run CMake with -DPYTHON_HOME=C:\Python35

4) That's it.  You're done.

 

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.  

 

For Python 2.7

1) You must not be using Visual Studio 2015.  Only 2013 will work

2) Can you tell me what command line you're invoking CMake with? 

3) Can you open up build.ninja and search for this line:

 

Custom command for tools\lldb\CMakeFiles\finish_swig

 

And then paste the line under it back into this email?

 

On Thu, Nov 19, 2015 at 8:55 AM Aidan Dodds <ai...@codeplay.com 
<mailto:ai...@codeplay.com> > wrote:

Hi Zachary,

I am currently trying to produce a windows build of LLDB that has python
bindings.
There seems to be a lot of discussion on the mailing list regarding
python at the moment.

I couldn't see any documentation or instructions anywhere about how to
produce them.

I have tried with python2.7 and 3.5 varying degrees of success.
While I was able to produce a debug version of the 2.7 interpreter,
CMake seems to be looking for
python27_d+.lib, and I am not sure why the + has been appended.
My build using python 3.5 fails on finish_swig, with: ImportError: No
module named '_ctypes'.

It would be very much appreciated if you could point me to a reference
for building the bindings
on windows or even just give me some direction to the simplest way to
produce them.

Also out of interest what is that state of the lldb test suite on windows?

Thanks,
Aidan

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

Reply via email to