diff mbox

[v2] pyqtgraph: new package

Message ID 1444260188-9571-1-git-send-email-guillaume.bressaix@gmail.com
State Changes Requested
Headers show

Commit Message

Guillaume Bres Oct. 7, 2015, 11:23 p.m. UTC
Signed-off-by: Guillaume William Bres <guillaume.bressaix@gmail.com>
---
Applied modifications suggested by Arnout:
 
 package/python-pyqtgraph/Config.in now depends on the new variable:
 BR2_PACKAGE_PYTHON_NUMPY_ARCH_DEPENDS.
 
 package/python-pyqtgraph/Config.in selects Qt/PyQt.
 
 comment all dependencies.

---
 package/Config.in                              |    1 +
 package/python-pyqtgraph/Config.in             |   22 ++++++++++++++++++++++
 package/python-pyqtgraph/python-pyqtgraph.hash |    5 +++++
 package/python-pyqtgraph/python-pyqtgraph.mk   |   15 +++++++++++++++
 4 files changed, 43 insertions(+)
 create mode 100644 package/python-pyqtgraph/Config.in
 create mode 100644 package/python-pyqtgraph/python-pyqtgraph.hash
 create mode 100644 package/python-pyqtgraph/python-pyqtgraph.mk

Comments

Thomas Petazzoni Oct. 12, 2015, 8:54 p.m. UTC | #1
Dear Guillaume William Bres,

Thanks for this new version. Though I believe it still has some issues
(see below).

On Wed, 7 Oct 2015 17:23:08 -0600, Guillaume William Bres wrote:

> diff --git a/package/python-pyqtgraph/Config.in b/package/python-pyqtgraph/Config.in
> new file mode 100644
> index 0000000..f1c3a42
> --- /dev/null
> +++ b/package/python-pyqtgraph/Config.in
> @@ -0,0 +1,22 @@
> +comment "python-pyqtgraph requires a (e)glibc toolchain w/ wchar and C++"

So the comment says that you need eglibc with wchar and C++.

> +	depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_DEPENDS
> +	depends on BR2_USE_MMU
> +	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS

But the dependencies have absolutely nothing to do with the comment.
Can you explain?

What you need is:

comment "python-pyqtgraph requires a toolchain w/ C++, threads"
	depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_DEPENDS
	depends on BR2_USE_MMU
	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS

> +
> +config BR2_PACKAGE_PYTHON_PYQTGRAPH
> +	bool "python-pyqtgraph"
> +	depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_DEPENDS
> +	depends on BR2_USE_MMU # pyqt -> qt
> +	depends on BR2_INSTALL_LIBSTDCPP # pyqt -> qt
> +	depends on BR2_TOOLCHAIN_HAS_THREADS # pyqt -> qt
> +	select BR2_PACKAGE_PYTHON_PYQT
> +	select BR2_PACKAGE_PYTHON_NUMPY # runtime dependency
> +	select BR2_PACKAGE_PYTHON_PYEXPAT # runtime dependency

python-pyqt supports both Python 2 and Python 3. By doing this select
here, you break things if Python 3 is used. So you have two options:

 * If python-pyqtgraph only works with Python 2, add a "depends on
   BR2_PACKAGE_PYTHON"

 * If python-pyqtgraph works with both Python 2 and Python 3, you
   should:

	select BR2_PACKAGE_PYTHON_PYEXPAT if BR2_PACKAGE_PYTHON
	select BR2_PACKAGE_PYTHON3_PYEXPAT if BR2_PACKAGE_PYTHON3

(and of course do a build + run test with Python 3)

> +	select BR2_PACKAGE_QT_SVG # runtime dependency
> +	select BR2_PACKAGE_QT_GUI_MODULE
> +	help
> +	  Pyqtgraph is a pure Python graphics and GUI library built on PyQt4, 
> +	  PySide and Numpy. 
> +	  
> +	  Official website:
> +	  http://www.pyqtgraph.org/
> diff --git a/package/python-pyqtgraph/python-pyqtgraph.hash b/package/python-pyqtgraph/python-pyqtgraph.hash
> new file mode 100644
> index 0000000..c20eea2
> --- /dev/null
> +++ b/package/python-pyqtgraph/python-pyqtgraph.hash
> @@ -0,0 +1,5 @@
> +# From http://www.pyqtgraph.org/downloads
> +md5 6e2efa185b6b9227dfe16fefd921a8ec  pyqtgraph-0.9.10.tar.gz
> +
> +# Locally calculated:
> +sha256 4c0589774e3c8b0c374931397cf6356b9cc99a790215d1917bb7f015c6f0729a  pyqtgraph-0.9.10.tar.gz
> diff --git a/package/python-pyqtgraph/python-pyqtgraph.mk b/package/python-pyqtgraph/python-pyqtgraph.mk
> new file mode 100644
> index 0000000..dbc3598
> --- /dev/null
> +++ b/package/python-pyqtgraph/python-pyqtgraph.mk
> @@ -0,0 +1,15 @@
> +################################################################################
> +#
> +# python-pyqtgraph
> +#
> +################################################################################
> +
> +PYTHON_PYQTGRAPH_VERSION = 0.9.10
> +PYTHON_PYQTGRAPH_SOURCE = pyqtgraph-$(PYTHON_PYQTGRAPH_VERSION).tar.gz
> +PYTHON_PYQTGRAPH_SITE = http://www.pyqtgraph.org/downloads
> +PYTHON_PYQTGRAPH_LICENSE = MIT
> +PYTHON_PYQTGRAPH_LICENSE_FILES = COPYING

