[6/6] package/python-wsgiref: new package
diff mbox series

Message ID 20190531171654.17906-6-matthew.weber@rockwellcollins.com
State Rejected
Headers show
Series
  • [1/6] package/python-colorama: new package
Related show

Commit Message

Matt Weber May 31, 2019, 5:16 p.m. UTC
The Web Server Gateway Interface (WSGI) package defines a
standard interface between web server software and web
applications.

Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
---
 DEVELOPERS                                 |  1 +
 package/Config.in                          |  1 +
 package/python-wsgiref/Config.in           |  6 ++++++
 package/python-wsgiref/python-wsgiref.hash |  3 +++
 package/python-wsgiref/python-wsgiref.mk   | 18 ++++++++++++++++++
 5 files changed, 29 insertions(+)
 create mode 100644 package/python-wsgiref/Config.in
 create mode 100644 package/python-wsgiref/python-wsgiref.hash
 create mode 100644 package/python-wsgiref/python-wsgiref.mk

Comments

Thomas Petazzoni June 20, 2019, 8:25 p.m. UTC | #1
On Fri, 31 May 2019 12:16:54 -0500
Matt Weber <matthew.weber@rockwellcollins.com> wrote:

> The Web Server Gateway Interface (WSGI) package defines a
> standard interface between web server software and web
> applications.
> 
> Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>

This module doesn't seem to be Python 3.x ready:

Traceback (most recent call last):
  File "setup.py", line 5, in <module>
    import ez_setup
  File "/home/thomas/projets/buildroot/output/build/python-wsgiref-0.1.2/ez_setup/__init__.py", line 170
    print "Setuptools version",version,"or greater has been installed."
                             ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Setuptools version",version,"or greater has been installed.")?
make[1]: *** [package/pkg-generic.mk:241: /home/thomas/projets/buildroot/output/build/python-wsgiref-0.1.2/.stamp_built] Error 1

> +PYTHON_WSGIREF_LICENSE = PSF or ZPL

Neither of these are valid SPDX license codes according to
https://spdx.org/licenses/.

Could you have a look at those two issues ?

Thanks!

Thomas
Matt Weber June 25, 2019, 9:47 a.m. UTC | #2
Thomas,


On Thu, Jun 20, 2019 at 3:25 PM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> On Fri, 31 May 2019 12:16:54 -0500
> Matt Weber <matthew.weber@rockwellcollins.com> wrote:
>
> > The Web Server Gateway Interface (WSGI) package defines a
> > standard interface between web server software and web
> > applications.
> >
> > Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
>

I've noted this patch as rejected in patchwork.  I found out the
actual codebase for this package is inside of the python/Lib/ [1] and
the pip version [2] was quite old.  Both python2 and 3 provide this
example library and helpers as part of the normal target install.

Thanks!


[1] https://github.com/python/cpython/tree/master/Lib/wsgiref
[2] https://pypi.org/project/wsgiref/#history

Patch
diff mbox series

diff --git a/DEVELOPERS b/DEVELOPERS
index 3ca48deff6..8545352329 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1528,6 +1528,7 @@  F:	package/python-pypcap/
 F:	package/python-pyrex/
 F:	package/python-tinyrpc/
 F:	package/python-txdbus/
+F:	package/python-wsgiref/
 F:	package/raptor/
 F:	package/rcw/
 F:	package/rng-tools/
diff --git a/package/Config.in b/package/Config.in
index e68defd5f4..43cfcfbd73 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1103,6 +1103,7 @@  menu "External python modules"
 	source "package/python-wrapt/Config.in"
 	source "package/python-ws4py/Config.in"
 	source "package/python-wsaccel/Config.in"
+	source "package/python-wsgiref/Config.in"
 	source "package/python-wtforms/Config.in"
 	source "package/python-xlib/Config.in"
 	source "package/python-xlrd/Config.in"
diff --git a/package/python-wsgiref/Config.in b/package/python-wsgiref/Config.in
new file mode 100644
index 0000000000..2fde92cab0
--- /dev/null
+++ b/package/python-wsgiref/Config.in
@@ -0,0 +1,6 @@ 
+config BR2_PACKAGE_PYTHON_WSGIREF
+	bool "python-wsgiref"
+	help
+	  WSGI (PEP 333) Reference Library.
+
+	  http://cheeseshop.python.org/pypi/wsgiref
diff --git a/package/python-wsgiref/python-wsgiref.hash b/package/python-wsgiref/python-wsgiref.hash
new file mode 100644
index 0000000000..0c9a4fecd8
--- /dev/null
+++ b/package/python-wsgiref/python-wsgiref.hash
@@ -0,0 +1,3 @@ 
+# md5, sha256 from https://pypi.org/pypi/wsgiref/json
+md5	29b146e6ebd0f9fb119fe321f7bcf6cb  wsgiref-0.1.2.zip
+sha256	c7e610c800957046c04c8014aab8cce8f0b9f0495c8cd349e57c1f7cabf40e79  wsgiref-0.1.2.zip
diff --git a/package/python-wsgiref/python-wsgiref.mk b/package/python-wsgiref/python-wsgiref.mk
new file mode 100644
index 0000000000..e30f4c6a31
--- /dev/null
+++ b/package/python-wsgiref/python-wsgiref.mk
@@ -0,0 +1,18 @@ 
+################################################################################
+#
+# python-wsgiref
+#
+################################################################################
+
+PYTHON_WSGIREF_VERSION = 0.1.2
+PYTHON_WSGIREF_SOURCE = wsgiref-$(PYTHON_WSGIREF_VERSION).zip
+PYTHON_WSGIREF_SITE = https://files.pythonhosted.org/packages/41/9e/309259ce8dff8c596e8c26df86dbc4e848b9249fd36797fd60be456f03fc
+PYTHON_WSGIREF_SETUP_TYPE = setuptools
+PYTHON_WSGIREF_LICENSE = PSF or ZPL
+
+define PYTHON_WSGIREF_EXTRACT_CMDS
+	$(UNZIP) -d $(@D) $(PYTHON_WSGIREF_DL_DIR)/$(PYTHON_WSGIREF_SOURCE)
+	mv $(@D)/wsgiref-$(PYTHON_WSGIREF_VERSION)/* $(@D)/
+endef
+
+$(eval $(python-package))