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.

Title: wininst regression: errors when building on linux
Type: behavior Stage: resolved
Components: Distutils, Distutils2 Versions: Python 3.2, Python 3.3, Python 2.7, 3rd party
Status: closed Resolution: out of date
Dependencies: 10945 Superseder:
Assigned To: eric.araujo Nosy List: Aaron.Staley, alexis, brian.curtin, eric.araujo, georg.brandl, jafo, mhammond, runtux, steve.dower, tarek, techtonik
Priority: normal Keywords: patch

Created on 2010-06-09 14:20 by techtonik, last changed 2022-04-11 14:57 by admin. This issue is now closed.

File name Uploaded Description Edit
suffix.patch techtonik, 2011-01-09 17:40 fixed comments version review
issue1774043_7001.diff techtonik, 2011-01-19 11:39 review
Messages (24)
msg107398 - (view) Author: anatoly techtonik (techtonik) Date: 2010-06-09 14:20
2.5.1 version of distutils was able to correctly build wininst dists from linux. Right now there are errors which I'll describe in more details once I can get some Linux box.
msg107399 - (view) Author: anatoly techtonik (techtonik) Date: 2010-06-09 14:23
At least is was reported that compiled binaries contains wrong platform name, i.e. 'linux' and there are errors about inability to look up some compiler options in windows registry while building.
msg107400 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2010-06-09 14:37
Where was that reported?
msg107432 - (view) Author: anatoly techtonik (techtonik) Date: 2010-06-09 22:39
In this SCons thread
msg107533 - (view) Author: anatoly techtonik (techtonik) Date: 2010-06-11 07:51
$ python build bdist_wininst
running build
running build_py
running bdist_wininst
installing to build/bdist.linux-i686/wininst
running install_lib
creating build/bdist.linux-i686/wininst
creating build/bdist.linux-i686/wininst/PURELIB
copying build/lib.linux-i686-2.6/ -> build/bdist.linux-i686/wininst/PURELIB
running install_egg_info
Writing build/bdist.linux-i686/wininst/PURELIB/wget-0.6.egg-info
creating '/tmp/' and adding '.' to it
adding 'PURELIB/wget-0.6.egg-info'
adding 'PURELIB/'
creating dist
Warning: Can't read registry to find the necessary compiler setting
Make sure that Python modules _winreg, win32api or win32con are installed.
removing 'build/bdist.linux-i686/wininst' (and everything under it)
$ ls dist
msg107535 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-06-11 08:36
The error comes from the msvccompiler module, which shouldn’t get used on non-Windows platforms unless I’m mistaken. Reading the module, I’m not sure at all this command was meant to be run on not-Windows OSes.
msg107536 - (view) Author: anatoly techtonik (techtonik) Date: 2010-06-11 08:47
It did run ok on non-Windows OSes with previous Python versions.
msg108776 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-06-27 10:04
It certainly should be possible to build these installers, and if I understand your output correctly, an installer *was* built.  The warning is, after all, just a warning, and probably just the warning got added compared to 2.5, but the behavior is the same.

The platform name is a regression though.
msg109984 - (view) Author: anatoly techtonik (techtonik) Date: 2010-07-11 10:21
The regression is two-fold:

1. platform name regression is caused by r62197 by Mark Hammond - Issue #2513: enable 64bit cross compilation on windows

2. when wininst stub selection started to depend on MSVC compiler version is yet to be investigated, but I am sure that wininst stub selection should only be affected by compatibility with operating system only

More complete research notes are at
msg110075 - (view) Author: anatoly techtonik (techtonik) Date: 2010-07-12 08:45
msg110076 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-07-12 08:52
Did you test that patch? ISTM that it contains a syntax error:

+        if not self.distribution.has_ext_modules()
+            and not self.distribution.has_c_libraries():
msg110083 - (view) Author: anatoly techtonik (techtonik) Date: 2010-07-12 11:37
reuploaded correct version to rietveld.
msg110109 - (view) Author: Mark Hammond (mhammond) * (Python committer) Date: 2010-07-12 16:35
With the caveat that I haven't tested it (I'm currently traveling), the patch looks good to me.
msg118800 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-10-15 16:44
Raising priority.
msg119085 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-10-18 21:31
I get an error trying to run the command because of the use of the mbcs codec.

Ezio made some comments on Rietveld, I addressed them in a local clone.

Question for Windows users/experts: Do the terms “binary extension” and “binary code” make sense?  If not, I can change them to the clearer “extension modules” and “C code”.
msg125847 - (view) Author: anatoly techtonik (techtonik) Date: 2011-01-09 17:05
Fixed Ezio comments at

