[issue4636] bdist_wininst installer with install script raises exception

2013-09-15 Thread Dan Nicholson

Dan Nicholson added the comment:

Right, that's what makes this difficult. If the stub exe of the target python 
was used, then it wouldn't need to care about compatibility. However, what 
you're running is the stub of the build python. So, when I distribute a 
bdist_wininst exe, it's running the stub from my python on the user's machine. 
That introduces a few compatibility issues.

1. The exe needs the same CRT version installed on the target that it was built 
with. It would fail to run immediately in this case. This does make having the 
built python be newer than the target python a little difficult.

2. The exe loads the python dll on the target machine. This requires the python 
dll to have enough compatibility for the usage of the python API in the exe of 
the build version.

3. After loading the python dll, python code is run in the target python. This 
is the problem I'm trying to solve here. The python code is embedded in the exe 
of the installer, so the compatibility with the target python has to be 
considered at build time.

The situation you're describing where the wininst of the target is run could 
maybe be made to work, but it would be a larger project.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4636
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4636] bdist_wininst installer with install script raises exception

2013-09-10 Thread Dan Nicholson

Dan Nicholson added the comment:

It turns out this is pretty easy to fix by just changing the stub to import 
builtins or __builtin__ depending on the python install version. Attached are 
patches that fix this for both the default and 2.7 branches.

My test case is a pure python module with an install script. I've rebuilt the 
wininst stub for both default (3.3) with VS2010 Express and 2.7 with VS2008 
Express. I then built installers and ran them in both directions: installer 
created with python-2.7 and installed into python-3.3, and an installer created 
with python-3.3 and installed into python-2.7. Both worked fine with no 
warnings.

I've attached the stubs I built in case they're helpful. 
wininst-10.0-compat.exe is the 32 bit stub for default/3.3. 
wininst-9.0-compat-2.7.exe is the 32 bit stub for 2.7.

--
keywords: +patch
nosy: +dbn
Added file: http://bugs.python.org/file31714/wininst-compat.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4636
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4636] bdist_wininst installer with install script raises exception

2013-09-10 Thread Dan Nicholson

Changes by Dan Nicholson dbn.li...@gmail.com:


Added file: http://bugs.python.org/file31716/wininst-10.0-compat.exe

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4636
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4636] bdist_wininst installer with install script raises exception

2013-09-10 Thread Dan Nicholson

Changes by Dan Nicholson dbn.li...@gmail.com:


Added file: http://bugs.python.org/file31715/wininst-compat-2.7.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4636
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4636] bdist_wininst installer with install script raises exception

2013-09-10 Thread Dan Nicholson

Changes by Dan Nicholson dbn.li...@gmail.com:


Added file: http://bugs.python.org/file31717/wininst-9.0-compat-2.7.exe

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4636
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11598] missing afxres.h error when building bdist_wininst in Visual Studio 2008 Express

2013-09-10 Thread Dan Nicholson

Dan Nicholson added the comment:

Like the previous users, I've only got VS Express, so I can't tell exactly what 
happens when you have VS Pro and it generates the install.rc file. However, I 
might as well post this fuller patch, which I think would do the right thing 
since it also fixes the part where the regeneration of the '#include 
afxres.h' would happen.

I've used this in the installer for both 3.3 and 2.7 and not seen any adverse 
effects.

--
keywords: +patch
nosy: +dbn
Added file: http://bugs.python.org/file31718/wininst-no-afxres.h.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11598
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com