On 03-Jun-02 "John J. Lee" <[EMAIL PROTECTED]>  wrote:
> I tried building PyKDE 3.2.4 against KDE 3.0.1, and it refuses to
> build.

> I realise Jim hasn't updated it yet for this KDE version, but is
> this really necessary -- isn't it possible to just give a warning
> during configure, and go ahead and build anyway?  I presume
> 3.0.1 isn't monumentally different from 3.0.0, so that most /
> all of it should build, even if the wrapper is missing some new
> features?

Actually I didn't think PyKDE would build with 3.0.1 after looking
at diffs of the h files (and in fact I'm not sure it does quite -
see below). It's impossible to predict what will change - usually
if only the last digit of the version increments, the changes are
small. However, the changes from 3.0beta2 to 3.0.0 were major.

You can always modify 'configure' and scripts - it's not hard to
find the version check. As a policy for a release, I don't think
it's a good idea - the check is done (among other reasons) to
prevent people from building a PyKDE that doesn't work.
 
> Niggle: The `build' script has /usr/bin/python in the #! line.
 
>#!/usr/bin/env python
 
> is more standard, since as I'm sure you (Jim) know, it will find
> Python wherever it may be hiding.

This was intentional (it's called from configure using
'$PYTHONINTERP build <options>', and configure knows where Python is
located), but it's incorrect for 'build', since it needs to be able
to run stand-alone. I'll fix it for the next release. Thanks.

(Can't remember why I thought that was better at the moment - arg
passing?)
 
On 03-Jun-02 Ricardo Javier Cardenes Medina <[EMAIL PROTECTED]> 
wrote:

> Modify function 'checkOptions' to recognize KDE 3.0.1. Search
> for:
 
>                 elif (pair [0] == '--kde') or (pair [0] == '-k'):
>                         kdeVersion = unversion ('KDE', pair [1])
>                         if not kdeVersion in KDEVers:
 
> and then change it to:
> 
>                 elif (pair [0] == '--kde') or (pair [0] == '-k'):
>                       if kdeVersion == "301":
>                               kdeVersion == "300"
>                         kdeVersion = unversion ('KDE', pair [1])
>                         if not kdeVersion in KDEVers:
 
> That worked for me and I haven't had problems since then. Of
> course, YMMV.

>From the h file diffs between versions I didn't think it would
build. The main reason I thought that is that some methods have
changed from 'void foo' to 'virtual void foo'. That's hardcoded
into the *.sip files, so rebuilding with 3.0.1 won't catch that
change. Apparently gcc and ld don't notice this change, but the
resulting code isn't strictly correct and may cause problems.

As with a lot of stuff in PyKDE, this may occur in methods hardly
anyone will use, so I wouldn't say "Don't do this!". In fact I'm
very pleased with the fact that the new build procedure is as
hackable as it is. But it may not work in all cases.

Jim

_______________________________________________
PyKDE mailing list    [EMAIL PROTECTED]
http://mats.gmd.de/mailman/listinfo/pykde

Reply via email to