Eric, if I understand you correctly, the mbcs issue you're experiencing is unrelated to the patch. What else do you need?
msg126523 - (view) Author: anatoly techtonik (techtonik) Date: 2011-01-19 11:38
Is this issue really critical? 
msg126529 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-01-19 15:29
I opened another bug for the MBCS problem which prevents me from testing Anatoly’s patch.
msg135893 - (view) Author: Ralf Schlatterbeck (runtux) * Date: 2011-05-13 10:29
2.6 already produces a .linux-i686.exe package instead of .win32.exe when running bdist_wininst. I've now used python2.5 for producing a binary windows installer for roundup.
msg135902 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-05-13 13:09
2.6 only gets security fixes.
msg155568 - (view) Author: Sean Reifschneider (jafo) * (Python committer) Date: 2012-03-13 04:34
Éric: In are you saying:

This issue needs to be re-targeted to a newer Python.
Close -- won't fix.
Something else?

This issue seems to be stuck here, any ideas on what needs to be done to move this forward?
msg155592 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-03-13 11:50
Sean: In msg135902 I am merely explaining why I removed 2.6 from the list of versions.  Only 2.7, 3.2 and 3.3 can get fixed.

If you look at my previous message or the list of dependencies, you can see that #10945 needs to be fixed first before I can review the patch provided for this issue.
msg161316 - (view) Author: Aaron Staley (Aaron.Staley) Date: 2012-05-22 02:04
I was looking over this patch (as it relates to my bug report: and noticed that this line:

+        if (not self.distribution.has_ext_modules() and 
+            not self.distribution.has_c_libraries()):
+            basename = "%s.%s" % (fullname, "win32")

I feel it may be better to insert plat_name there if it exists. That way, users can create installers targeted for win-amd64.  Why is this needed for a pure python packages? This bug:
msg386442 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-02-03 18:37
Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils.

If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at
Date User Action Args
2022-04-11 14:57:02adminsetgithub: 53200
2021-02-03 18:37:38steve.dowersetstatus: open -> closed

nosy: + steve.dower
messages: + msg386442

resolution: out of date
stage: test needed -> resolved
2012-05-22 02:04:26Aaron.Staleysetnosy: + Aaron.Staley
messages: + msg161316
2012-03-13 11:50:59eric.araujosetpriority: critical -> normal
versions: + 3rd party, Python 3.3, - Python 3.1
nosy: + alexis

messages: + msg155592

components: + Distutils2
2012-03-13 04:34:29jafosetnosy: + jafo
messages: + msg155568
2011-05-13 13:09:23eric.araujosetmessages: + msg135902
versions: - Python 2.6
2011-05-13 10:29:15runtuxsetnosy: + runtux

messages: + msg135893
versions: + Python 2.6
2011-01-19 15:29:22eric.araujosetnosy: mhammond, georg.brandl, techtonik, tarek, eric.araujo, brian.curtin
dependencies: + bdist_wininst depends on MBCS codec, unavailable on non-Windows
messages: + msg126529
2011-01-19 11:39:42techtoniksetfiles: + issue1774043_7001.diff
nosy: mhammond, georg.brandl, techtonik, tarek, eric.araujo, brian.curtin
2011-01-19 11:38:35techtoniksetnosy: mhammond, georg.brandl, techtonik, tarek, eric.araujo, brian.curtin
messages: + msg126523
2011-01-09 17:41:01techtoniksetfiles: - suffix.patch
nosy: mhammond, georg.brandl, techtonik, tarek, eric.araujo, brian.curtin
2011-01-09 17:40:53techtoniksetfiles: + suffix.patch
nosy: mhammond, georg.brandl, techtonik, tarek, eric.araujo, brian.curtin
2011-01-09 17:05:11techtoniksetnosy: mhammond, georg.brandl, techtonik, tarek, eric.araujo, brian.curtin
messages: + msg125847
2010-10-18 21:31:03eric.araujosetassignee: tarek -> eric.araujo
messages: + msg119085
versions: - Python 2.6
2010-10-15 16:44:18georg.brandlsetpriority: normal -> critical

messages: + msg118800
2010-07-12 16:35:31mhammondsetmessages: + msg110109
2010-07-12 11:38:11techtoniksetfiles: - suffix.patch
2010-07-12 11:37:57techtoniksetfiles: + suffix.patch

messages: + msg110083
2010-07-12 08:52:07georg.brandlsetmessages: + msg110076
2010-07-12 08:46:31techtoniksetfiles: + suffix.patch
keywords: + patch
2010-07-12 08:45:55techtoniksetmessages: + msg110075
2010-07-11 10:21:42techtoniksetnosy: + mhammond
messages: + msg109984
2010-06-27 10:04:24georg.brandlsetnosy: + georg.brandl
messages: + msg108776
2010-06-11 08:47:59techtoniksetmessages: + msg107536
2010-06-11 08:36:26eric.araujosetnosy: + eric.araujo
messages: + msg107535
2010-06-11 07:51:29techtoniksetmessages: + msg107533
2010-06-09 22:39:10techtoniksetmessages: + msg107432
2010-06-09 14:37:00brian.curtinsetnosy: + brian.curtin
messages: + msg107400

type: behavior
stage: test needed
2010-06-09 14:23:54techtoniksetmessages: + msg107399
2010-06-09 14:20:42techtonikcreate