mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH 2/2] Improved support for boost.python
@ 2016-01-26 13:22 Tobias Schmidl
  2016-02-01 13:45 ` Michael Olbrich
  2016-02-10  8:51 ` [ptxdist] Antwort: " Tobias Schmidl
  0 siblings, 2 replies; 3+ messages in thread
From: Tobias Schmidl @ 2016-01-26 13:22 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   |  4 ++--
 rules/boost.make | 15 ++++++++++++++-
 2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/rules/boost.in b/rules/boost.in
index f1ceeb0..ded0317 100644
--- a/rules/boost.in
+++ b/rules/boost.in
@@ -246,7 +246,7 @@ config BOOST_WAVE
 config BOOST_PYTHON
 	bool
 	prompt "python"
-	depends on BROKEN
+	depends on PYTHON || PYTHON3
 	help
-	  boost python support (still broken)
+	  boost python support
 endif
diff --git a/rules/boost.make b/rules/boost.make
index a1c4d17..3bc3efb 100644
--- a/rules/boost.make
+++ b/rules/boost.make
@@ -131,8 +131,20 @@ BOOST_CONF_OPT	:= \
 $(STATEDIR)/boost.prepare:
 	@$(call targetinfo)
 	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_PYTHON
+ifdef PTXCONF_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
+else
+	@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
+endif
+
 	@echo "all:"					>  $(BOOST_DIR)/Makefile
 	@echo '	@$(BOOST_JAM) $(JAM_MAKE_OPT)'		>> $(BOOST_DIR)/Makefile
 	@echo "install:"				>> $(BOOST_DIR)/Makefile
@@ -156,7 +168,7 @@ $(STATEDIR)/boost.targetinstall:
 
 	@$(call install_init, boost)
 	@$(call install_fixup, boost,PRIORITY,optional)
-	@$(call install_fixup, boost,SECTION,base)
+	@$(call install_fixup, boost,SECTION,system_libraries)
 	@$(call install_fixup, boost,AUTHOR,"Robert Schwebel <r.schwebel@pengutronix.de>")
 	@$(call install_fixup, boost,DESCRIPTION,missing)
 
@@ -211,4 +223,5 @@ $(STATEDIR)/boost.targetinstall:
 
 	@$(call touch)
 
+# kate: syntax Makefile
 # vim: syntax=make
-- 
2.1.4


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] [PATCH 2/2] Improved support for boost.python
  2016-01-26 13:22 [ptxdist] [PATCH 2/2] Improved support for boost.python Tobias Schmidl
@ 2016-02-01 13:45 ` Michael Olbrich
  2016-02-10  8:51 ` [ptxdist] Antwort: " Tobias Schmidl
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Olbrich @ 2016-02-01 13:45 UTC (permalink / raw)
  To: ptxdist

On Tue, Jan 26, 2016 at 02:22:19PM +0100, Tobias Schmidl wrote:
> This works both against python2 and python3.
> 
> Signed-off-by: Tobias Schmidl <T.Schmidl@erhardt-leimer.com>
> ---
>  rules/boost.in   |  4 ++--
>  rules/boost.make | 15 ++++++++++++++-
>  2 files changed, 16 insertions(+), 3 deletions(-)
> 
> diff --git a/rules/boost.in b/rules/boost.in
> index f1ceeb0..ded0317 100644
> --- a/rules/boost.in
> +++ b/rules/boost.in
> @@ -246,7 +246,7 @@ config BOOST_WAVE
>  config BOOST_PYTHON
>  	bool
>  	prompt "python"
> -	depends on BROKEN
> +	depends on PYTHON || PYTHON3

This wont work. You need a choice here with BOOST_NOPYTHON / BOOST_PYTHON /
BOOST_PYTHON3 and then 'select' the correct python version in the toplevel
option. If there is no build-time dependency then use

	select PTYHON3	if RUNTIME

>  	help
> -	  boost python support (still broken)
> +	  boost python support
>  endif
> diff --git a/rules/boost.make b/rules/boost.make
> index a1c4d17..3bc3efb 100644
> --- a/rules/boost.make
> +++ b/rules/boost.make
> @@ -131,8 +131,20 @@ BOOST_CONF_OPT	:= \
>  $(STATEDIR)/boost.prepare:
>  	@$(call targetinfo)
>  	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_PYTHON
> +ifdef PTXCONF_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
> +else
> +	@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
> +endif

modify this accordingly to use BOOST_PYTHON / BOOST_PYTHON3

> +
>  	@echo "all:"					>  $(BOOST_DIR)/Makefile
>  	@echo '	@$(BOOST_JAM) $(JAM_MAKE_OPT)'		>> $(BOOST_DIR)/Makefile
>  	@echo "install:"				>> $(BOOST_DIR)/Makefile
> @@ -156,7 +168,7 @@ $(STATEDIR)/boost.targetinstall:
>  
>  	@$(call install_init, boost)
>  	@$(call install_fixup, boost,PRIORITY,optional)
> -	@$(call install_fixup, boost,SECTION,base)
> +	@$(call install_fixup, boost,SECTION,system_libraries)

Don't change this. All packages are currently in 'base'.

>  	@$(call install_fixup, boost,AUTHOR,"Robert Schwebel <r.schwebel@pengutronix.de>")
>  	@$(call install_fixup, boost,DESCRIPTION,missing)
>  
> @@ -211,4 +223,5 @@ $(STATEDIR)/boost.targetinstall:
>  
>  	@$(call touch)
>  
> +# kate: syntax Makefile

remove.

Michael

>  # vim: syntax=make
> -- 
> 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] 3+ messages in thread

* [ptxdist] Antwort: Re: [PATCH 2/2] Improved support for boost.python
  2016-01-26 13:22 [ptxdist] [PATCH 2/2] Improved support for boost.python Tobias Schmidl
  2016-02-01 13:45 ` Michael Olbrich
@ 2016-02-10  8:51 ` Tobias Schmidl
  1 sibling, 0 replies; 3+ messages in thread
From: Tobias Schmidl @ 2016-02-10  8:51 UTC (permalink / raw)
  To: ptxdist

Hello all,


-----"ptxdist" <ptxdist-bounces@pengutronix.de> schrieb: -----
>> On Tue, Jan 26, 2016 at 02:22:19PM +0100, Tobias Schmidl wrote:
>> This works both against python2 and python3.
>> 
> This wont work. You need a choice here with BOOST_NOPYTHON / BOOST_PYTHON /
> BOOST_PYTHON3 and then 'select' the correct python version in the toplevel
> option. If there is no build-time dependency then use
> 
> 	select PTYHON3	if RUNTIME
> 

thanks, will resubmit.

Best regards,

Tobias


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

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

end of thread, other threads:[~2016-02-10  8:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-26 13:22 [ptxdist] [PATCH 2/2] Improved support for boost.python Tobias Schmidl
2016-02-01 13:45 ` Michael Olbrich
2016-02-10  8:51 ` [ptxdist] Antwort: " Tobias Schmidl

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