Scripts executing differently in the installer than outside
Scripts executing differently in the installer than outside
- Subject: Scripts executing differently in the installer than outside
- From: Chris Maddison <email@hidden>
- Date: Wed, 6 Aug 2008 14:29:17 -0700
Hi,
I am setting up an installer that installs setuptools and nose testing
for Python 2.5 on OS 10.5. To run the install I am creating a
temporary file with the source distributions and running short
postinstall script to do the installation of the packages. The scripts
I have running are fairly simple:
#!/bin/sh
cd $2nose_installer_temp
sh setuptools-0.6c8-py2.5.egg
easy_install -v nose
exit 0
When I run the equivalent script as an executable outside of the
Installer it works great:
/Users/chris/Documents/PyGraphics/Installer/Nose/resources/
postinstall ; exit;
Corbie:~ chris$ /Users/chris/Documents/PyGraphics/Installer/Nose/
resources/postinstall ; exit;
Processing setuptools-0.6c8-py2.5.egg
Removing /Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/setuptools-0.6c8-py2.5.egg
Copying setuptools-0.6c8-py2.5.egg to /Library/Frameworks/
Python.framework/Versions/2.5/lib/python2.5/site-packages
setuptools 0.6c8 is already the active version in easy-install.pth
Installing easy_install script to /Library/Frameworks/
Python.framework/Versions/2.5/bin
Installing easy_install-2.5 script to /Library/Frameworks/
Python.framework/Versions/2.5/bin
Installed /Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/site-packages/setuptools-0.6c8-py2.5.egg
Processing dependencies for setuptools==0.6c8
Finished processing dependencies for setuptools==0.6c8
Searching for nose
Best match: nose 0.10.3
Processing nose-0.10.3-py2.5.egg
nose 0.10.3 is already the active version in easy-install.pth
Installing nosetests script to /Library/Frameworks/Python.framework/
Versions/2.5/bin
changing mode of /Library/Frameworks/Python.framework/Versions/2.5/
bin/nosetests to 755
Using /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/
site-packages/nose-0.10.3-py2.5.egg
Processing dependencies for nose
Finished processing dependencies for nose
Note that this method has the correct default install location.
/Library/Frameworks/Python.framework/Versions/2.5/bin for scripts and /
Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-
packages for the modules. When the SAME script is run in the installer
I get:
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 2] No such file or directory: '/Library/Python/2.5/site-
packages/test-easy-install-4156.write-test'
The installation directory you specified (via --install-dir, --
prefix, or
the distutils default setting) was:
/Library/Python/2.5/site-packages/
This directory does not currently exist. Please create it and try
again, or
choose a different installation directory (using the -d or --install-
dir
option).
It seems like a different default directory is being used and I can't
figure out why or how to change that. I've tried forcing it in various
ways suggested in the setuptools documentation, but none of them work
perfectly. Is there some quirk of shells that I don't understand, does
have it have something to do with different environment variables? It
makes no sense to me that they should act differently.
Sorry for the massive email! and thanks!
Chris Maddison
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden