Patchwork [21/24] python3-jinja: Recipe for python3 templating system

login
register
mail settings
Submitter Khem Raj
Date June 28, 2013, 10:04 p.m.
Message ID <16aa82db3cd5727a22d3688197fef330aaf2df59.1372456294.git.raj.khem@gmail.com>
Download mbox | patch
Permalink /patch/52679/
State New
Headers show

Comments

Khem Raj - June 28, 2013, 10:04 p.m.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-devtools/python/python3-jinja_1.2.bb |   37 +++++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 meta/recipes-devtools/python/python3-jinja_1.2.bb
Martin Jansa - June 30, 2013, 10:30 a.m.
On Fri, Jun 28, 2013 at 03:04:06PM -0700, Khem Raj wrote:
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  meta/recipes-devtools/python/python3-jinja_1.2.bb |   37 +++++++++++++++++++++
>  1 file changed, 37 insertions(+)
>  create mode 100644 meta/recipes-devtools/python/python3-jinja_1.2.bb

throws couple of unpackaged docs files:

python3-jinja-1.2: python3-jinja: Files/directories were installed but
not shipped
  /usr/share
  /usr/share/docs
  /usr/share/docs/html
  /usr/share/docs/txt
  /usr/share/docs/html/watermark.png
  /usr/share/docs/html/translators.html
  /usr/share/docs/html/tests.html
  /usr/share/docs/html/templatei18n.html
  /usr/share/docs/html/style.css
  /usr/share/docs/html/streaming.html
  /usr/share/docs/html/scopes.html
  /usr/share/docs/html/recipies.html
  /usr/share/docs/html/objects.html
  /usr/share/docs/html/loaders.html
  /usr/share/docs/html/jinjalogo.png
  /usr/share/docs/html/jinjabanner.png
  /usr/share/docs/html/installation.html
  /usr/share/docs/html/inheritance.html
  /usr/share/docs/html/index.html
  /usr/share/docs/html/i18n.html
  /usr/share/docs/html/fromdjango.html
  /usr/share/docs/html/frameworks.html
  /usr/share/docs/html/filters.html
  /usr/share/docs/html/escaping.html
  /usr/share/docs/html/devrecipies.html
  /usr/share/docs/html/devintro.html
  /usr/share/docs/html/designerdoc.html
  /usr/share/docs/html/debugging.html
  /usr/share/docs/html/changelog.html
  /usr/share/docs/html/builtins.html
  /usr/share/docs/html/api.html
  /usr/share/docs/html/altsyntax.html
  /usr/share/docs/txt/translators.txt
  /usr/share/docs/txt/tests.txt
  /usr/share/docs/txt/templatei18n.txt
  /usr/share/docs/txt/streaming.txt
  /usr/share/docs/txt/scopes.txt
  /usr/share/docs/txt/recipies.txt
  /usr/share/docs/txt/objects.txt
  /usr/share/docs/txt/loaders.txt
  /usr/share/docs/txt/installation.txt
  /usr/share/docs/txt/inheritance.txt
  /usr/share/docs/txt/index.txt
  /usr/share/docs/txt/i18n.txt
  /usr/share/docs/txt/fromdjango.txt
  /usr/share/docs/txt/frameworks.txt
  /usr/share/docs/txt/filters.txt
  /usr/share/docs/txt/escaping.txt
  /usr/share/docs/txt/devrecipies.txt
  /usr/share/docs/txt/devintro.txt
  /usr/share/docs/txt/designerdoc.txt
  /usr/share/docs/txt/debugging.txt
  /usr/share/docs/txt/changelog.txt
  /usr/share/docs/txt/builtins.txt
  /usr/share/docs/txt/api.txt
  /usr/share/docs/txt/altsyntax.txt

Patch

diff --git a/meta/recipes-devtools/python/python3-jinja_1.2.bb b/meta/recipes-devtools/python/python3-jinja_1.2.bb
new file mode 100644
index 0000000..e84548a
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-jinja_1.2.bb
@@ -0,0 +1,37 @@ 
+DESCRIPTION = "Pure Python Templating System."
+HOMEPAGE = " http://jinja.pocoo.org/"
+SECTION = "devel/python"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=782689a6f9cc3482c3b8b39c552f1cf8"
+
+DEPENDS = "python3"
+
+RDEPENDS_${PN} = " \
+                   python3-codecs \
+                   python3-core \
+                   python3-re \
+                 "
+SRCNAME = "Jinja"
+PR = "r1"
+
+SRC_URI = "\
+  http://pypi.python.org/packages/source/J/${SRCNAME}/${SRCNAME}-${PV}.tar.gz \
+"
+
+SRC_URI[md5sum] = "1235a005ade00b213800ff1e798c0241"
+SRC_URI[sha256sum] = "36252f3d0356008a31a537a31cfba189f7b5898b8e2da454f72ea5f987db8b31"
+
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+inherit setuptools3
+
+do_sanitize() {
+
+    # it seems that the installer is not ready for python3.  Upconvert...
+    ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/2to3 -w .
+
+    # this looks like a broken 2to3 fixer.  Help it out.
+    sed -E -i'.tweak' -e 's/__nonzero__/__bool__/g' jinja/datastructure.py
+}
+
+addtask sanitize after do_unpack before do_patch