* [Buildroot] [PATCH 0/2] matplotlib for python 2d graphics
@ 2019-05-09 15:58 Jugurtha BELKALEM
2019-05-09 15:58 ` [Buildroot] [PATCH 1/2] package/python-cycler: new package Jugurtha BELKALEM
2019-05-09 15:58 ` [Buildroot] [PATCH 2/2] package/python-matplotlib: " Jugurtha BELKALEM
0 siblings, 2 replies; 6+ messages in thread
From: Jugurtha BELKALEM @ 2019-05-09 15:58 UTC (permalink / raw)
To: buildroot
This library allows to have 2D data visualization
in python.
This library requires Python>=3.5.
Jugurtha BELKALEM (2):
package/python-cycler: new package
package/python-matplotlib: new package
DEVELOPERS | 4 +++
package/Config.in | 2 ++
package/python-cycler/Config.in | 8 ++++++
package/python-cycler/python-cycler.hash | 4 +++
package/python-cycler/python-cycler.mk | 14 +++++++++++
.../0001-Fix-invalid-inclusion-headers.patch | 29 ++++++++++++++++++++++
package/python-matplotlib/Config.in | 22 ++++++++++++++++
package/python-matplotlib/python-matplotlib.hash | 4 +++
package/python-matplotlib/python-matplotlib.mk | 16 ++++++++++++
9 files changed, 103 insertions(+)
create mode 100644 package/python-cycler/Config.in
create mode 100644 package/python-cycler/python-cycler.hash
create mode 100644 package/python-cycler/python-cycler.mk
create mode 100644 package/python-matplotlib/0001-Fix-invalid-inclusion-headers.patch
create mode 100644 package/python-matplotlib/Config.in
create mode 100644 package/python-matplotlib/python-matplotlib.hash
create mode 100644 package/python-matplotlib/python-matplotlib.mk
--
2.7.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/2] package/python-cycler: new package
2019-05-09 15:58 [Buildroot] [PATCH 0/2] matplotlib for python 2d graphics Jugurtha BELKALEM
@ 2019-05-09 15:58 ` Jugurtha BELKALEM
2019-05-20 9:37 ` Peter Korsgaard
2019-05-09 15:58 ` [Buildroot] [PATCH 2/2] package/python-matplotlib: " Jugurtha BELKALEM
1 sibling, 1 reply; 6+ messages in thread
From: Jugurtha BELKALEM @ 2019-05-09 15:58 UTC (permalink / raw)
To: buildroot
Creates a Cycler object much like cycler, but
includes input validation.
This package is required by matplotlib.
Signed-off-by: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
---
DEVELOPERS | 3 +++
package/Config.in | 1 +
package/python-cycler/Config.in | 8 ++++++++
package/python-cycler/python-cycler.hash | 4 ++++
package/python-cycler/python-cycler.mk | 14 ++++++++++++++
5 files changed, 30 insertions(+)
create mode 100644 package/python-cycler/Config.in
create mode 100644 package/python-cycler/python-cycler.hash
create mode 100644 package/python-cycler/python-cycler.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index 5bfc456..4bb18fb 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1227,6 +1227,9 @@ F: package/python-xlib/
N: Joshua Henderson <joshua.henderson@microchip.com>
F: package/qt5/qt5wayland/
+N: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
+F: package/python-cycler/
+
N: Juha Rantanen <juha@codercoded.com>
F: package/acsccid/
diff --git a/package/Config.in b/package/Config.in
index f592e74..80622b5 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -859,6 +859,7 @@ menu "External python modules"
source "package/python-cryptography/Config.in"
source "package/python-cssselect/Config.in"
source "package/python-cssutils/Config.in"
+ source "package/python-cycler/Config.in"
source "package/python-daemon/Config.in"
source "package/python-daemonize/Config.in"
source "package/python-dataproperty/Config.in"
diff --git a/package/python-cycler/Config.in b/package/python-cycler/Config.in
new file mode 100644
index 0000000..854873c
--- /dev/null
+++ b/package/python-cycler/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_PYTHON_CYCLER
+ bool "python-cycler"
+ depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3
+ help
+ Creates a Cycler objects much like cycler, but
+ includes input validation.
+
+ https://matplotlib.org/cycler/
diff --git a/package/python-cycler/python-cycler.hash b/package/python-cycler/python-cycler.hash
new file mode 100644
index 0000000..8255458
--- /dev/null
+++ b/package/python-cycler/python-cycler.hash
@@ -0,0 +1,4 @@
+# sha256 from https://pypi.org/project/cyclic/#files
+sha256 cd7b2d1018258d7247a71425e9f26463dfb444d411c39569972f4ce586b0c9d8 cycler-0.10.0.tar.gz
+# Locally computed sha256 checksums
+sha256 f1218143d766da3fea66f13396b7f15df46a83303f29bf96ba6e98eb4d42f408 LICENSE
diff --git a/package/python-cycler/python-cycler.mk b/package/python-cycler/python-cycler.mk
new file mode 100644
index 0000000..4f1f401
--- /dev/null
+++ b/package/python-cycler/python-cycler.mk
@@ -0,0 +1,14 @@
+################################################################################
+#
+# python-cycler
+#
+################################################################################
+
+PYTHON_CYCLER_VERSION = 0.10.0
+PYTHON_CYCLER_SOURCE = cycler-$(PYTHON_CYCLER_VERSION).tar.gz
+PYTHON_CYCLER_SITE = https://files.pythonhosted.org/packages/c2/4b/137dea450d6e1e3d474e1d873cd1d4f7d3beed7e0dc973b06e8e10d32488
+PYTHON_CYCLER_LICENSE = BSD
+PYTHON_CYCLER_LICENSE_FILES = LICENSE
+PYTHON_CYCLER_SETUP_TYPE = setuptools
+
+$(eval $(python-package))
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 2/2] package/python-matplotlib: new package
2019-05-09 15:58 [Buildroot] [PATCH 0/2] matplotlib for python 2d graphics Jugurtha BELKALEM
2019-05-09 15:58 ` [Buildroot] [PATCH 1/2] package/python-cycler: new package Jugurtha BELKALEM
@ 2019-05-09 15:58 ` Jugurtha BELKALEM
2019-05-20 9:55 ` Peter Korsgaard
2019-06-01 13:04 ` Thomas Petazzoni
1 sibling, 2 replies; 6+ messages in thread
From: Jugurtha BELKALEM @ 2019-05-09 15:58 UTC (permalink / raw)
To: buildroot
Matplotlib is a Python 2D plotting library
which produces publication quality figures
in a variety of hardcopy formats and interactive
environments across platforms.
More information is available at:
https://matplotlib.org/.
Signed-off-by: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
---
DEVELOPERS | 1 +
package/Config.in | 1 +
| 29 ++++++++++++++++++++++
package/python-matplotlib/Config.in | 22 ++++++++++++++++
package/python-matplotlib/python-matplotlib.hash | 4 +++
package/python-matplotlib/python-matplotlib.mk | 16 ++++++++++++
6 files changed, 73 insertions(+)
create mode 100644 package/python-matplotlib/0001-Fix-invalid-inclusion-headers.patch
create mode 100644 package/python-matplotlib/Config.in
create mode 100644 package/python-matplotlib/python-matplotlib.hash
create mode 100644 package/python-matplotlib/python-matplotlib.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index 4bb18fb..b7f27f6 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1229,6 +1229,7 @@ F: package/qt5/qt5wayland/
N: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
F: package/python-cycler/
+F: package/python-matplotlib/
N: Juha Rantanen <juha@codercoded.com>
F: package/acsccid/
diff --git a/package/Config.in b/package/Config.in
index 80622b5..002feb9 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -932,6 +932,7 @@ menu "External python modules"
source "package/python-markdown/Config.in"
source "package/python-markdown2/Config.in"
source "package/python-markupsafe/Config.in"
+ source "package/python-matplotlib/Config.in"
source "package/python-mbstrdecoder/Config.in"
source "package/python-meld3/Config.in"
source "package/python-mimeparse/Config.in"
--git a/package/python-matplotlib/0001-Fix-invalid-inclusion-headers.patch b/package/python-matplotlib/0001-Fix-invalid-inclusion-headers.patch
new file mode 100644
index 0000000..b10bfb3
--- /dev/null
+++ b/package/python-matplotlib/0001-Fix-invalid-inclusion-headers.patch
@@ -0,0 +1,29 @@
+From b0232c3cf1051749dd1e2bd0ec7c5c0a3a008d2f Mon Sep 17 00:00:00 2001
+From: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
+Date: Thu, 9 May 2019 15:06:36 +0200
+Subject: [PATCH] Fix invalid inclusion headers
+
+By default, matplotlib includes headers from host
+machine which breaks the build process.
+
+Signed-off-by: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
+---
+ python-matplotlib-3.0.3/setupext.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setupext.py b/setupext.py
+index fc82d5d..eb978d2 100644
+--- a/setupext.py
++++ b/setupext.py
+@@ -267,7 +267,7 @@ def get_base_dirs():
+ 'gnu0': ['/usr'],
+ 'aix5': ['/usr/local'],
+ }
+- return basedir_map.get(sys.platform, ['/usr/local', '/usr'])
++ return basedir_map.get(sys.platform, [])
+
+
+ def get_include_dirs():
+--
+2.7.4
+
diff --git a/package/python-matplotlib/Config.in b/package/python-matplotlib/Config.in
new file mode 100644
index 0000000..7f775ea
--- /dev/null
+++ b/package/python-matplotlib/Config.in
@@ -0,0 +1,22 @@
+config BR2_PACKAGE_PYTHON_MATPLOTLIB
+ bool "python-matplotlib"
+ depends on !BR2_PACKAGE_PYTHON
+ depends on BR2_PACKAGE_PYTHON3
+ select BR2_PACKAGE_FREETYPE # runtime
+ select BR2_PACKAGE_LIBPNG # runtime
+ select BR2_PACKAGE_PYTHON_CYCLER
+ select BR2_PACKAGE_PYTHON_SETUPTOOLS # runtime
+ select BR2_PACKAGE_PYTHON_DATEUTIL # runtime
+ select BR2_PACKAGE_PYTHON_NUMPY # runtime
+ select BR2_PACKAGE_PYTHON_PYPARSING # runtime
+ select BR2_PACKAGE_PYTHON3_ZLIB # runtime
+ select BR2_PACKAGE_ZLIB # runtime
+ help
+ Matplotlib strives to produce publication
+ quality 2D graphics for interactive graphing,
+ scientific publishing, user interface
+ development and web application servers targeting
+ multiple user interfaces and hardcopy output
+ formats.
+
+ https://matplotlib.org/
diff --git a/package/python-matplotlib/python-matplotlib.hash b/package/python-matplotlib/python-matplotlib.hash
new file mode 100644
index 0000000..ccb22ee
--- /dev/null
+++ b/package/python-matplotlib/python-matplotlib.hash
@@ -0,0 +1,4 @@
+# sha256 from https://pypi.org/project/matplotlib/#files
+sha256 e1d33589e32f482d0a7d1957bf473d43341115d40d33f578dad44432e47df7b7 matplotlib-3.0.3.tar.gz
+# Locally computed sha256 checksums
+sha256 5a1a81ea301728c8bba2933da832c0cd62229daf20893a024ab3d53244468dbc LICENSE/LICENSE
diff --git a/package/python-matplotlib/python-matplotlib.mk b/package/python-matplotlib/python-matplotlib.mk
new file mode 100644
index 0000000..bfa42fa
--- /dev/null
+++ b/package/python-matplotlib/python-matplotlib.mk
@@ -0,0 +1,16 @@
+################################################################################
+#
+# python-matplotlib
+#
+################################################################################
+
+PYTHON_MATPLOTLIB_VERSION = 3.0.3
+PYTHON_MATPLOTLIB_SOURCE = matplotlib-$(PYTHON_MATPLOTLIB_VERSION).tar.gz
+PYTHON_MATPLOTLIB_SITE = https://files.pythonhosted.org/packages/26/04/8b381d5b166508cc258632b225adbafec49bbe69aa9a4fa1f1b461428313
+PYTHON_MATPLOTLIB_LICENSE = PSF
+PYTHON_MATPLOTLIB_LICENSE_FILES = LICENSE
+PYTHON_MATPLOTLIB_DEPENDENCIES = freetype host-python-numpy \
+ libpng python-cycler
+PYTHON_MATPLOTLIB_SETUP_TYPE = setuptools
+
+$(eval $(python-package))
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/2] package/python-cycler: new package
2019-05-09 15:58 ` [Buildroot] [PATCH 1/2] package/python-cycler: new package Jugurtha BELKALEM
@ 2019-05-20 9:37 ` Peter Korsgaard
0 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2019-05-20 9:37 UTC (permalink / raw)
To: buildroot
>>>>> "Jugurtha" == Jugurtha BELKALEM <jugurtha.belkalem@smile.fr> writes:
> Creates a Cycler object much like cycler, but
> includes input validation.
> This package is required by matplotlib.
> Signed-off-by: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
Committed to next, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 2/2] package/python-matplotlib: new package
2019-05-09 15:58 ` [Buildroot] [PATCH 2/2] package/python-matplotlib: " Jugurtha BELKALEM
@ 2019-05-20 9:55 ` Peter Korsgaard
2019-06-01 13:04 ` Thomas Petazzoni
1 sibling, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2019-05-20 9:55 UTC (permalink / raw)
To: buildroot
>>>>> "Jugurtha" == Jugurtha BELKALEM <jugurtha.belkalem@smile.fr> writes:
> Matplotlib is a Python 2D plotting library
> which produces publication quality figures
> in a variety of hardcopy formats and interactive
> environments across platforms.
> More information is available at:
> https://matplotlib.org/.
> Signed-off-by: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
> ---
> DEVELOPERS | 1 +
> package/Config.in | 1 +
> .../0001-Fix-invalid-inclusion-headers.patch | 29 ++++++++++++++++++++++
> package/python-matplotlib/Config.in | 22 ++++++++++++++++
> package/python-matplotlib/python-matplotlib.hash | 4 +++
> package/python-matplotlib/python-matplotlib.mk | 16 ++++++++++++
> 6 files changed, 73 insertions(+)
> create mode 100644 package/python-matplotlib/0001-Fix-invalid-inclusion-headers.patch
> create mode 100644 package/python-matplotlib/Config.in
> create mode 100644 package/python-matplotlib/python-matplotlib.hash
> create mode 100644 package/python-matplotlib/python-matplotlib.mk
> diff --git a/DEVELOPERS b/DEVELOPERS
> index 4bb18fb..b7f27f6 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -1229,6 +1229,7 @@ F: package/qt5/qt5wayland/
> N: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
> F: package/python-cycler/
> +F: package/python-matplotlib/
> N: Juha Rantanen <juha@codercoded.com>
> F: package/acsccid/
> diff --git a/package/Config.in b/package/Config.in
> index 80622b5..002feb9 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -932,6 +932,7 @@ menu "External python modules"
> source "package/python-markdown/Config.in"
> source "package/python-markdown2/Config.in"
> source "package/python-markupsafe/Config.in"
> + source "package/python-matplotlib/Config.in"
> source "package/python-mbstrdecoder/Config.in"
> source "package/python-meld3/Config.in"
> source "package/python-mimeparse/Config.in"
> diff --git a/package/python-matplotlib/0001-Fix-invalid-inclusion-headers.patch b/package/python-matplotlib/0001-Fix-invalid-inclusion-headers.patch
> new file mode 100644
> index 0000000..b10bfb3
> --- /dev/null
> +++ b/package/python-matplotlib/0001-Fix-invalid-inclusion-headers.patch
> @@ -0,0 +1,29 @@
> +From b0232c3cf1051749dd1e2bd0ec7c5c0a3a008d2f Mon Sep 17 00:00:00 2001
> +From: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
> +Date: Thu, 9 May 2019 15:06:36 +0200
> +Subject: [PATCH] Fix invalid inclusion headers
> +
> +By default, matplotlib includes headers from host
> +machine which breaks the build process.
> +
> +Signed-off-by: Jugurtha BELKALEM <jugurtha.belkalem@smile.fr>
> +---
> + python-matplotlib-3.0.3/setupext.py | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/setupext.py b/setupext.py
> +index fc82d5d..eb978d2 100644
> +--- a/setupext.py
> ++++ b/setupext.py
> +@@ -267,7 +267,7 @@ def get_base_dirs():
> + 'gnu0': ['/usr'],
> + 'aix5': ['/usr/local'],
> + }
> +- return basedir_map.get(sys.platform, ['/usr/local', '/usr'])
> ++ return basedir_map.get(sys.platform, [])
> +
> +
> + def get_include_dirs():
> +--
> +2.7.4
> +
> diff --git a/package/python-matplotlib/Config.in b/package/python-matplotlib/Config.in
> new file mode 100644
> index 0000000..7f775ea
> --- /dev/null
> +++ b/package/python-matplotlib/Config.in
> @@ -0,0 +1,22 @@
> +config BR2_PACKAGE_PYTHON_MATPLOTLIB
> + bool "python-matplotlib"
> + depends on !BR2_PACKAGE_PYTHON
> + depends on BR2_PACKAGE_PYTHON3
> + select BR2_PACKAGE_FREETYPE # runtime
> + select BR2_PACKAGE_LIBPNG # runtime
> + select BR2_PACKAGE_PYTHON_CYCLER
> + select BR2_PACKAGE_PYTHON_SETUPTOOLS # runtime
> + select BR2_PACKAGE_PYTHON_DATEUTIL # runtime
> + select BR2_PACKAGE_PYTHON_NUMPY # runtime
> + select BR2_PACKAGE_PYTHON_PYPARSING # runtime
> + select BR2_PACKAGE_PYTHON3_ZLIB # runtime
> + select BR2_PACKAGE_ZLIB # runtime
> + help
> + Matplotlib strives to produce publication
> + quality 2D graphics for interactive graphing,
> + scientific publishing, user interface
> + development and web application servers targeting
> + multiple user interfaces and hardcopy output
> + formats.
> +
> + https://matplotlib.org/
> diff --git a/package/python-matplotlib/python-matplotlib.hash b/package/python-matplotlib/python-matplotlib.hash
> new file mode 100644
> index 0000000..ccb22ee
> --- /dev/null
> +++ b/package/python-matplotlib/python-matplotlib.hash
> @@ -0,0 +1,4 @@
> +# sha256 from https://pypi.org/project/matplotlib/#files
> +sha256 e1d33589e32f482d0a7d1957bf473d43341115d40d33f578dad44432e47df7b7 matplotlib-3.0.3.tar.gz
> +# Locally computed sha256 checksums
> +sha256 5a1a81ea301728c8bba2933da832c0cd62229daf20893a024ab3d53244468dbc LICENSE/LICENSE
> diff --git a/package/python-matplotlib/python-matplotlib.mk b/package/python-matplotlib/python-matplotlib.mk
> new file mode 100644
> index 0000000..bfa42fa
> --- /dev/null
> +++ b/package/python-matplotlib/python-matplotlib.mk
> @@ -0,0 +1,16 @@
> +################################################################################
> +#
> +# python-matplotlib
> +#
> +################################################################################
> +
> +PYTHON_MATPLOTLIB_VERSION = 3.0.3
> +PYTHON_MATPLOTLIB_SOURCE = matplotlib-$(PYTHON_MATPLOTLIB_VERSION).tar.gz
> +PYTHON_MATPLOTLIB_SITE = https://files.pythonhosted.org/packages/26/04/8b381d5b166508cc258632b225adbafec49bbe69aa9a4fa1f1b461428313
> +PYTHON_MATPLOTLIB_LICENSE = PSF
In python3, we call the python license Python-2.0, so I've used that
here as well.
> +PYTHON_MATPLOTLIB_LICENSE_FILES = LICENSE
The actual license file (and the reference in the .hash file) is for
LICENSE/LICENSE, so I've used that instead.
> +PYTHON_MATPLOTLIB_DEPENDENCIES = freetype host-python-numpy \
> + libpng python-cycler
Quoting https://matplotlib.org/users/installing.html:
Matplotlib depends on non-Python libraries.
On Linux and OSX, pkg-config can be used to find required non-Python
libraries and thus make the install go more smoothly if the libraries
and headers are not in the expected locations.
So I've added host-pkgconfig to _DEPENDENCIES and applied to next,
thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 2/2] package/python-matplotlib: new package
2019-05-09 15:58 ` [Buildroot] [PATCH 2/2] package/python-matplotlib: " Jugurtha BELKALEM
2019-05-20 9:55 ` Peter Korsgaard
@ 2019-06-01 13:04 ` Thomas Petazzoni
1 sibling, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2019-06-01 13:04 UTC (permalink / raw)
To: buildroot
Hello Jugurtha,
I am a bit late to the party since your patch has been applied, but I
found something odd, see below.
On Thu, 9 May 2019 17:58:50 +0200
Jugurtha BELKALEM <jugurtha.belkalem@smile.fr> wrote:
> + select BR2_PACKAGE_PYTHON_CYCLER
Why isn't this one a runtime dependency ?
> +PYTHON_MATPLOTLIB_DEPENDENCIES = freetype host-python-numpy \
> + libpng python-cycler
I dropped python-cycler from <pkg>_DEPENDENCIES, and then did a build
with "make python-matplotlib", so it only built the build time
dependencies and not the runtime dependencies, and it built just fine.
Could you comment on why you think python-cycler for the target would
be needed here ?
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-06-01 13:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-09 15:58 [Buildroot] [PATCH 0/2] matplotlib for python 2d graphics Jugurtha BELKALEM
2019-05-09 15:58 ` [Buildroot] [PATCH 1/2] package/python-cycler: new package Jugurtha BELKALEM
2019-05-20 9:37 ` Peter Korsgaard
2019-05-09 15:58 ` [Buildroot] [PATCH 2/2] package/python-matplotlib: " Jugurtha BELKALEM
2019-05-20 9:55 ` Peter Korsgaard
2019-06-01 13:04 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox