473,395 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Installer made with bdist_wininst segfaulting...

Hi all,

I am seeking advice/help from those with more win32 experience than myself. I
am trying to build a proper win32 installer for IPython, after a user did most
of the hard work. For the most part, it's working very well, but I am running
into a nasty problem, which took me a few hours to finally understand. This
smells to me like a python bug, but I could be wrong. Much googling didn't
turn up anything relevant.

Here is a brief summary: if the installer file is run from a windows drive which
is different from the one where python resides (and hence where ipython will
end up), the installer segfaults. No traceback, nothing, just a segfault
(well, one of those Windows dialogs asking me to send a binary traceback to
Redmond, but not a proper Python traceback).

The win32 laptop where I'm testing, for example, has user stuff in the D: drive,
and Python installed in C:\Python23. I was running the installer from D:\Temp,
and getting this segfault. If I run it from C:\Temp, it works perfectly.

I have put the installer here, in case someone else is willing to test this on a
different machine:

http://amath.colorado.edu/faculty/fp....6.9.win32.exe

I have narrowed down to a single os.chdir() call in the post-install script.
The code is simply:

# Lookup path to common startmenu ...
d = get_special_folder_path('CSIDL_COMMON_PROGRAMS') + r'\IPython'

# Create IPython entry ...
if not os.path.isdir(d):
os.mkdir(d)
directory_created(d)

# XXX - The binary installer segfaults here if it was being run from a
# different drive than it is trying to change to. In my case, I have
# everything in D:, but Python lives in C:, so the chdir() call is going
# from D: to C:, and this is crashing things.

print "Current dir:",os.getcwd() # dbg
print "Going to :",d # dbg

os.chdir(d)

By forcing a return before the chdir() call, I was able to see that when the
source/destination are both on C:, it's all OK, but when the source is in D:
and the destination in C:, I get the crash.

This is really frustrating, since I'd like to be able to stop distributing .zip
sources to Windows users, and would like to be able to provide a proper
installer/deinstaller. But having this thing crash if two drives are involved
is just not acceptable.

Any help from the win32 gurus out there would be much appreciated. For
reference, the binary installer linked above was created on a Fedora3 box
running pyhton 2.3.4, with the command line:

../setup.py bdist_wininst --install-script=ipython_win_post_install.py

Cheers,

f

Jul 18 '05 #1
3 1771
Fernando Perez <fp********@gmail.com> writes:
Hi all,

I am seeking advice/help from those with more win32 experience than myself. I
am trying to build a proper win32 installer for IPython, after a user did most
of the hard work. For the most part, it's working very well, but I am running
into a nasty problem, which took me a few hours to finally understand. This
smells to me like a python bug, but I could be wrong. Much googling didn't
turn up anything relevant.

Here is a brief summary: if the installer file is run from a windows drive which
is different from the one where python resides (and hence where ipython will
end up), the installer segfaults. No traceback, nothing, just a segfault
(well, one of those Windows dialogs asking me to send a binary traceback to
Redmond, but not a proper Python traceback).


There are a couple of known bugs in bdist_wininst, and you just reported
another one. All these bugs are related to using the
post_install_script, and show up when either (thats what I currently
remember):

- the installer is run from a readonly location,
- the installer is run from a different drive (as you reported)
- the installer installs for Python 2.4

I will fix these issues in Python 2.3.5, which will probably be out as a
release candidate this week, and in Python 2.4.1.

I urge everyone to install this release candidate, rebuild the
installer with it, and test them thoroughly.

Thanks,

Thomas
Jul 18 '05 #2
Hi Thomas,

Thomas Heller wrote:
Fernando Perez <fp********@gmail.com> writes:

Here is a brief summary: if the installer file is run from a windows drive
which is different from the one where python resides (and hence where
ipython will
end up), the installer segfaults. No traceback, nothing, just a segfault
(well, one of those Windows dialogs asking me to send a binary traceback to
Redmond, but not a proper Python traceback).


There are a couple of known bugs in bdist_wininst, and you just reported
another one. All these bugs are related to using the
post_install_script, and show up when either (thats what I currently
remember):


[...]

many thanks for following up on this. In my case, I realized I could avoid the
chdir() call and things were then OK. But it's good to see the bug fixed.

Best regards,

f

Jul 18 '05 #3
Thomas Heller wrote:
There are a couple of known bugs in bdist_wininst, and you just reported
another one. All these bugs are related to using the
post_install_script, and show up when either (thats what I currently
remember):

- the installer is run from a readonly location,
- the installer is run from a different drive (as you reported)
- the installer installs for Python 2.4

I will fix these issues in Python 2.3.5, which will probably be out as a
release candidate this week, and in Python 2.4.1.


One more small thing I just remembered...

In my testing, I noticed the installer, even when it succeeds, leaves little
temp files littering the root directory of the drive it was run from. These
seem to be the files where stdout is captured, but they should be explicitly
removed at the end.

Cheers,

f

Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: timothy.williams | last post by:
Hello all. We don't have admin privs on our Windows boxes, but I'd like to be able to install a package built using distutils. I was able to install Python without admin, but when I tried to run...
8
by: D Busby | last post by:
List I've made a .NET windows service in C++, then I added an installer to the solution. I added the 'Project Output' from my .NET service as a package for the installer to install however it does...
3
by: Brian Henry | last post by:
This has worked perfectly for the past year now all the sudden it will not compile the installer project correctly. All our source code is in a Source Safe database so every system we do this on...
1
by: SPE - Stani's Python Editor | last post by:
A SPE user reported this: http://developer.berlios.de/bugs/?func=detailbug&bug_id=4878&group_id=4161 >SPE Installer gives option for installing for python22 (i have python22, 23, and 24...
4
by: Shiraz | last post by:
Hi I'm using Visual Studio Installer to make my installer, and have not as yet figured out a straightforward way to use it to set environmental variables. Amongst the various things I tried, I'm...
1
by: timw.google | last post by:
Hi all. I have a package that uses other packages. I created a setup.py to use 'try:' and import to check if some required packages are installed. I have the tarballs and corresponding windows...
0
by: Stephen Kay | last post by:
I'm having a problem where I changed hosts, went from php 4.1.2 to php 4.4.4, and now preg_replace_callback() is segfaulting when I pass it html that is longer than 2732 bytes. This code has worked...
6
by: Steven Bethard | last post by:
I just tried to upload new versions of the argparse module to PyPI, but it seems like I can no longer upload Windows installers: $ setup.py sdist bdist_wininst upload ... running upload...
12
by: chardish | last post by:
Hello, I'm trying to build an executable with py2exe, but unfortunately the version I have is 0.6.6, which has a rather annoying bug that doesn't let you rename the executable file if you bundle...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.