homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: bdist_wininst no longer works on non-Windows platforms
Type: behavior Stage:
Components: Distutils Versions: Python 3.0, Python 3.1, Python 2.7, Python 2.6
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: tarek Nosy List: eric.araujo, mhammond, paul.moore, tarek
Priority: normal Keywords: patch

Created on 2009年04月09日 20:51 by paul.moore, last changed 2022年04月11日 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
bdist_wininst.patch paul.moore, 2009年04月09日 20:51
Messages (5)
msg85825 - (view) Author: Paul Moore (paul.moore) * (Python committer) Date: 2009年04月09日 20:51
In revision 62197, Mon Apr 7 01:53:39 2008 UTC, Mark Hammond added code
to Lib/distutils/command/bdist_wininst.py which was intended to select
an architecture-specific installer executable.
In doing so, the code appears to have broken the ability to build
installers on non-Windows platforms.
The current code is
if self.plat_name == 'win32':
 sfix = ''
else:
 sfix = self.plat_name[3:] # strip 'win' - leaves eg '-amd64'
filename = os.path.join(directory, "wininst-%.1f%s.exe" % (bv, sfix))
return open(filename, "rb").read()
This says "strip 'win'", but in practice strips the first 3 characters
from any plat_name other than win32.
I've attached an untested patch to fix this, by setting sfix to '' if
self.plat_name doesn't start with 'win'.
msg85829 - (view) Author: Mark Hammond (mhammond) * (Python committer) Date: 2009年04月09日 21:51
+1 on the idea - it's not the first time I've forgotten that works on
platforms other than Windows. It appears the patch you attached is
reversed though (or its just way too early for me...)
msg85830 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2009年04月09日 21:53
Mark, I have just applied the patch in r71413 because it was obvious.
If it's fine with you I'll backport it to 2.6 so it makes it to 2.6.2 final
msg85833 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2009年04月09日 22:52
fixed in r71413 and r71415.
Thanks for the patch !
msg119078 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010年10月18日 20:44
Follow-up in #8954 
History
Date User Action Args
2022年04月11日 14:56:47adminsetgithub: 49981
2010年10月18日 20:44:51eric.araujosetnosy: + eric.araujo
messages: + msg119078
2009年04月09日 22:52:15tareksetstatus: open -> closed

messages: + msg85833
versions: + Python 3.0, Python 3.1, Python 2.7
2009年04月09日 21:53:33tareksetmessages: + msg85830
2009年04月09日 21:51:43mhammondsetmessages: + msg85829
2009年04月09日 20:51:23paul.moorecreate

AltStyle によって変換されたページ (->オリジナル) /