[Patches] [ python-Patches-983164 ] MSVC6/7 issues with bdist_wininst and --target-version

SourceForge.net noreply at sourceforge.net
Thu Jul 1 15:59:56 EDT 2004


Patches item #983164, was opened at 2004-07-01 05:26
Message generated for change (Comment added) made by theller
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=983164&group_id=5470

Category: Distutils and setup.py
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Mark Hammond (mhammond)
Assigned to: Mark Hammond (mhammond)
Summary: MSVC6/7 issues with bdist_wininst and --target-version

Initial Comment:
bdist_wininst attempts to use the correct MSVC runtime
for the current version of Python.  This doesn't work
correctly when --target-version is set.  In that case,
bdist_wininst still uses the *current* sys.version (ie,
2.4) rather than the version specified as
--target-version.  Thus, the msvc7 runtime based
executable stub is *always* used.

This patch "hard-codes" knowledge of earlier Python
versions, providing the correct result when Python 2.4
is used to build Python 2.3 and earlier distributions.

As the comments in the patch mention, another
alternative is to allow --target-version to specify a
Python executable instead of a simple version string,
and execute that Python to parse its sys.version.  Let
me know if you think that is a good/better idea.

Assigning to Thomas for review, then please assign back.

----------------------------------------------------------------------

>Comment By: Thomas Heller (theller)
Date: 2004-07-01 21:59

Message:
Logged In: YES 
user_id=11105

Maybe bdist_wininst must be changed to (hard-coded) only
accept 2.4 and higher when 2.4 is used to build the
installer, and only accept 2.3 and lower otherwise?

For the other idea (building the installer on the target
system): we could run 'setup.py build_ext' on the source
system, maybe repeat this for different Python versions if
available, zip up the source and build tree (including
compiled extensions), and then run 'setup.py bdist_wininst'
on the target system, and then execute the exe?

This would also allow to have cross version support,
including extensions, in one installer file.

----------------------------------------------------------------------

Comment By: Thomas Heller (theller)
Date: 2004-07-01 21:39

Message:
Logged In: YES 
user_id=11105

The situation is even worse.

--target-version is only available for pure-Python
distributions which don't have extension modules, if you
want to restrict the installer to only one version of
Python, for whatever reason.  I could never think of a
reason, but now there is one: different MSVC runtimes used
in the target Python.

Running a Python executable to determine the MSVC runtime
does not work: First, usually you build installers for other
users, second, some people build windows installers on
non-windows systems.

I have no idea how this can be solved, except of a very old
one of mine: build and execute the installer on the target
system ;-)

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=983164&group_id=5470



More information about the Patches mailing list