Welcome to Soft32 Linux Forums!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

seeking advice for xcb-proto packaging

 
   Soft32 Home -> Linux -> Python RSS
Next:  Bug#504447: Additionnal info  
Author Message
Julien Cristau

External


Since: Jan 18, 2007
Posts: 210



(Msg. 1) Posted: Tue Nov 04, 2008 11:25 am
Post subject: seeking advice for xcb-proto packaging
Archived from groups: linux>debian>maint>python (more info?)

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 Smile

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 debian-python-REQUEST.DeleteThis@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.DeleteThis@lists.debian.org
Back to top
Login to vote
Adeodato Simó

External


Since: Jul 17, 2007
Posts: 119



(Msg. 2) Posted: Tue Nov 04, 2008 12:25 pm
Post subject: Re: seeking advice for xcb-proto packaging [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

* 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 Smile

> 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. Smile

(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? Smile

> [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 debian-python-REQUEST DeleteThis @lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster DeleteThis @lists.debian.org
Back to top
Login to vote
Julien Cristau

External


Since: Jan 18, 2007
Posts: 210



(Msg. 3) Posted: Wed Nov 12, 2008 8:27 am
Post subject: Re: seeking advice for xcb-proto packaging [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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. Smile
>
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? Smile
>
It was, thanks again!

Cheers,
Julien


--
To UNSUBSCRIBE, email to debian-python-REQUEST DeleteThis @lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster DeleteThis @lists.debian.org
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Linux rookie seeking advice on backup software - I was considering getting a laptop and installing Linux on the laptop. For those laptops that have a combo drive,..

seeking linux gateway/router/proxy/firewall advice - im sure there are people more knowledgeble then me in this area and i wanted to run this by them for a sanity check /....

[Samba] Seeking advice: ADS domain, Samba3 server locally .. - Hello, from the Samba3 docs I learnt that Samba currently cannot function as an ADS "secondary" domain contr...

[Samba] Seeking advice: Backup Exec & Samba shares - Fellow Samba-shakers, I've run into an odd problem, and I'm seeking the advice of anyone who has implemented Veritas....

[gentoo-dev] Defining the Tree: a proto-GLEP. - Continuing in the series of issues raised during the previous package manager discussions, I'd like to continue by..

[Samba] cannot generate proto.h with nawk under solaris 2... - Configure runs well. Starting make, hangs after "Building include/proto.h". Same problem seems to be under L...
       Soft32 Home -> Linux -> Python All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Categories:
 Windows
  Linux
 Mac
 PDA


[ Contact us | Terms of Service/Privacy Policy ]