[ python-Bugs-1465834 ] bdist_wininst preinstall script support is broken in 2.5a1

SourceForge.net noreply at sourceforge.net
Tue Apr 11 19:19:16 CEST 2006


Bugs item #1465834, was opened at 2006-04-06 18:40
Message generated for change (Comment added) made by theller
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1465834&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Distutils
Group: Python 2.5
Status: Open
Resolution: None
>Priority: 7
Submitted By: Paul Moore (pmoore)
Assigned to: Nobody/Anonymous (nobody)
Summary: bdist_wininst preinstall script support is broken in 2.5a1

Initial Comment:
The attached zip file contains a trivial module. Run
"run_setup.bat" to create a bdist_wininst installer
(you'll need to edit it to make the preinstall script
path match where you unzipped the file).

The resulting installer fails with an error "Running the
pre-installation script failed".

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

>Comment By: Thomas Heller (theller)
Date: 2006-04-11 19:19

Message:
Logged In: YES 
user_id=11105

These apis are now macros, they were exported functions in
Python 2.4:

PyParser_SimpleParseFile
PyParser_SimpleParseString
PyRun_AnyFile
PyRun_AnyFileEx
PyRun_AnyFileFlags
PyRun_File
PyRun_FileEx
PyRun_FileFlags
PyRun_InteractiveLoop
PyRun_InteractiveOne
PyRun_SimpleFile
PyRun_SimpleFileEx
PyRun_SimpleString
PyRun_String
Py_CompileString

All of them, to be safe, should probably exposed as exported
functions again.

See also this thread on python-dev:

http://mail.python.org/pipermail/python-dev/2006-January/059374.html

Raising the priority to 7 because this must be fixed before
release.

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

Comment By: Paul Moore (pmoore)
Date: 2006-04-06 22:01

Message:
Logged In: YES 
user_id=113328

Seems to be limited to installers with preinstall scripts,
as far as I can tell. The main example is pywin32, which is
irritatingly significant :-)

(One oddness I couldn't check is that scripts don't seem to
get compiled any more - don't know if this is related to the
same issue. It's not a big deal either way, though).

The fix sounds reasonable.

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

Comment By: Thomas Heller (theller)
Date: 2006-04-06 20:22

Message:
Logged In: YES 
user_id=11105

bdist_wininst7.1.exe uses runtime dynamic linking to the
python dll.  Python25.dll doesn't export a
PyRun_SimpleString function anymore, it has been replaced by
a macro:
#define PyRun_SimpleString(s) PyRun_SimpleStringFlags(s, NULL)

bdist_wininst *could* be changed to use
PyRun_SimpleStringFlags instead, however, installers built
with previous versions of Python will then refuse to install
pure distributions to Python 2.5.

I have not checked if installers that do *not* have a
pre-install script will work or not.

I suggest to make PyRun_SimpleString an exported function
again - this should be cheap.

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

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


More information about the Python-bugs-list mailing list