[Python-Dev] Building Extensions for Python 3.5 on Windows

Steve Dower steve.dower at python.org
Wed Aug 26 18:14:07 CEST 2015

On 25Aug2015 2153, Terry Reedy wrote:
> On 8/25/2015 2:17 PM, Steve Dower wrote:
>> I've written up a long technical blog post about the compiler and CRT
>> changes in Python 3.5, which will be of interest to those who build and
>> distribute native extensions for Windows.
>> http://stevedower.id.au/blog/building-for-python-3-5/
>> Hopefully it puts some of the changes we've made into a context where
>> they don't just look like unnecessary pain. Feedback and discussion
>> welcome, either on these lists or on the post itself.
> This is an excellent technical writeup. Can it be linked to from the
> devguide, or maybe the C-API docs, if they do not contain everything in
> the post?

I probably need to go through the "Building C and C++ Extensions on 
Windows" chapter (https://docs.python.org/3.5/extending/windows.html) 
and update it. Judging by the note near the top ("For example, if you 
are using Python 2.2.1") it's a little out of date :)

Things I'd like to see on that page:
* setup.py example to build simple extensions
* command-line commands to build directly
* VS walkthrough for setting up a project (like what is there now)
* MinGW walkthrough for building extensions via distutils or directly 
(I'll need some help with this one)
* deeper discussion on DLLs/static linking/distribution (like section 
4.3 now, plus details from my post)

On the VS walkthrough, my team at work already has a strong interest 
(and vague plans) to publish VS templates for building Python 
extensions, which naturally come with docs and maybe a video walkthrough 
(like https://youtu.be/D9RlT06a1EI, which I did for Python 3.4 without a 

If there's no opposition, it may be neater to link to that rather than 
walking through VS in Python's docs - then this section would just cover 
the command line invocations. I have no issues with linking to other 
IDE's templates/walkthroughs, but I don't know of any that exist yet.


More information about the Python-Dev mailing list