[PyKDE] Root vs. non-root builds

Jim Bublitz jbublitz at nwinternet.com
Fri Aug 23 17:31:01 BST 2002


On 23-Aug-02 Ricardo Javier Cardenes Medina wrote:
> On Thu, Aug 22, 2002 at 10:27:11PM -0700, Jim Bublitz wrote:
> Well... The only reason for being root at compile time is that
> right now you're looking for libqtcmodule.so to find out which
> Qt version (threaded or not) PyQt were compiled against. You
> expect it to be in the same place where PyKDE is to be installed
> (modDir), and that is often the site-packages inside your
> favorite Python version's directory, which uses to be owned by
> root.

Nope, that behaviour occurs in build.py which doesn't require root
privs - all of the relevant directories are world readable. I
haven't really looked into this carefully, but on another project I
just converted over to qmake/tmake, I noticed that running 'make'
as a non-root user only fails after compilation when the Makefile
is actually deleting/installing the generated libs. I believe that
comes from the target I mentioned (the second referenced in 'all'),
so that would probably be the fix. Anyway, it's easy to try (a
little harder to fix) so if I get a chance later today I'll try it.
 
> Of course, if you set a ~/python/site-packages (for example) and
> set that path as the install directory at compile time (-d
> option) for sip, PyQt and PyKDE, there will be no need to be
> root at compile time.

That's true - I wouldn't want to make a /home directory the default
for install. I'm not sure if the present set of switches will allow
that or what the Python path implications are. If it's easy I'll
add a switch to allow it.

> That's a solution for local compilations :-) For packagers (as
> myself), it use to be a little more tricky, as the destination
> directory (I can't speak for rpm, because I only know the Debian
> packaging style) is a fake root directory inside the package's
> build path, and is likely to be compiled by a non-root user (in
> my case, Debian policy forbids me the use of root privileges for
> anything during build/installation time).
 
> I'll send you later a tiny patch with the changes I've made for
> this behaviour.

I'll watch for that - I'm always interested in improvements.

Jim




More information about the PyQt mailing list