473,748 Members | 4,178 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_fol der_path('CSIDL _COMMON_PROGRAM S') + r'\IPython'

# Create IPython entry ...
if not os.path.isdir(d ):
os.mkdir(d)
directory_creat ed(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_instal l.py

Cheers,

f

Jul 18 '05 #1
3 1805
Fernando Perez <fp********@gma il.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_sc ript, 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********@gma il.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_sc ript, 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_sc ript, 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
1985
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 the installer for this package I'm trying to install, I get a message saying that I need admin privs. Is there a way around this? Why can't it just put things in C:\Python23\Lib\site-packages like a good little installer?
8
503
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 not install my program as a service on the client machine. Is there something special I need to do? Shouldn't the 'Project Output' show the installer that I have made a service and then install the thing properly?
3
1892
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 should be identicle. On one system the installer project will compile correctly, but on two others it will fail with this error. ------ Rebuild All started: Project: Installer, Configuration: Debug ------ Building file 'T:\Current Builds...
1
1315
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 installed) >I thought that spe requried 2.3+ (ie it should allow for 23, 24 but not 22). Is there anyway that SPE can require a minimum version (eg python 23)? Thanks, Stani
4
6432
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 thinking the following might help. I would appreciate if someone could comment on this idea and possibly suggest a better one: The environement variable in question is 'Path' in the HKCU registry folder's Environment key. I want to add some...
1
1333
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 installers in my sdist distribution, so if I untar my source distribution and do 'python setup.py install', the script either untars the subpackages to a tmp directory and does an os.system('python setup.py install') (Linux), or...
0
1309
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 for a long time on a different server. Basically, I am reading an html page template into a variable with fread(). I then am doing this, which is code taken from a user example on the eval() php manual page, which I have used successfully...
6
2272
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 Submitting dist\argparse-0.8.0.zip to http://www.python.org/pypi Server response (200): OK Submitting dist\argparse-0.8.0.win32.exe to http://www.python.org/pypi Upload failed (400): Bad Request
12
1681
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 everything in a single executable. It seems fairly unacceptable to tell our customers that they can't rename a file we send them. I hear this problem is fixed in 0.6.8, but unfortunately there's no standalone installer for py2exe 0.6.8 - the...
0
8987
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8826
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9366
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9316
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6793
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4597
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4867
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2777
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.