Issue 14877: No option to run bdist_wininst against newer msvc versions on non-windows systems (original) (raw)

Created on 2012-05-22 01:36 by Aaron.Staley, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (5)
msg161313 - (view) Author: Aaron Staley (Aaron.Staley) Date: 2012-05-22 01:36
On a *nix system, bdist_wininst.get_exe_bytes will always return an open wininst-6.0.exe. However, Windows python2.7 is compiled against msvc 9.0 and ideally would take an installer based on wininst-9.0.exe. Windows-64bit needs an installer based on wininst-9.0-amd64.exe. The ideal solution would be for bdist_wininst to take an option what "template exe" to be used. While I've monkey-patched things on my own, I'm not providing a patch as I'm not sure how the community wants to handle this (it could be anywhere from the exe name to tables being driven by target_version and some some 64bit option)
msg161314 - (view) Author: Aaron Staley (Aaron.Staley) Date: 2012-05-22 01:47
Sorry, minor correction: We could just rely on plat_name for 64bit. All that is needed is for this table: if self.target_version < "2.4": bv = 6.0 else: bv = 7.1 to be updated to python2.7 (9.0 for python2.7)
msg161479 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-05-24 04:57
Thanks for the report. I know little about the wininst code in distutils; can you explain if this is a bug (i.e. bdist_wininst in 2.7 must use wininst-9.0-etc.exe or the installers won’t work) or a feature request (i.e. a new option to allow using newer exe files would provide some new functionality)? If it’s a bug it can be fixed in 2.7 and 3.2, otherwise it falls under the feature freeze on distutils.
msg161480 - (view) Author: Aaron Staley (Aaron.Staley) Date: 2012-05-24 05:52
Hi Eric, Quick rundown: There are template 'exe' inside distutils/command. bdist_wininst appends to the template to build a customized installer. First the 64 bit bug: http://bugs.python.org/issue6792 With that bug active, I must be able to make 64 bit windows installers for users of 64 bit windows python to install my package. Unfortunately, the only 64 bit template is wininst-9.0-amd64.exe. Due to this bug, there is no way to use that installer, preventing one from creating universal windows installers on *nix, which bdist_wininst is supposed to allowed (per documentaiton). Furthermore, I have empirically found that a 32-bit installer built against wininst-6.0 will not behave correctly either. Specifically, the pre-install-script I used would not execute. When I switched to the wininst-9.0 template, all worked fine.
msg384829 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-01-11 12:52
The distutils bdist_wininst command has been removed in Python 3.10: see bpo-42802.
History
Date User Action Args
2022-04-11 14:57:30 admin set github: 59082
2021-01-11 12:52:32 vstinner set status: open -> closednosy: + vstinnermessages: + resolution: wont fixstage: resolved
2012-05-24 05:52:14 Aaron.Staley set messages: +
2012-05-24 04:57:32 eric.araujo set nosy: + loewismessages: +
2012-05-22 01:47:28 Aaron.Staley set messages: +
2012-05-22 01:36:23 Aaron.Staley create