Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2] package/python-matplotlib: add QT5 support
@ 2020-07-27 13:00 Gwenhael Goavec-Merou
  2020-07-27 14:57 ` Yann E. MORIN
  0 siblings, 1 reply; 2+ messages in thread
From: Gwenhael Goavec-Merou @ 2020-07-27 13:00 UTC (permalink / raw)
  To: buildroot

From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>

python-matplotlib may be used in qt5 application. This patch add option to
enable qt5. Since this backend is automatically enabled when pyqt5 is detected,
list dependencies is simply an updated (no enable/disable options).

Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
---
Changes v1 -> v2
- move options before comment (Thomas)
- remove select BR2_PACKAGE_QT5BASE_GUI (already done by python-pyqt5) (Thomas)
- suppress qt5base to PYTHON_MATPLOTLIB_DEPENDENCIES (Thomas)
---
 package/python-matplotlib/Config.in            | 12 ++++++++++++
 package/python-matplotlib/python-matplotlib.mk |  4 ++++
 2 files changed, 16 insertions(+)

diff --git a/package/python-matplotlib/Config.in b/package/python-matplotlib/Config.in
index e6ed8cda2f..cfa0bc30c3 100644
--- a/package/python-matplotlib/Config.in
+++ b/package/python-matplotlib/Config.in
@@ -23,6 +23,18 @@ config BR2_PACKAGE_PYTHON_MATPLOTLIB
 
 	  https://matplotlib.org/
 
+if BR2_PACKAGE_PYTHON_MATPLOTLIB
+
+config BR2_PACKAGE_PYTHON_MATPLOTLIB_QT
+	bool "qt display"
+	depends on BR2_PACKAGE_QT5 # python-pyqt5
+	select BR2_PACKAGE_PYTHON_PYQT5
+	select BR2_PACKAGE_QT5BASE
+	select BR2_PACKAGE_QT5BASE_FONTCONFIG
+	select BR2_PACKAGE_QT5BASE_WIDGETS
+
+endif
+
 comment "python-matplotlib needs a toolchain w/ C++"
 	depends on !BR2_INSTALL_LIBSTDCPP
 
diff --git a/package/python-matplotlib/python-matplotlib.mk b/package/python-matplotlib/python-matplotlib.mk
index 7082637d09..8d00ac8a07 100644
--- a/package/python-matplotlib/python-matplotlib.mk
+++ b/package/python-matplotlib/python-matplotlib.mk
@@ -13,4 +13,8 @@ PYTHON_MATPLOTLIB_DEPENDENCIES = host-pkgconf freetype host-python-numpy \
 	libpng python-cycler
 PYTHON_MATPLOTLIB_SETUP_TYPE = setuptools
 
+ifeq ($(BR2_PACKAGE_PYTHON_MATPLOTLIB_QT),y)
+PYTHON_MATPLOTLIB_DEPENDENCIES += python-pyqt5
+endif
+
 $(eval $(python-package))
-- 
2.20.1

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

* [Buildroot] [PATCH v2] package/python-matplotlib: add QT5 support
  2020-07-27 13:00 [Buildroot] [PATCH v2] package/python-matplotlib: add QT5 support Gwenhael Goavec-Merou
@ 2020-07-27 14:57 ` Yann E. MORIN
  0 siblings, 0 replies; 2+ messages in thread
From: Yann E. MORIN @ 2020-07-27 14:57 UTC (permalink / raw)
  To: buildroot

Gwenhael, All,

On 2020-07-27 15:00 +0200, Gwenhael Goavec-Merou spake thusly:
> From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
> 
> python-matplotlib may be used in qt5 application. This patch add option to
> enable qt5. Since this backend is automatically enabled when pyqt5 is detected,
> list dependencies is simply an updated (no enable/disable options).
> 
> Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
> ---
> Changes v1 -> v2
> - move options before comment (Thomas)
> - remove select BR2_PACKAGE_QT5BASE_GUI (already done by python-pyqt5) (Thomas)

I find it very annoying that we rely on another package to guarantee the
dependencies. Maybe it is redundant now, but what if pytqt5 drops the
GUI dependency in a future version?

Anyway, applied to master, thanks.

Regards,
Yann E. MORIN.

> - suppress qt5base to PYTHON_MATPLOTLIB_DEPENDENCIES (Thomas)
> ---
>  package/python-matplotlib/Config.in            | 12 ++++++++++++
>  package/python-matplotlib/python-matplotlib.mk |  4 ++++
>  2 files changed, 16 insertions(+)
> 
> diff --git a/package/python-matplotlib/Config.in b/package/python-matplotlib/Config.in
> index e6ed8cda2f..cfa0bc30c3 100644
> --- a/package/python-matplotlib/Config.in
> +++ b/package/python-matplotlib/Config.in
> @@ -23,6 +23,18 @@ config BR2_PACKAGE_PYTHON_MATPLOTLIB
>  
>  	  https://matplotlib.org/
>  
> +if BR2_PACKAGE_PYTHON_MATPLOTLIB
> +
> +config BR2_PACKAGE_PYTHON_MATPLOTLIB_QT
> +	bool "qt display"
> +	depends on BR2_PACKAGE_QT5 # python-pyqt5
> +	select BR2_PACKAGE_PYTHON_PYQT5
> +	select BR2_PACKAGE_QT5BASE
> +	select BR2_PACKAGE_QT5BASE_FONTCONFIG
> +	select BR2_PACKAGE_QT5BASE_WIDGETS
> +
> +endif
> +
>  comment "python-matplotlib needs a toolchain w/ C++"
>  	depends on !BR2_INSTALL_LIBSTDCPP
>  
> diff --git a/package/python-matplotlib/python-matplotlib.mk b/package/python-matplotlib/python-matplotlib.mk
> index 7082637d09..8d00ac8a07 100644
> --- a/package/python-matplotlib/python-matplotlib.mk
> +++ b/package/python-matplotlib/python-matplotlib.mk
> @@ -13,4 +13,8 @@ PYTHON_MATPLOTLIB_DEPENDENCIES = host-pkgconf freetype host-python-numpy \
>  	libpng python-cycler
>  PYTHON_MATPLOTLIB_SETUP_TYPE = setuptools
>  
> +ifeq ($(BR2_PACKAGE_PYTHON_MATPLOTLIB_QT),y)
> +PYTHON_MATPLOTLIB_DEPENDENCIES += python-pyqt5
> +endif
> +
>  $(eval $(python-package))
> -- 
> 2.20.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

end of thread, other threads:[~2020-07-27 14:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-27 13:00 [Buildroot] [PATCH v2] package/python-matplotlib: add QT5 support Gwenhael Goavec-Merou
2020-07-27 14:57 ` Yann E. MORIN

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