pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/textproc py-jade: added version 4.0.0



details:   https://anonhg.NetBSD.org/pkgsrc/rev/aafb0c48fcd9
branches:  trunk
changeset: 372813:aafb0c48fcd9
user:      adam <adam%pkgsrc.org@localhost>
date:      Mon Dec 18 11:09:14 2017 +0000

description:
py-jade: added version 4.0.0

PyJade is a high performance port of Jade-lang for python, that converts any
.jade source to the each Template-language (Django, Jinja2, Mako or Tornado).

diffstat:

 textproc/Makefile                                            |   3 +-
 textproc/py-jade/ALTERNATIVES                                |   1 +
 textproc/py-jade/DESCR                                       |   2 +
 textproc/py-jade/Makefile                                    |  21 +++
 textproc/py-jade/PLIST                                       |  71 ++++++++++++
 textproc/py-jade/distinfo                                    |   8 +
 textproc/py-jade/patches/patch-pyjade_ext_django_compiler.py |  22 +++
 textproc/py-jade/patches/patch-pyjade_ext_django_loader.py   |  51 ++++++++
 8 files changed, 178 insertions(+), 1 deletions(-)

diffs (221 lines):

diff -r 5bb7d918094a -r aafb0c48fcd9 textproc/Makefile
--- a/textproc/Makefile Mon Dec 18 09:10:44 2017 +0000
+++ b/textproc/Makefile Mon Dec 18 11:09:14 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.970 2017/11/26 23:38:17 minskim Exp $
+# $NetBSD: Makefile,v 1.971 2017/12/18 11:09:14 adam Exp $
 #
 
 COMMENT=       Text processing utilities (does not include desktop publishing)
@@ -752,6 +752,7 @@
 SUBDIR+=       py-humanize
 SUBDIR+=       py-inflection
 SUBDIR+=       py-iniparse
+SUBDIR+=       py-jade
 SUBDIR+=       py-jellyfish
 SUBDIR+=       py-jinja2
 SUBDIR+=       py-jmespath
diff -r 5bb7d918094a -r aafb0c48fcd9 textproc/py-jade/ALTERNATIVES
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/py-jade/ALTERNATIVES     Mon Dec 18 11:09:14 2017 +0000
@@ -0,0 +1,1 @@
+bin/pyjade @PREFIX@/bin/pyjade@PYVERSSUFFIX@
diff -r 5bb7d918094a -r aafb0c48fcd9 textproc/py-jade/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/py-jade/DESCR    Mon Dec 18 11:09:14 2017 +0000
@@ -0,0 +1,2 @@
+PyJade is a high performance port of Jade-lang for python, that converts any
+.jade source to the each Template-language (Django, Jinja2, Mako or Tornado).
diff -r 5bb7d918094a -r aafb0c48fcd9 textproc/py-jade/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/py-jade/Makefile Mon Dec 18 11:09:14 2017 +0000
@@ -0,0 +1,21 @@
+# $NetBSD: Makefile,v 1.1 2017/12/18 11:09:14 adam Exp $
+
+DISTNAME=      pyjade-4.0.0
+PKGNAME=       ${PYPKGPREFIX}-${DISTNAME:S/^py//}
+CATEGORIES=    textproc python
+MASTER_SITES=  ${MASTER_SITE_PYPI:=p/pyjade/}
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://github.com/syrusakbary/pyjade
+COMMENT=       Jade syntax template adapter for Django, Jinja2, Mako and Tornado
+LICENSE=       mit
+
+DEPENDS+=      ${PYPKGPREFIX}-six-[0-9]*:../../lang/py-six
+
+USE_LANGUAGES= # none
+
+post-install:
+       cd ${DESTDIR}${PREFIX}/bin && ${MV} pyjade pyjade${PYVERSSUFFIX} || ${TRUE}
+
+.include "../../lang/python/egg.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 5bb7d918094a -r aafb0c48fcd9 textproc/py-jade/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/py-jade/PLIST    Mon Dec 18 11:09:14 2017 +0000
@@ -0,0 +1,71 @@
+@comment $NetBSD: PLIST,v 1.1 2017/12/18 11:09:14 adam Exp $
+bin/pyjade${PYVERSSUFFIX}
+${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
+${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
+${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
+${PYSITELIB}/${EGG_INFODIR}/entry_points.txt
+${PYSITELIB}/${EGG_INFODIR}/requires.txt
+${PYSITELIB}/${EGG_INFODIR}/top_level.txt
+${PYSITELIB}/pyjade/__init__.py
+${PYSITELIB}/pyjade/__init__.pyc
+${PYSITELIB}/pyjade/__init__.pyo
+${PYSITELIB}/pyjade/compiler.py
+${PYSITELIB}/pyjade/compiler.pyc
+${PYSITELIB}/pyjade/compiler.pyo
+${PYSITELIB}/pyjade/convert.py
+${PYSITELIB}/pyjade/convert.pyc
+${PYSITELIB}/pyjade/convert.pyo
+${PYSITELIB}/pyjade/exceptions.py
+${PYSITELIB}/pyjade/exceptions.pyc
+${PYSITELIB}/pyjade/exceptions.pyo
+${PYSITELIB}/pyjade/ext/__init__.py
+${PYSITELIB}/pyjade/ext/__init__.pyc
+${PYSITELIB}/pyjade/ext/__init__.pyo
+${PYSITELIB}/pyjade/ext/django/__init__.py
+${PYSITELIB}/pyjade/ext/django/__init__.pyc
+${PYSITELIB}/pyjade/ext/django/__init__.pyo
+${PYSITELIB}/pyjade/ext/django/compiler.py
+${PYSITELIB}/pyjade/ext/django/compiler.pyc
+${PYSITELIB}/pyjade/ext/django/compiler.pyo
+${PYSITELIB}/pyjade/ext/django/loader.py
+${PYSITELIB}/pyjade/ext/django/loader.pyc
+${PYSITELIB}/pyjade/ext/django/loader.pyo
+${PYSITELIB}/pyjade/ext/django/templatetags.py
+${PYSITELIB}/pyjade/ext/django/templatetags.pyc
+${PYSITELIB}/pyjade/ext/django/templatetags.pyo
+${PYSITELIB}/pyjade/ext/html.py
+${PYSITELIB}/pyjade/ext/html.pyc
+${PYSITELIB}/pyjade/ext/html.pyo
+${PYSITELIB}/pyjade/ext/jinja.py
+${PYSITELIB}/pyjade/ext/jinja.pyc
+${PYSITELIB}/pyjade/ext/jinja.pyo
+${PYSITELIB}/pyjade/ext/mako.py
+${PYSITELIB}/pyjade/ext/mako.pyc
+${PYSITELIB}/pyjade/ext/mako.pyo
+${PYSITELIB}/pyjade/ext/pyramid/__init__.py
+${PYSITELIB}/pyjade/ext/pyramid/__init__.pyc
+${PYSITELIB}/pyjade/ext/pyramid/__init__.pyo
+${PYSITELIB}/pyjade/ext/tornado/__init__.py
+${PYSITELIB}/pyjade/ext/tornado/__init__.pyc
+${PYSITELIB}/pyjade/ext/tornado/__init__.pyo
+${PYSITELIB}/pyjade/ext/underscore.py
+${PYSITELIB}/pyjade/ext/underscore.pyc
+${PYSITELIB}/pyjade/ext/underscore.pyo
+${PYSITELIB}/pyjade/filters.py
+${PYSITELIB}/pyjade/filters.pyc
+${PYSITELIB}/pyjade/filters.pyo
+${PYSITELIB}/pyjade/lexer.py
+${PYSITELIB}/pyjade/lexer.pyc
+${PYSITELIB}/pyjade/lexer.pyo
+${PYSITELIB}/pyjade/nodes.py
+${PYSITELIB}/pyjade/nodes.pyc
+${PYSITELIB}/pyjade/nodes.pyo
+${PYSITELIB}/pyjade/parser.py
+${PYSITELIB}/pyjade/parser.pyc
+${PYSITELIB}/pyjade/parser.pyo
+${PYSITELIB}/pyjade/runtime.py
+${PYSITELIB}/pyjade/runtime.pyc
+${PYSITELIB}/pyjade/runtime.pyo
+${PYSITELIB}/pyjade/utils.py
+${PYSITELIB}/pyjade/utils.pyc
+${PYSITELIB}/pyjade/utils.pyo
diff -r 5bb7d918094a -r aafb0c48fcd9 textproc/py-jade/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/py-jade/distinfo Mon Dec 18 11:09:14 2017 +0000
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2017/12/18 11:09:14 adam Exp $
+
+SHA1 (pyjade-4.0.0.tar.gz) = 68589d0723974d6d5a07c512fda04a99fa1e8792
+RMD160 (pyjade-4.0.0.tar.gz) = e6e26346c9ddac69e2135b72a259be45fcb801f6
+SHA512 (pyjade-4.0.0.tar.gz) = 0a384b843d2eb5884f2690ed5bb9b9b253474568ff1e9faca356a5c50749bb53fb759a099c7719bef495dc7af0073f143afad1c0d6d68f0f61d63624506f12b6
+Size (pyjade-4.0.0.tar.gz) = 29251 bytes
+SHA1 (patch-pyjade_ext_django_compiler.py) = 886954961dffafdfcdf4fd02b3ccf58e781650e1
+SHA1 (patch-pyjade_ext_django_loader.py) = c6bc26ea7cc2500d3149e28baed7e4790505d962
diff -r 5bb7d918094a -r aafb0c48fcd9 textproc/py-jade/patches/patch-pyjade_ext_django_compiler.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/py-jade/patches/patch-pyjade_ext_django_compiler.py      Mon Dec 18 11:09:14 2017 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-pyjade_ext_django_compiler.py,v 1.1 2017/12/18 11:09:14 adam Exp $
+
+Django 1.11 compatibility fix:
+https://github.com/DMOJ/pyjade/commit/bc21f900e9041c85f3989252881aef4a4bf1132d
+
+--- pyjade/ext/django/compiler.py.orig 2017-12-18 10:52:52.000000000 +0000
++++ pyjade/ext/django/compiler.py
+@@ -88,8 +88,13 @@ def decorate_templatize(func):
+         return func(html, origin)
+ 
+     return templatize
++try:
++    trans_real.templatize = decorate_templatize(trans_real.templatize)
++except AttributeError:
++    # Django 1.11 moved templatize to separate module
++    from django.utils.translation import template
+ 
+-trans_real.templatize = decorate_templatize(trans_real.templatize)
++    template.templatize = decorate_templatize(template.templatize)
+ 
+ try:
+     from django.contrib.markup.templatetags.markup import markdown
diff -r 5bb7d918094a -r aafb0c48fcd9 textproc/py-jade/patches/patch-pyjade_ext_django_loader.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/py-jade/patches/patch-pyjade_ext_django_loader.py        Mon Dec 18 11:09:14 2017 +0000
@@ -0,0 +1,51 @@
+$NetBSD: patch-pyjade_ext_django_loader.py,v 1.1 2017/12/18 11:09:14 adam Exp $
+
+Upgrade loader to be compatible with django 1.10
+https://github.com/syrusakbary/pyjade/pull/263
+
+--- pyjade/ext/django/loader.py.orig   2017-12-18 11:00:49.000000000 +0000
++++ pyjade/ext/django/loader.py
+@@ -7,7 +7,11 @@ try:
+ except ImportError:  # Django < 1.9
+     from django.template.base import TemplateDoesNotExist
+ 
+-from django.template.loader import BaseLoader
++try:
++    from django.template.loaders.base import Loader as BaseLoader
++except ImportError:  # Django < 1.9
++    from django.template.loader import BaseLoader
++
+ try:
+     from django.template.engine import Engine
+ except ImportError:  # Django < 1.8
+@@ -18,7 +22,6 @@ from django.conf import settings
+ from .compiler import Compiler
+ 
+ from pyjade.utils import process
+-# from django.template.loaders.cached import Loader
+ 
+ 
+ try:
+@@ -40,7 +43,7 @@ except ImportError:  # Django >= 1.9
+ class Loader(BaseLoader):
+     is_usable = True
+ 
+-    def __init__(self, loaders):
++    def __init__(self, engine, loaders):
+         self.template_cache = {}
+         self._loaders = loaders
+         self._cached_loaders = []
+@@ -112,12 +115,6 @@ class Loader(BaseLoader):
+             self.template_cache[key] = template
+         return self.template_cache[key], None
+ 
+-    # def _preprocess(self, source, name, filename=None):
+-    #     parser = Parser(source,filename=filename)
+-    #     block = parser.parse()
+-    #     compiler = Compiler(block)
+-    #     return compiler.compile().strip()
+-
+     def reset(self):
+-        "Empty the template cache."
++        """Empty the template cache."""
+         self.template_cache.clear()



Home | Main Index | Thread Index | Old Index