set default installation prefix in

Bug #596241 reported by Didier Roche on 2010-06-19
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

My python application has a setup file generated with quickly.
when I run with no arguments for installation prefix, It installs the app in /usr/local, but update_data_directory() function sets data path ( to a non-exsistant folder) in /usr/share, so the app looks for installed files in /usr.
But when I set the installation path using --prefix option, the app will be installed correctly.
Is there any way to set a default installation prefix in the file, so that InstallAndUpdateDataDirectory() function uses that when no prefix is specified in command line?
Thanks in advance.

Didier Roche (didrocks) on 2010-06-19
Changed in quickly:
status: New → Triaged
importance: Undecided → Wishlist
Umang Varma (umang) wrote :

I'm not very sure of how python-distutils-extra works, but I have the feeling it is uses the standard distuils not behaves like it. So any Ubuntu/Debian changes made to that will affect python-distutils-extra also.

The installation root in Ubuntu/Debian by default is /usr/local. However, it is supposed to be sys.prefix (which is most probably /usr/ on your computer). I'm going to put a small note on the Debian wiki about this.

Now I really don't know a good way to deal with this. Hardcoding /usr/local would not be nice, because it may not affect other distros. Furthermore, when building a Debian package distutils is called with the --instal-layout=deb option. This means that data files will actually be installed into /usr/share/foo.

What I've done once is to have a list of places the data file can be found - sys.prefix, /usr/local and local directory (if run from inside the DVCS branch). A nice function somewhere inside the template would be nice so that projects call easily call this function and retrieve this list. (Maybe the developer can add the local directory manually, if the directory structure inside /usr/share/foo and and the local directory vary.

What I'm calling local directory would be `quickly_root_directory` in main quickly script.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers