Review Request: allow PYTHON_SITE_PACKAGES_DIR be set from cmake's command line

Marcos Dione mdione at grulic.org.ar
Sat Apr 11 19:31:15 BST 2009


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 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
-------------- 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-core-devel/attachments/20090411/cc8b0c92/attachment.diff>
-------------- 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-core-devel/attachments/20090411/cc8b0c92/attachment-0001.diff>


More information about the kde-core-devel mailing list