Skip to contentSkip to conversation

Add pyyaml package

PATCH New Geoffrey Ragot 2 participants 4 messages Jul 26, 2015 – Jul 28, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Add pyyaml package

---
 package/Config.in                      |  1 +
 package/python-pyyaml/Config.in        |  8 ++++++++
 package/python-pyyaml/python-pyyaml.mk | 15 +++++++++++++++
 3 files changed, 24 insertions(+)
 create mode 100644 package/python-pyyaml/Config.in
 create mode 100644 package/python-pyyaml/python-pyyaml.mk
package/Config.in +1 -0
index cfa7512..8bc27a4 100644
@@ -649,6 +649,7 @@ menu "external python modules"
 	source "package/python-pyusb/Config.in"
 	source "package/python-pyxb/Config.in"
 	source "package/python-pyxml/Config.in"
+	source "package/python-pyyaml/Config.in"
 	source "package/python-pyzmq/Config.in"
 	source "package/python-requests/Config.in"
 	source "package/python-rtslib-fb/Config.in"
package/python-pyyaml/Config.in new file +8 -0
new file mode 100644
index 0000000..a63c445
@@ -0,0 +1,8 @@
+comment "python-pyyaml require libyaml"
+	depends on !BR2_PACKAGE_LIBYAML
+
+config BR2_PACKAGE_PYTHON_PYYAML
+	bool "python-pyyaml"
+	depends on BR2_PACKAGE_LIBYAML
+	help
+	  The PyYAML package contains binding to the libyaml API.
package/python-pyyaml/python-pyyaml.mk new file +15 -0
new file mode 100644
index 0000000..ef10dac
@@ -0,0 +1,15 @@
+################################################################################
+#
+# python-pyyaml
+#
+################################################################################
+
+PYTHON_PYYAML_VERSION = 3.11
+PYTHON_PYYAML_SOURCE = PyYAML-$(PYTHON_PYYAML_VERSION).tar.gz
+PYTHON_PYYAML_SITE = https://pypi.python.org/packages/source/P/PyYAML/
+PYTHON_PYYAML_SETUP_TYPE = distutils
+PYTHON_PYYAML_LICENSE = Python software foundation license v2
+PYTHON_PYYAML_LICENSE_FILES = LICENSE
+PYTHON_PYYAML_DEPENDENCIES = libyaml
+
+$(eval $(python-package))
Signature · 1 line
2.4.6
#1 lore raw

PATCH 2/2 Add pycli package

---
 package/Config.in                    |  1 +
 package/python-pycli/Config.in       |  4 ++++
 package/python-pycli/python-pycli.mk | 15 +++++++++++++++
 3 files changed, 20 insertions(+)
 create mode 100644 package/python-pycli/Config.in
 create mode 100644 package/python-pycli/python-pycli.mk
package/Config.in +1 -0
index 8bc27a4..06a4326 100644
@@ -633,6 +633,7 @@ menu "external python modules"
 	source "package/python-protobuf/Config.in"
 	source "package/python-psutil/Config.in"
 	source "package/python-pyasn/Config.in"
+	source "package/python-pycli/Config.in"
 	source "package/python-pycrypto/Config.in"
 	source "package/python-pydal/Config.in"
 	source "package/python-pyftpdlib/Config.in"
package/python-pycli/Config.in new file +4 -0
new file mode 100644
index 0000000..a4f157e
@@ -0,0 +1,4 @@
+config BR2_PACKAGE_PYTHON_PYCLI
+	bool "python-pycli"
+	help
+	  The cli package is a framework for making simple, correct command line applications in Python.
package/python-pycli/python-pycli.mk new file +15 -0
new file mode 100644
index 0000000..6857425
@@ -0,0 +1,15 @@
+################################################################################
+#
+# python-pycli
+#
+################################################################################
+
+PYTHON_PYCLI_VERSION = devel
+PYTHON_PYCLI_SOURCE = pyCLI-$(PYTHON_PYCLI_VERSION).tar.gz
+PYTHON_PYCLI_SITE = https://pypi.python.org/packages/source/p/pyCLI/
+PYTHON_PYCLI_SETUP_TYPE = distutils
+PYTHON_PYCLI_LICENSE = Python software foundation license v2
+PYTHON_PYCLI_LICENSE_FILES = LICENSE
+PYTHON_PYCLI_SETUP_TYPE = setuptools
+
+$(eval $(python-package))
Signature · 1 line
2.4.6
#2 lore raw

PATCH 2/2 Add pycli package

Dear Geoffrey Ragot,

Quoted 8 lines · Geoffrey Ragot
---
 package/Config.in                    |  1 +
 package/python-pycli/Config.in       |  4 ++++
 package/python-pycli/python-pycli.mk | 15 +++++++++++++++
 3 files changed, 20 insertions(+)
 create mode 100644 package/python-pycli/Config.in
 create mode 100644 package/python-pycli/python-pycli.mk

