* [Buildroot] [git commit master] libxcb: fix path to Python modules
@ 2010-05-07 22:11 Thomas Petazzoni
2010-05-10 12:33 ` Paulius Zaleckas
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2010-05-07 22:11 UTC (permalink / raw)
To: buildroot
commit: http://git.buildroot.net/buildroot/commit/?id=4880edd506a2c629efa4ccf38f27f47d5d5d8804
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master
When building libxcb, the variable XCBPROTO_XCBPYTHONDIR must point to
the location where the Python modules needed to run the c_client.py
program are installed. The path
$(STAGING_DIR)/usr/lib/python2.6/site-packages was hardcoded. However,
it doesn't work when the version of Python installed on the host is
Python 2.5.
Therefore, add a little bit of magic to compute the host Python
version.
We also verify that Python is available on the host, as we don't build
it in Buildroot.
Fixes bug #1531.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/x11r7/libxcb/libxcb.mk | 3 ++-
toolchain/dependencies/dependencies.sh | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/package/x11r7/libxcb/libxcb.mk b/package/x11r7/libxcb/libxcb.mk
index ec9843e..c8b70ea 100644
--- a/package/x11r7/libxcb/libxcb.mk
+++ b/package/x11r7/libxcb/libxcb.mk
@@ -13,7 +13,8 @@ LIBXCB_AUTORECONF = NO
LIBXCB_LIBTOOL_PATCH = NO
LIBXCB_DEPENDENCIES = host-libxslt pthread-stubs xcb-proto xlib_libXdmcp xlib_libXau
LIBXCB_CONF_ENV = STAGING_DIR="$(STAGING_DIR)"
-LIBXCB_MAKE_OPT = XCBPROTO_XCBINCLUDEDIR=$(STAGING_DIR)/usr/share/xcb XCBPROTO_XCBPYTHONDIR=$(STAGING_DIR)/usr/lib/python2.6/site-packages
+HOST_PYTHON_VERSION=$(shell python --version 2>&1 | sed 's/Python \(2\.[0-9]\)\..*/\1/')
+LIBXCB_MAKE_OPT = XCBPROTO_XCBINCLUDEDIR=$(STAGING_DIR)/usr/share/xcb XCBPROTO_XCBPYTHONDIR=$(STAGING_DIR)/usr/lib/python$(HOST_PYTHON_VERSION)/site-packages
$(eval $(call AUTOTARGETS,package/x11r7,libxcb))
diff --git a/toolchain/dependencies/dependencies.sh b/toolchain/dependencies/dependencies.sh
index 013c1d5..923c76b 100755
--- a/toolchain/dependencies/dependencies.sh
+++ b/toolchain/dependencies/dependencies.sh
@@ -122,7 +122,7 @@ if ! $SHELL --version 2>&1 | grep -q '^GNU bash'; then
fi;
# Check that a few mandatory programs are installed
-for prog in awk bison flex msgfmt makeinfo patch gzip bzip2 perl tar wget cpio ; do
+for prog in awk bison flex msgfmt makeinfo patch gzip bzip2 perl tar wget cpio python ; do
if ! which $prog > /dev/null ; then
/bin/echo -e "\nYou must install '$prog' on your build machine";
if test $prog = "makeinfo" ; then
--
1.6.3.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [git commit master] libxcb: fix path to Python modules
2010-05-07 22:11 [Buildroot] [git commit master] libxcb: fix path to Python modules Thomas Petazzoni
@ 2010-05-10 12:33 ` Paulius Zaleckas
2010-05-10 20:20 ` Peter Korsgaard
0 siblings, 1 reply; 3+ messages in thread
From: Paulius Zaleckas @ 2010-05-10 12:33 UTC (permalink / raw)
To: buildroot
On Sat, May 8, 2010 at 1:11 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
>
> commit: http://git.buildroot.net/buildroot/commit/?id=4880edd506a2c629efa4ccf38f27f47d5d5d8804
> branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master
>
> When building libxcb, the variable XCBPROTO_XCBPYTHONDIR must point to
> the location where the Python modules needed to run the c_client.py
> program are installed. The path
> $(STAGING_DIR)/usr/lib/python2.6/site-packages was hardcoded. However,
> it doesn't work when the version of Python installed on the host is
> Python 2.5.
>
> Therefore, add a little bit of magic to compute the host Python
> version.
Unfortunately this fails on my system:
$ python --version
Python 2.6
$ python --version | sed 's/Python \(2\.[0-9]\)\..*/\1/'
Python 2.6
> We also verify that Python is available on the host, as we don't build
> it in Buildroot.
>
> Fixes bug #1531.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [git commit master] libxcb: fix path to Python modules
2010-05-10 12:33 ` Paulius Zaleckas
@ 2010-05-10 20:20 ` Peter Korsgaard
0 siblings, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2010-05-10 20:20 UTC (permalink / raw)
To: buildroot
>>>>> "Paulius" == Paulius Zaleckas <paulius.zaleckas@gmail.com> writes:
>> Therefore, add a little bit of magic to compute the host Python
>> version.
Paulius> Unfortunately this fails on my system:
Paulius> $ python --version
Paulius> Python 2.6
Paulius> $ python --version | sed 's/Python \(2\.[0-9]\)\..*/\1/'
Paulius> Python 2.6
Ahh, then we better do 's/Python \(2\.[^\.]\).*/\1/' instead, or even
better:
's/Python \([0-9]\.[^\.]\).*/\1/'
Will fix.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-05-10 20:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-07 22:11 [Buildroot] [git commit master] libxcb: fix path to Python modules Thomas Petazzoni
2010-05-10 12:33 ` Paulius Zaleckas
2010-05-10 20:20 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox