mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] Added support for boost.python
@ 2016-02-10  8:52 Tobias Schmidl
  2016-02-11 11:33 ` Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Tobias Schmidl @ 2016-02-10  8:52 UTC (permalink / raw)
  To: ptxdist

This works both against python2 and python3.

Signed-off-by: Tobias Schmidl <T.Schmidl@erhardt-leimer.com>
---
 rules/boost.in   | 30 +++++++++++++++++++++++++++---
 rules/boost.make | 10 ++++++++++
 2 files changed, 37 insertions(+), 3 deletions(-)

diff --git a/rules/boost.in b/rules/boost.in
index f1ceeb0..3ed0253 100644
--- a/rules/boost.in
+++ b/rules/boost.in
@@ -245,8 +245,32 @@ config BOOST_WAVE
 
 config BOOST_PYTHON
 	bool
+
+choice
 	prompt "python"
-	depends on BROKEN
-	help
-	  boost python support (still broken)
+	default BOOST_NOPYTHON
+
+	config BOOST_NOPYTHON
+		bool
+		prompt "no python support"
+		help
+		  Select this option if you don't want to build boost.python.
+
+	config BOOST_PYTHON2
+		bool
+		prompt "python2"
+		select PYTHON
+		select BOOST_PYTHON
+		help
+		  Select this option if you want to use boost.python in combination with python2.
+
+	config BOOST_PYTHON3
+		bool
+		prompt "python3"
+		select PYTHON3
+		select BOOST_PYTHON
+		help
+		  Select this option if you want to use boost.python in combination with python3.
+endchoice
+
 endif
diff --git a/rules/boost.make b/rules/boost.make
index e9a1e33..46858d0 100644
--- a/rules/boost.make
+++ b/rules/boost.make
@@ -132,6 +132,16 @@ $(STATEDIR)/boost.prepare:
 	cd $(BOOST_DIR) && ./bootstrap.sh $(BOOST_CONF_OPT)
 	@cd $(BOOST_DIR) && \
 		echo "using gcc : $(PTXCONF_ARCH_STRING) : $(CROSS_CXX) ;" > $(BOOST_DIR)/user-config.jam
+
+ifdef PTXCONF_BOOST_PYTHON3
+	@cd $(BOOST_DIR) && \
+		echo "using python : $(PYTHON3_MAJORMINOR) : $(SYSROOT)/usr/bin/python : $(SYSROOT)/usr/include/python$(PYTHON3_MAJORMINOR)m : $(SYSROOT)/usr/lib/python$(PYTHON3_MAJORMINOR) ;" >> $(BOOST_DIR)/user-config.jam
+endif
+ifdef PTXCONF_BOOST_PYTHON2
+	@cd $(BOOST_DIR) && \
+		echo "using python : $(PYTHON_MAJORMINOR) : $(SYSROOT)/usr/bin/python : $(SYSROOT)/usr/include/python$(PYTHON_MAJORMINOR)m : $(SYSROOT)/usr/lib/python$(PYTHON_MAJORMINOR) ;" >> $(BOOST_DIR)/user-config.jam
+endif
+
 	@echo "all:"					>  $(BOOST_DIR)/Makefile
 	@echo '	@$(BOOST_JAM) $(JAM_MAKE_OPT)'		>> $(BOOST_DIR)/Makefile
 	@echo "install:"				>> $(BOOST_DIR)/Makefile
-- 
2.1.4


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ptxdist] Added support for boost.python
  2016-02-10  8:52 [ptxdist] Added support for boost.python Tobias Schmidl
@ 2016-02-11 11:33 ` Michael Olbrich
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2016-02-11 11:33 UTC (permalink / raw)
  To: ptxdist

On Wed, Feb 10, 2016 at 09:52:10AM +0100, Tobias Schmidl wrote:
> This works both against python2 and python3.

Thanks, applied.

Michael

> 
> Signed-off-by: Tobias Schmidl <T.Schmidl@erhardt-leimer.com>
> ---
>  rules/boost.in   | 30 +++++++++++++++++++++++++++---
>  rules/boost.make | 10 ++++++++++
>  2 files changed, 37 insertions(+), 3 deletions(-)
> 
> diff --git a/rules/boost.in b/rules/boost.in
> index f1ceeb0..3ed0253 100644
> --- a/rules/boost.in
> +++ b/rules/boost.in
> @@ -245,8 +245,32 @@ config BOOST_WAVE
>  
>  config BOOST_PYTHON
>  	bool
> +
> +choice
>  	prompt "python"
> -	depends on BROKEN
> -	help
> -	  boost python support (still broken)
> +	default BOOST_NOPYTHON
> +
> +	config BOOST_NOPYTHON
> +		bool
> +		prompt "no python support"
> +		help
> +		  Select this option if you don't want to build boost.python.
> +
> +	config BOOST_PYTHON2
> +		bool
> +		prompt "python2"
> +		select PYTHON
> +		select BOOST_PYTHON
> +		help
> +		  Select this option if you want to use boost.python in combination with python2.
> +
> +	config BOOST_PYTHON3
> +		bool
> +		prompt "python3"
> +		select PYTHON3
> +		select BOOST_PYTHON
> +		help
> +		  Select this option if you want to use boost.python in combination with python3.
> +endchoice
> +
>  endif
> diff --git a/rules/boost.make b/rules/boost.make
> index e9a1e33..46858d0 100644
> --- a/rules/boost.make
> +++ b/rules/boost.make
> @@ -132,6 +132,16 @@ $(STATEDIR)/boost.prepare:
>  	cd $(BOOST_DIR) && ./bootstrap.sh $(BOOST_CONF_OPT)
>  	@cd $(BOOST_DIR) && \
>  		echo "using gcc : $(PTXCONF_ARCH_STRING) : $(CROSS_CXX) ;" > $(BOOST_DIR)/user-config.jam
> +
> +ifdef PTXCONF_BOOST_PYTHON3
> +	@cd $(BOOST_DIR) && \
> +		echo "using python : $(PYTHON3_MAJORMINOR) : $(SYSROOT)/usr/bin/python : $(SYSROOT)/usr/include/python$(PYTHON3_MAJORMINOR)m : $(SYSROOT)/usr/lib/python$(PYTHON3_MAJORMINOR) ;" >> $(BOOST_DIR)/user-config.jam
> +endif
> +ifdef PTXCONF_BOOST_PYTHON2
> +	@cd $(BOOST_DIR) && \
> +		echo "using python : $(PYTHON_MAJORMINOR) : $(SYSROOT)/usr/bin/python : $(SYSROOT)/usr/include/python$(PYTHON_MAJORMINOR)m : $(SYSROOT)/usr/lib/python$(PYTHON_MAJORMINOR) ;" >> $(BOOST_DIR)/user-config.jam
> +endif
> +
>  	@echo "all:"					>  $(BOOST_DIR)/Makefile
>  	@echo '	@$(BOOST_JAM) $(JAM_MAKE_OPT)'		>> $(BOOST_DIR)/Makefile
>  	@echo "install:"				>> $(BOOST_DIR)/Makefile
> -- 
> 2.1.4
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-11 11:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-10  8:52 [ptxdist] Added support for boost.python Tobias Schmidl
2016-02-11 11:33 ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox