How to install Python package from source on Windows
bartc
bc at freeuk.com
Fri May 19 17:38:36 EDT 2017
On 19/05/2017 12:00, bartc wrote:
>
> These are the binary files on my Python 3.4 system:
>
> python.exe
> pythonw.exe
> DLLs/pyexpat.pyd
> DLLs/python3.dll
...
> So, which sources are needed to compile and link python.exe for example?
> Which headers or other files need to be synthesised for them [to] be
> compiled, and what would typical versions look like for Windows?
I've had to compile Python on Linux so as to get some clues to what's
happening. That configure/make process worked without a problem
(although it imposed the output directory structure of the new Python on
the same directory used for the sources, which was a little odd.)
If I delete the executable 'python' and run make, then it will tell me
how python[.exe] is built: Programs/python.o plus libpython3.6m.a.
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).
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).
--
bartc
More information about the Python-list
mailing list