[Distutils] bdist_wininst compatibility with pythons and windows versions

anatoly techtonik techtonik at gmail.com
Fri Jun 11 10:43:29 CEST 2010


On Mon, Jun 7, 2010 at 10:01 AM, Mark Hammond <skippy.hammond at gmail.com> wrote:
>>
>> While Trac 0.12 is about to be released, there is some uncertainty
>> whenever new Distutils-generated installers are compatible with old
>> versions of Windows and Python. There are some fears that installers
>> generated on Vista and Windows 7 won't run on XP or 2000. Is that
>> true?
>
> That should be fine.  pywin32 has used Vista to generate the last few
> releases and it installs fine on XP (and probably 2000, but I can't say I
> actually tested that recently)
>
>> Also is there a limit on the lowest version of Python that installer
>> generated with Distutils to say 2.6.5 will run?
>
> I'm not aware of any limitations from 2.2 forwards - if you use the
> --target-version option, bdist_wininst should select the appropriate 'stub'
> executable for the version you specify (Python 2.6 includes stubs suitable
> for most 2.2-ish onwards)

build_wininst code [1] function get_exe_bytes() used to fetch
appropriate stub, doesn't seem to be cross-platform. More than that -
generated installer depends on specific version of MSVC compiler that
was used to compile Python. So it seems that there is no compatibility
even between one Python version.

In addition bdist_wininst generates spurious warning about missing
"necessary compiler setting" when run on Linux with an instruction to
make sure win32* modules are installed (which are of course not). Even
if wininst is strictly windows bdist, the generated .exe contains
'linux' suffix. Given all the above it  doesn't really seem that
generated installer should work on windows at all. Not even speaking
about compatibilities between Python versions or OS versions. Clearly
that folks generating installers on Linux doesn't have any way to
check this compatibility, so they use an older version that has all
sorts of problems with Windows UAC [3].

[1]  http://svn.python.org/view/python/trunk/Lib/distutils/command/bdist_wininst.py?revision=77761&view=markup
[2]  http://bugs.python.org/issue8954
[3]  http://bugs.python.org/issue8928
-- 
anatoly t.


More information about the Distutils-SIG mailing list