All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <peter@korsgaard.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH next 3/3] dbus-python: add python3 support
Date: Thu, 20 Nov 2014 14:53:31 +0100	[thread overview]
Message-ID: <1416491611-19815-4-git-send-email-peter@korsgaard.com> (raw)
In-Reply-To: <1416491611-19815-1-git-send-email-peter@korsgaard.com>

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 package/dbus-python/Config.in      |  5 +++--
 package/dbus-python/dbus-python.mk | 17 ++++++++++++++---
 2 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/package/dbus-python/Config.in b/package/dbus-python/Config.in
index a38d277..4b302ef 100644
--- a/package/dbus-python/Config.in
+++ b/package/dbus-python/Config.in
@@ -3,10 +3,11 @@ config BR2_PACKAGE_DBUS_PYTHON
 	depends on BR2_USE_WCHAR # glib2
 	depends on BR2_TOOLCHAIN_HAS_THREADS # glib2
 	depends on BR2_PACKAGE_DBUS
-	depends on BR2_PACKAGE_PYTHON
+	depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3
 	select BR2_PACKAGE_DBUS_GLIB
 	# pyexpat: runtime dependency only
-	select BR2_PACKAGE_PYTHON_PYEXPAT
+	select BR2_PACKAGE_PYTHON_PYEXPAT if BR2_PACKAGE_PYTHON
+	select BR2_PACKAGE_PYTHON3_PYEXPAT if BR2_PACKAGE_PYTHON3
 	help
 	  Python bindings for D-Bus
 
diff --git a/package/dbus-python/dbus-python.mk b/package/dbus-python/dbus-python.mk
index bc57689..1637406 100644
--- a/package/dbus-python/dbus-python.mk
+++ b/package/dbus-python/dbus-python.mk
@@ -9,14 +9,25 @@ DBUS_PYTHON_SITE = http://dbus.freedesktop.org/releases/dbus-python
 DBUS_PYTHON_INSTALL_STAGING = YES
 DBUS_PYTHON_LICENSE = MIT
 DBUS_PYTHON_LICENSE_FILES = COPYING
+DBUS_PYTHON_DEPENDENCIES = dbus-glib
+DBUS_PYTHON_CONF_OPTS = --disable-html-docs --disable-api-docs
+
+ifeq ($(BR2_PACKAGE_PYTHON),y)
+DBUS_PYTHON_DEPENDENCIES += python host-python
 
-DBUS_PYTHON_CONF_ENV = \
+DBUS_PYTHON_CONF_ENV += \
 	PYTHON=$(HOST_DIR)/usr/bin/python2 \
 	PYTHON_INCLUDES="$(shell $(STAGING_DIR)/usr/bin/python2-config --includes)" \
 	PYTHON_LIBS="$(shell $(STAGING_DIR)/usr/bin/python2-config --ldflags)"
+else
+DBUS_PYTHON_DEPENDENCIES += python3 host-python3
+
+DBUS_PYTHON_CONF_ENV += \
+	PYTHON=$(HOST_DIR)/usr/bin/python3 \
+	PYTHON_INCLUDES="$(shell $(STAGING_DIR)/usr/bin/python3-config --includes)" \
+	PYTHON_LIBS="$(shell $(STAGING_DIR)/usr/bin/python3-config --ldflags)"
+endif
 
-DBUS_PYTHON_CONF_OPTS = --disable-html-docs --disable-api-docs
 
-DBUS_PYTHON_DEPENDENCIES = dbus-glib python host-python
 
 $(eval $(autotools-package))
-- 
2.1.3

  parent reply	other threads:[~2014-11-20 13:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-20 13:53 [Buildroot] [PATCH next 0/3] dbus-python cleanup and python3 support Peter Korsgaard
2014-11-20 13:53 ` [Buildroot] [PATCH next 1/3] dbus-python: cleanup package Peter Korsgaard
2014-11-20 13:53 ` [Buildroot] [PATCH next 2/3] python3: add patch to fix --includes / --ldflags output of python3-config Peter Korsgaard
2014-11-20 13:53 ` Peter Korsgaard [this message]
2014-11-22 18:24 ` [Buildroot] [PATCH next 0/3] dbus-python cleanup and python3 support Thomas Petazzoni
2014-11-22 18:37   ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1416491611-19815-4-git-send-email-peter@korsgaard.com \
    --to=peter@korsgaard.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.