[oe-commits] [meta-openembedded] 33/44: python-flask-wtf: Add recipe for version 0.12

git at git.openembedded.org git at git.openembedded.org
Thu Apr 21 19:32:58 UTC 2016


martin_jansa pushed a commit to branch master
in repository meta-openembedded.

commit 4be70064670c34d1b67224672b7caed7b4ed7b04
Author: Fabio Berton <fabio.berton at ossystems.com.br>
AuthorDate: Wed Apr 13 10:16:58 2016 -0300

    python-flask-wtf: Add recipe for version 0.12
    
    It's a simple integration of Flask and WTForms.
    
    Signed-off-by: Fabio Berton <fabio.berton at ossystems.com.br>
    Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
---
 .../import-simplejson-as-json.patch                | 28 ++++++++++++++++++++++
 .../python/python-flask-wtf_0.12.bb                | 17 +++++++++++++
 2 files changed, 45 insertions(+)

diff --git a/meta-python/recipes-devtools/python/python-flask-wtf/import-simplejson-as-json.patch b/meta-python/recipes-devtools/python/python-flask-wtf/import-simplejson-as-json.patch
new file mode 100644
index 0000000..678f706
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python-flask-wtf/import-simplejson-as-json.patch
@@ -0,0 +1,28 @@
+Upstream-Status: Inappropriate [configuration]
+
+Subject: [PATCH] import simplejson as json
+
+At runtime python-Flask-WTF tries to import json, but the module is not 
+available, import simplejson as json solve the issue.
+
+Signed-off-by: Fabio Berton <fabio.berton at ossystems.com.br>
+---
+ flask_wtf/recaptcha/validators.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/flask_wtf/recaptcha/validators.py b/flask_wtf/recaptcha/validators.py
+index bcff23d..4a244bb 100644
+--- a/flask_wtf/recaptcha/validators.py
++++ b/flask_wtf/recaptcha/validators.py
+@@ -8,7 +8,7 @@ from flask import request, current_app
+ from wtforms import ValidationError
+ from werkzeug import url_encode
+ from .._compat import to_bytes, to_unicode
+-import json
++import simplejson as json
+ 
+ RECAPTCHA_VERIFY_SERVER = 'https://www.google.com/recaptcha/api/siteverify'
+ RECAPTCHA_ERROR_CODES = {
+-- 
+2.1.4
+
diff --git a/meta-python/recipes-devtools/python/python-flask-wtf_0.12.bb b/meta-python/recipes-devtools/python/python-flask-wtf_0.12.bb
new file mode 100644
index 0000000..79afaf6
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python-flask-wtf_0.12.bb
@@ -0,0 +1,17 @@
+DESCRIPTION = "Simple integration of Flask and WTForms."
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=507e8635f25a06dc4f041a3a1b3359b3"
+
+SRC_URI[md5sum] = "c53a74e8ba481bf53405fd5efdf0339e"
+SRC_URI[sha256sum] = "bd99316c97ed1d1cb90b8f0c242c86420a891a6a2058f20717e424bf5b0bb80e"
+
+SRC_URI += " file://import-simplejson-as-json.patch"
+
+PYPI_PACKAGE = "Flask-WTF"
+
+inherit pypi setuptools
+
+RDEPENDS_${PN} = "\
+    python-wtforms \
+    python-simplejson \
+"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list