I've applied this patch, but had to fix a number of different things before that. See below.

package/python-pycli/Config.in line 4

Quoted 10 lines
package/python-pycli/Config.in new file +4 -0
new file mode 100644
index 0000000..a4f157e
@@ -0,0 +1,4 @@
+config BR2_PACKAGE_PYTHON_PYCLI
+	bool "python-pycli"
+	help
+	  The cli package is a framework for making simple, correct command line applications in Python.

This line is too long. Text should be wrapped so that it fits in 72 columns.

Also, Config.in help text should have the URL of the project homepage.

package/python-pycli/python-pycli.mk line 7

Quoted 13 lines
package/python-pycli/python-pycli.mk new file +7 -0
new file mode 100644
index 0000000..6857425
@@ -0,0 +1,15 @@
+################################################################################
+#
+# python-pycli
+#
+################################################################################
+
+PYTHON_PYCLI_VERSION = devel

This is a strange version, which probably indicates they will change the tarball contents without changing the version. You missed the hash file, which would allow to check this, so I've added the hash file.

package/python-pycli/python-pycli.mk line 10

Quoted 3 lines
package/python-pycli/python-pycli.mk new file +3 -0
+PYTHON_PYCLI_SOURCE = pyCLI-$(PYTHON_PYCLI_VERSION).tar.gz
+PYTHON_PYCLI_SITE = https://pypi.python.org/packages/source/p/pyCLI/
+PYTHON_PYCLI_SETUP_TYPE = distutils

First definition of <pkg>_SETUP_TYPE.

package/python-pycli/python-pycli.mk line 12

Quoted 2 lines
package/python-pycli/python-pycli.mk new file +2 -0
+PYTHON_PYCLI_LICENSE = Python software foundation license v2
+PYTHON_PYCLI_LICENSE_FILES = LICENSE

There was no file named LICENSE in the source directory. And the contents of the source tree was a bit fuzzy in terms of license, mentioning some code having Apache-2.0, some other MIT, but the main file indicating an ISC-like license. So I opted for that one as the license.

package/python-pycli/python-pycli.mk line 13

Quoted 1 line
package/python-pycli/python-pycli.mk new file +1 -0
+PYTHON_PYCLI_SETUP_TYPE = setuptools

And second definition of <pkg>_SETUP_TYPE. So I kept only this one.

Also, as I've said, I've added a hash file as well.

See
http://git.buildroot.net/buildroot/commit/?id=1ec19e5e47486d2ba61564b37f1c8b6e62ec6d28
for the final commit.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH 1/2 Add pyyaml package

In reply to Geoffrey Ragot

Geoffrey,

The commit title should have been:

python-pyyaml: new package

(just to follow the Buildroot conventions).

package/python-pyyaml/Config.in line 2

Quoted 8 lines · Geoffrey Ragot
package/python-pyyaml/Config.in new file +2 -0
new file mode 100644
index 0000000..a63c445
@@ -0,0 +1,8 @@
+comment "python-pyyaml require libyaml"
+	depends on !BR2_PACKAGE_LIBYAML

This comment is not needed...

package/python-pyyaml/Config.in line 6

Quoted 4 lines
package/python-pyyaml/Config.in new file +4 -0
+
+config BR2_PACKAGE_PYTHON_PYYAML
+	bool "python-pyyaml"
+	depends on BR2_PACKAGE_LIBYAML

... because 'select' should be used instead of 'depends on' for such dependencies.

package/python-pyyaml/Config.in line 8

Quoted 2 lines
package/python-pyyaml/Config.in new file +2 -0
+	help
+	  The PyYAML package contains binding to the libyaml API.

We normally include the URL of the upstream project here.

Quoted 11 lines
package/python-pyyaml/python-pyyaml.mk new file +5 -0
new file mode 100644
index 0000000..ef10dac
@@ -0,0 +1,15 @@
+################################################################################
+#
+# python-pyyaml
+#
+################################################################################

package/python-pyyaml/python-pyyaml.mk line 15

Quoted 10 lines
package/python-pyyaml/python-pyyaml.mk new file +10 -0
+
+PYTHON_PYYAML_VERSION = 3.11
+PYTHON_PYYAML_SOURCE = PyYAML-$(PYTHON_PYYAML_VERSION).tar.gz
+PYTHON_PYYAML_SITE = https://pypi.python.org/packages/source/P/PyYAML/
+PYTHON_PYYAML_SETUP_TYPE = distutils
+PYTHON_PYYAML_LICENSE = Python software foundation license v2
+PYTHON_PYYAML_LICENSE_FILES = LICENSE
+PYTHON_PYYAML_DEPENDENCIES = libyaml
+
+$(eval $(python-package))

The .mk file was OK, however, the .hash file was missing.

I've fixed those issues:

[Thomas:
- use 'select' rather than 'depends on' for the yaml library dependency
- add hash file.
- add upstream URL in Config.in help text
- rework commit title.]

and applied.

Thanks for your contribution!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com