There is no file named COPYING in the source. It's named LICENSE.txt.

Could you fix those issues and post an updated version?

Thanks!

Thomas
Thomas Petazzoni Oct. 12, 2015, 10:06 p.m. UTC | #2
Dear Guillaume William Bres,

Why did you reply to buildroot-request@busybox.net and not to the
normal mailing list address buildroot@busybox.net ?

On Mon, 12 Oct 2015 15:49:59 -0600, Guillaume William Bres wrote:

> __On 10/12/2015 02:54 PM, Thomas Petazzoni :_
> 
>      So the comment says that you need eglibc with wchar and C++.
>      But the dependencies have absolutely nothing to do with the 
> comment. Can you explain?
> 
> These were Arnout's corrections for Patch v1/.//

Hum, I'm not sure why, but at least the comment should be consistent
with the dependencies.

> I thought COPYING was a Buildroot command (I copied that line from other 
> packages), now I know it's the name of the license file.

For all details about the Buildroot variables, look at the manual. All
of them are documented.

Thanks!

Thomas
diff mbox

Patch

diff --git a/package/Config.in b/package/Config.in
index 3794f44..c8812a6 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -645,6 +645,7 @@  menu "external python modules"
 	source "package/python-pyparsing/Config.in"
 	source "package/python-pypcap/Config.in"
 	source "package/python-pyqt/Config.in"
+	source "package/python-pyqtgraph/Config.in"
 	source "package/python-pyratemp/Config.in"
 	source "package/python-pyro/Config.in"
 	source "package/python-pyroute2/Config.in"
diff --git a/package/python-pyqtgraph/Config.in b/package/python-pyqtgraph/Config.in
new file mode 100644
index 0000000..f1c3a42
--- /dev/null
+++ b/package/python-pyqtgraph/Config.in
@@ -0,0 +1,22 @@ 
+comment "python-pyqtgraph requires a (e)glibc toolchain w/ wchar and C++"
+	depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_DEPENDS
+	depends on BR2_USE_MMU
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
+
+config BR2_PACKAGE_PYTHON_PYQTGRAPH
+	bool "python-pyqtgraph"
+	depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_DEPENDS
+	depends on BR2_USE_MMU # pyqt -> qt
+	depends on BR2_INSTALL_LIBSTDCPP # pyqt -> qt
+	depends on BR2_TOOLCHAIN_HAS_THREADS # pyqt -> qt
+	select BR2_PACKAGE_PYTHON_PYQT
+	select BR2_PACKAGE_PYTHON_NUMPY # runtime dependency
+	select BR2_PACKAGE_PYTHON_PYEXPAT # runtime dependency
+	select BR2_PACKAGE_QT_SVG # runtime dependency
+	select BR2_PACKAGE_QT_GUI_MODULE
+	help
+	  Pyqtgraph is a pure Python graphics and GUI library built on PyQt4, 
+	  PySide and Numpy. 
+	  
+	  Official website:
+	  http://www.pyqtgraph.org/
diff --git a/package/python-pyqtgraph/python-pyqtgraph.hash b/package/python-pyqtgraph/python-pyqtgraph.hash
new file mode 100644
index 0000000..c20eea2
--- /dev/null
+++ b/package/python-pyqtgraph/python-pyqtgraph.hash
@@ -0,0 +1,5 @@ 
+# From http://www.pyqtgraph.org/downloads
+md5 6e2efa185b6b9227dfe16fefd921a8ec  pyqtgraph-0.9.10.tar.gz
+
+# Locally calculated:
+sha256 4c0589774e3c8b0c374931397cf6356b9cc99a790215d1917bb7f015c6f0729a  pyqtgraph-0.9.10.tar.gz
diff --git a/package/python-pyqtgraph/python-pyqtgraph.mk b/package/python-pyqtgraph/python-pyqtgraph.mk
new file mode 100644
index 0000000..dbc3598
--- /dev/null
+++ b/package/python-pyqtgraph/python-pyqtgraph.mk
@@ -0,0 +1,15 @@ 
+################################################################################
+#
+# python-pyqtgraph
+#
+################################################################################
+
+PYTHON_PYQTGRAPH_VERSION = 0.9.10
+PYTHON_PYQTGRAPH_SOURCE = pyqtgraph-$(PYTHON_PYQTGRAPH_VERSION).tar.gz
+PYTHON_PYQTGRAPH_SITE = http://www.pyqtgraph.org/downloads
+PYTHON_PYQTGRAPH_LICENSE = MIT
+PYTHON_PYQTGRAPH_LICENSE_FILES = COPYING
+PYTHON_PYQTGRAPH_SETUP_TYPE = distutils
+PYTHON_PYQTGRAPH_DEPENDENCIES = python-pyqt
+
+$(eval $(python-package))