How to install Python package from source on Windows

Michael Torrie torriem at gmail.com
Fri May 19 20:19:43 EDT 2017


On 05/19/2017 03:38 PM, bartc wrote:
> If I delete the .a file and do make again, then it will give me a list 
> of object files comprising libpython3.6m.a (not sure why it needs to be 
> a library, rather than bundle the list of .o files with python.o).

The reason is that the core of CPython is a shared library. This is so
that Python can be embedded in other programs, and also to allow
building of C-based extensions for Python. Without the shared library to
link against, C-based extensions would be orphans without any way to
work with CPython.

> Anyway it's a start.
> 
> For the compilation, I think it's done with the -D compiler option (to 
> pass on a special macro, which perhaps triggers certain things to be 
> included or defined).

Some things are defined that way yes. Other things are defined in the
generated header file mentioned by someone else the other day.





More information about the Python-list mailing list