[PATCH] bug 174806 (another one)

Marcos Dione mdione at grulic.org.ar
Sat Apr 11 20:55:04 CEST 2009


    this is actually a forward from kde-core-devel. I think this
approach is simpler than the one proposed. I think we could tackle the
advantages of python2.6 later, and only if python2.6 gives us the
'local-to-user' path somehow, not guessing it.

    I'm reattaching the patches here. I repeat the WARNING: as I have
problems guessing the base diff path for reviewboard, the second patch (-2)
is based on /trunk/KDE/kdelibs, while the first one is based on /trunk/KDE.

----- Forwarded message from Marcos Dione <mdione at grulic.org.ar> -----

Date: Sat, 11 Apr 2009 15:31:15 -0300
From: Marcos Dione <mdione at grulic.org.ar>
Subject: Re: Review Request: allow PYTHON_SITE_PACKAGES_DIR be set from
	cmake's command line
To: Thiago Macieira <thiago at kde.org>
Cc: kde-core-devel at kde.org

On Sat, Apr 11, 2009 at 09:42:17AM +0200, Thiago Macieira wrote:
> Marcos Dione wrote:
> >Summary
> >-------
> >
> >this small patch allows to specify the PYTHON_SITE_PACKAGES_DIR path
> > from the cmake's command line via a -DPYTHON_SITE_PACKAGES_DIR option.
> > I already tested it and works with kdebase and kdebindings modules.
> >
> >
> >Diffs
> >-----
> >
> >  /trunk/KDE/kdelibs/cmake/modules/FindPythonLibrary.cmake 952067
> >
> >Diff: http://reviewboard.kde.org/r/553/diff
> 
> Can you please post the diffs?

    attached, it's really simple, as it doesn't try to do all the magic
found in [1]. WARNING: as I have problems guessing the base diff path
for reviewboard, the second patch is based on /trunk/KDE/kdelibs, while
the first one is based on /trunk/KDE.

> The link above doesn't work.

    yeah, it's because I couldn't figure out the proper base diff path
for the review board. see my mail in kde-devel.

> Also, please make the default be 
> ${LIB_INSTALL_DIR}/python${PYTHON_SHORT_VERSION}/site-packages/PyKDE4. 
> (Since I can't see the diff, I can't tell if you made this already the 
> default)

    I could complicate it a bit, at least for a first shot. still not
trying to do all the magic in [1], I could make it install in:

    * python's site-packages.
    * your proposed path, except for the PyKDE4 part (this also applies
to plasma stuff).
    * the one specified using -DPYTHON_SITE_PACKAGES_DIR.

    we could make the first the default, making the work of packagers
easier, and enabling the second with something like
-DPYTHON_LIBS_WITH_KDE_LIBS. or we could make the second the default,
more obvious for those setting the CMAKE_PREFIX_DIR and specting it to
be honored by the whole install process, and enabling the fisrt with
-DPYTHON_LIBS_IN_PYTHON_SITE_PACKAGES. and the third as told. all this
with the proper doc somewhere in kdelibs, kdebase *and* kdebindings; the
latter two the only (as of today) affected modules.

    I realize that if both python and kde4 are installed in a system
wide dir, like /usr, both the first and second paths are the same, but
this way we not only tackle the problem of installing kde4 somewhere
else, but also a kde4 using a non standard python, like one installed in
/usr/local.

    attached, then, are both patches, the original and simpler one, and
the other one proposed here, using the second variant as per your
suggestion, but with the first one commented out just for revission in
case we think it's better. I tested it with the kdebindings module.

    maybe later I could make another patch targeting python >=2.6.

--
[1] http://lists.kde.org/?t=123722894700003&r=1&w=2&n=6
-- 
(Not so) Random fortune:
Este día siempre me da una sensación medio feliz, medio triste. Los
domingos son el Chaplin de la semana.
	    -- Liniers

----- End forwarded message -----

-- 
(Not so) Random fortune:
18:55 < m4rgin4l> el tipo tiene un grupo de ayuda al paranoico
18:56 < m4rgin4l> se persiguen entre ellos para no sentirse solos
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdelibs-python_site-packages_dir-2.diff
Type: text/x-diff
Size: 1462 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20090411/af30ba15/attachment-0002.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdelibs-python_site-packages_dir.diff
Type: text/x-diff
Size: 1032 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20090411/af30ba15/attachment-0003.bin 


More information about the Kde-buildsystem mailing list