| ★ wanayoo — archive 1999 http://www.python.org/ftp/python/pythonwin/html/building.html | Nouvelle recherche | Portail wanayoo |
Building
from Sources Windows support is now provided and documented in the core Python sources, so building the Python core is not documented here (the Python home page can point you to the standard source archives)
The "Pythonwin sources" is packaged as a single archive, so far more than the Pythonwin sources are provided - the source to every win32 specific module provided in the distribution is included.
Since version 1.4, Python has supported building on win32 platforms "out of the box".
Therefore, you must grab a standard Python source distribution before doing any of this.
You must have the standard Python header and .lib files available. If you build the Python core, these will exist for you. Otherwise, you can download an archive containing the .libs - see the Pythonwin index.
The process is then:
This builds everything - you can obviously select the modules to make manually.
To build debug versions, you will need to open the projects in MSVC, and select the appropriate mode.
When building Pythonwin (or any modules which use MFC), it is very important to ensure the Release/Debug DLL's are in synch. If a debug Pythonwin.exe attempts to load a non-debug win32ui.pyd (or visa-versa) then everything will die in an ugly mess!
There is an additional complication - the win32ui.pyd module is often explicitly registered in the registry. This means that simply ensuring the correct win32ui.pyd is on the PythonPath is not sufficient - you must either edit or remove the registry entry. See documentation on the registry for more information.
In the "pythonwin" directory, you will find "setenv.bat". This is what I use to change between versions. You may like to edit this to suit your needs.