diff mbox

[v2,1/2] python-numpy: introduce ARCH_SUPPORTS hidden variable

Message ID 1441285996-29463-1-git-send-email-gwenj@trabucayre.com
State Superseded
Headers show

Commit Message

Gwenhael Goavec-Merou Sept. 3, 2015, 1:13 p.m. UTC
From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>

Python-numpy has specific constraints about uClibc and arch. This patch add an
BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS hidden variable to avoid duplicate
dependencies test for others packages which uses numpy.

Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
---
 package/python-numpy/Config.in | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

Comments

Gwenhael Goavec-Merou Oct. 4, 2015, 10:42 a.m. UTC | #1
Up?
Gwen

On Thu,  3 Sep 2015 15:13:15 +0200
Gwenhael Goavec-Merou <gwenj@trabucayre.com> wrote:

> From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
> 
> Python-numpy has specific constraints about uClibc and arch. This
> patch add an BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS hidden variable
> to avoid duplicate dependencies test for others packages which uses
> numpy.
> 
> Signed-off-by: Gwenhael Goavec-Merou
> <gwenhael.goavec-merou@trabucayre.com> ---
>  package/python-numpy/Config.in | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/package/python-numpy/Config.in
> b/package/python-numpy/Config.in index 1f9938a..4c02ea6 100644
> --- a/package/python-numpy/Config.in
> +++ b/package/python-numpy/Config.in
> @@ -1,12 +1,16 @@
> +config BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS
> +	bool
> +	# numpy needs fenv.h. Available for all architectures in
> +	# glibc, but only for x86 and x86-64 in uClibc.
> +	depends on !BR2_TOOLCHAIN_USES_UCLIBC || BR2_i386 ||
> BR2_x86_64 +
>  config BR2_PACKAGE_PYTHON_NUMPY
>  	bool "python-numpy"
>  	# Numpy has some CPU specific code
>  	depends on BR2_aarch64 || BR2_arm || BR2_armeb || BR2_i386 \
>  		|| BR2_mips || BR2_mipsel || BR2_powerpc ||
> BR2_powerpc64 \ || BR2_sh || BR2_x86_64
> -	# numpy needs fenv.h. Available for all architectures in
> -	# glibc, but only for x86 and x86-64 in uClibc.
> -	depends on !BR2_TOOLCHAIN_USES_UCLIBC || BR2_i386 ||
> BR2_x86_64
> +	depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS
>  	help
>  	  NumPy is the fundamental package for scientific computing
>  	  with Python.
> -- 
> 2.4.6
> 
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
Arnout Vandecappelle Oct. 4, 2015, 1:42 p.m. UTC | #2
On 03-09-15 14:13, Gwenhael Goavec-Merou wrote:
> From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
> 
> Python-numpy has specific constraints about uClibc and arch. This patch add an
> BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS hidden variable to avoid duplicate
> dependencies test for others packages which uses numpy.
> 
> Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
> ---
>  package/python-numpy/Config.in | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/package/python-numpy/Config.in b/package/python-numpy/Config.in
> index 1f9938a..4c02ea6 100644
> --- a/package/python-numpy/Config.in
> +++ b/package/python-numpy/Config.in
> @@ -1,12 +1,16 @@
> +config BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS
> +	bool
> +	# numpy needs fenv.h. Available for all architectures in
> +	# glibc, but only for x86 and x86-64 in uClibc.
> +	depends on !BR2_TOOLCHAIN_USES_UCLIBC || BR2_i386 || BR2_x86_64
> +
>  config BR2_PACKAGE_PYTHON_NUMPY
>  	bool "python-numpy"
>  	# Numpy has some CPU specific code
>  	depends on BR2_aarch64 || BR2_arm || BR2_armeb || BR2_i386 \
>  		|| BR2_mips || BR2_mipsel || BR2_powerpc || BR2_powerpc64 \
>  		|| BR2_sh || BR2_x86_64

 You should also move this dependency to NUMPY_ARCH_SUPPORTS.

> -	# numpy needs fenv.h. Available for all architectures in
> -	# glibc, but only for x86 and x86-64 in uClibc.
> -	depends on !BR2_TOOLCHAIN_USES_UCLIBC || BR2_i386 || BR2_x86_64

 Turns out that this is actually not needed - patch will follow. So wait a bit
before respinning and respin it based on my patch.

> +	depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS
>  	help
>  	  NumPy is the fundamental package for scientific computing
>  	  with Python.
> 


 You should also update the reverse dependencies of python-numpy (opencv3) with
this new symbol.


 Regards,
 Arnout
diff mbox

Patch

diff --git a/package/python-numpy/Config.in b/package/python-numpy/Config.in
index 1f9938a..4c02ea6 100644
--- a/package/python-numpy/Config.in
+++ b/package/python-numpy/Config.in
@@ -1,12 +1,16 @@ 
+config BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS
+	bool
+	# numpy needs fenv.h. Available for all architectures in
+	# glibc, but only for x86 and x86-64 in uClibc.
+	depends on !BR2_TOOLCHAIN_USES_UCLIBC || BR2_i386 || BR2_x86_64
+
 config BR2_PACKAGE_PYTHON_NUMPY
 	bool "python-numpy"
 	# Numpy has some CPU specific code
 	depends on BR2_aarch64 || BR2_arm || BR2_armeb || BR2_i386 \
 		|| BR2_mips || BR2_mipsel || BR2_powerpc || BR2_powerpc64 \
 		|| BR2_sh || BR2_x86_64
-	# numpy needs fenv.h. Available for all architectures in
-	# glibc, but only for x86 and x86-64 in uClibc.
-	depends on !BR2_TOOLCHAIN_USES_UCLIBC || BR2_i386 || BR2_x86_64
+	depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS
 	help
 	  NumPy is the fundamental package for scientific computing
 	  with Python.