You are not logged in.
I'm trying to build a PKGBUILD for a program that uses a python script installer. I'm not familiar with python, but it appears that the program is trying to build a new python module. I ran the installer not as root, and it basically copied a bunch of files to a build directory, did some permission changing, then attempted to copy the directory to the python lib directory:
$ python setup.py install
[...]
changing mode of build/scripts-2.5/FastCollector from 700 to 755
running install_lib
creating /usr/lib/python2.5/site-packages/switzerland
error: could not create '/usr/lib/python2.5/site-packages/switzerland': Permission denied
How might I redirect the python installation to use $startdir/pkg ? Is there a file somewhere in the program's source that tells python how to perform the install that I could edit? Or I could somehow give the python call a fake root directory to work with? (pivot_root and chroot obviously require root privs.)
I suppose a more general/useful question would be: For programs without standard "make install" installers, what's the general method for forcing an install into $startdir/pkg ?
[edit]
I suppose I could just let the install fail and then manually copy the build directory to $startdir/pkg , but I don't like that solution. First, I have to assume that the build script will exit with failure (because it tries to create a directory it doesn't have permission to create), so I have no way of checking the build script's return status to see if it failed for a perhaps legitimate reason. Second, I don't know enough to know if I can assume that this is the last step the python installer will perform, maybe it fails at this step and I manually perform it, but maybe it will also go on to do other things.
Last edited by B-Con (2008-08-03 08:16:43)
Offline
python setup.py install --root=$startdir/pkg
General advice: if you're having trouble creating a package, look for a similar PKGBUILD in the official repos or the AUR to see how others have done it.
Offline
That is good advice. Thanks. :embarrassed:
Offline