|
PatchingDistutils
Instructions for patching distutils
IntroductionSpyder for Windows is generally distributed through an executable binary installer created using Python's distutils package. Unfortuantely, distutils has a bug. In a nutshell, the Windows binary installer fails to carry out the actions specified in the post-installation script during an uninstall. The solution to Spyder Issue 971 necessitated the creation of Windows registry entries that need to be removed during the uninstall. To make sure the Spyder uninstall happens cleanly, distutils must be patched on the system where the installers will be built as described below. Applying the PatchTo build a binary Windows installer, Python 2.7 distutils includes a couple of small Windows executables that get packaged into the final installer. Those are stored below the distutils sub-directory of the main Python install location. On a typical Windows install, the directory of interest is C:\Python27\Lib\distutils\command On Linux, the directory of interest is /usr/lib/python2.7/distutils/command In that directory there could be several Windows executables, but the two of interest here are
The first is for 32-bit installers, and the second is for 64-bit installers. To repair the distutils bug mentioned above, these executables need to be replaced with patched versions which are available for download here: After download, these files need to be renamed and copied into the directory noted above, replacing the existing wininst-9.0 files. Make a backup of the originals beforehand if you want to be able to roll back the patch. Finally you have to use the following command to build the installer: python setup.py build bdist_wininst | |||||||||||||||||||











