Re: seeking advice for xcb-proto packaging

2008-11-12 Thread Julien Cristau
On Tue, Nov  4, 2008 at 19:06:57 +0100, Adeodato Simó wrote:

>   (1) You should of course use python-central or python-support so that
>   the "xcbgen" Python package is always available for all installed
>   python versions. Hope that was your intention. :-)
> 
Yeah, I think I got that working.

>   (2) If you do that, then AFAICS no more meddling is strictly required for
>   things to work: the -p argument of c_client.py only appends the given
>   path to the list of directories Python searchs for modules. Since it
>   is appended at the end, the correct directory will be searched first.
> 
That was the missing piece, thanks.

>   (3) The fact that xcb-proto.pc hardcodes a Python path is, uhm, bad.
>   xcb-proto instalation script should take care of installing the Python
>   files somewhere importable (e.g. the $prefix/lib/python2.5/... path
>   you mentioned), and assume the 'import xcbgen' statement in c_client.py
>   will work in any system with xcb-proto installed (the -p flag could
>   still be supported, that's orthogonal).
> 
I'll sed the pythondir to /nonexistent in the .pc file, to avoid any
problem with this.

>   Putting a Python path in the .pc file means xcb-proto has to be
>   recompiled whenever the default Python version changes. Maybe somebody
>   on the list can take care of educating upstream about this, if this
>   analysis is correct, which I believe it is.
> 
> Was that clear enough? :-)
> 
It was, thanks again!

Cheers,
Julien


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: seeking advice for xcb-proto packaging

2008-11-04 Thread Adeodato Simó
* Julien Cristau [Tue, 04 Nov 2008 18:43:28 +0100]:

> Hi,

Hello Julien,

> xcb-proto upstream installs a few python files[1], which are then used
> at build time by libxcb[2].  Using the upstream build system, these
> files get installed to $prefix/lib/python2.5/site-packages/xcbgen, and
> that path is set in xcb-proto.pc's pythondir variable.  The libxcb build
> then uses that variable to look for xcbgen[3,4].

> Now that seems bad to me, because it means the python version gets
> hardcoded in the pkgconfig file, and when we switch to python 2.6
> c_client.py will still look in the python2.5 dir, and presumably find
> the .pyc files there.  Can anyone here suggest a way to fix this, either
> by working around it in the packaging or as a patch that I could send
> upstream?  python is very much an unknown beast to me, so hopefully
> you'll have some ideas :)

> Note that none of this is in the debian xcb-proto and libxcb packages
> yet, but I'm looking at packaging the next version and this issue is
> sort of blocking progress.

Let's go one step at a time:

  (1) You should of course use python-central or python-support so that
  the "xcbgen" Python package is always available for all installed
  python versions. Hope that was your intention. :-)

  (2) If you do that, then AFAICS no more meddling is strictly required for
  things to work: the -p argument of c_client.py only appends the given
  path to the list of directories Python searchs for modules. Since it
  is appended at the end, the correct directory will be searched first.

  (3) The fact that xcb-proto.pc hardcodes a Python path is, uhm, bad.
  xcb-proto instalation script should take care of installing the Python
  files somewhere importable (e.g. the $prefix/lib/python2.5/... path
  you mentioned), and assume the 'import xcbgen' statement in c_client.py
  will work in any system with xcb-proto installed (the -p flag could
  still be supported, that's orthogonal).

  Putting a Python path in the .pc file means xcb-proto has to be
  recompiled whenever the default Python version changes. Maybe somebody
  on the list can take care of educating upstream about this, if this
  analysis is correct, which I believe it is.

Was that clear enough? :-)

> [1] http://cgit.freedesktop.org/xcb/proto/tree/xcbgen
> [2] http://cgit.freedesktop.org/xcb/libxcb/tree/src/c_client.py
> [3] http://cgit.freedesktop.org/xcb/libxcb/tree/configure.ac#61
> [4] http://cgit.freedesktop.org/xcb/libxcb/tree/src/Makefile.am#265



-- 
Adeodato Simó dato at net.com.org.es
Debian Developer  adeodato at debian.org
 
The true teacher defends his pupils against his own personal influence.
-- Amos Bronson Alcott


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



seeking advice for xcb-proto packaging

2008-11-04 Thread Julien Cristau
Hi,

xcb-proto upstream installs a few python files[1], which are then used
at build time by libxcb[2].  Using the upstream build system, these
files get installed to $prefix/lib/python2.5/site-packages/xcbgen, and
that path is set in xcb-proto.pc's pythondir variable.  The libxcb build
then uses that variable to look for xcbgen[3,4].

Now that seems bad to me, because it means the python version gets
hardcoded in the pkgconfig file, and when we switch to python 2.6
c_client.py will still look in the python2.5 dir, and presumably find
the .pyc files there.  Can anyone here suggest a way to fix this, either
by working around it in the packaging or as a patch that I could send
upstream?  python is very much an unknown beast to me, so hopefully
you'll have some ideas :)

Note that none of this is in the debian xcb-proto and libxcb packages
yet, but I'm looking at packaging the next version and this issue is
sort of blocking progress.

Thanks in advance,
Julien

[1] http://cgit.freedesktop.org/xcb/proto/tree/xcbgen
[2] http://cgit.freedesktop.org/xcb/libxcb/tree/src/c_client.py
[3] http://cgit.freedesktop.org/xcb/libxcb/tree/configure.ac#61
[4] http://cgit.freedesktop.org/xcb/libxcb/tree/src/Makefile.am#265


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]