pkgsrc-Changes archive

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

CVS commit: pkgsrc/textproc



Module Name:    pkgsrc
Committed By:   adam
Date:           Mon Dec 18 11:09:14 UTC 2017

Modified Files:
        pkgsrc/textproc: Makefile
Added Files:
        pkgsrc/textproc/py-jade: ALTERNATIVES DESCR Makefile PLIST distinfo
        pkgsrc/textproc/py-jade/patches: patch-pyjade_ext_django_compiler.py
            patch-pyjade_ext_django_loader.py

Log Message:
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).


To generate a diff of this commit:
cvs rdiff -u -r1.970 -r1.971 pkgsrc/textproc/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/textproc/py-jade/ALTERNATIVES \
    pkgsrc/textproc/py-jade/DESCR pkgsrc/textproc/py-jade/Makefile \
    pkgsrc/textproc/py-jade/PLIST pkgsrc/textproc/py-jade/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/textproc/py-jade/patches/patch-pyjade_ext_django_compiler.py \
    pkgsrc/textproc/py-jade/patches/patch-pyjade_ext_django_loader.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/textproc/Makefile
diff -u pkgsrc/textproc/Makefile:1.970 pkgsrc/textproc/Makefile:1.971
--- pkgsrc/textproc/Makefile:1.970      Sun Nov 26 23:38:17 2017
+++ pkgsrc/textproc/Makefile    Mon Dec 18 11:09:14 2017
@@ -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-html5lib
 SUBDIR+=       py-humanize
 SUBDIR+=       py-inflection
 SUBDIR+=       py-iniparse
+SUBDIR+=       py-jade
 SUBDIR+=       py-jellyfish
 SUBDIR+=       py-jinja2
 SUBDIR+=       py-jmespath

Added files:

Index: pkgsrc/textproc/py-jade/ALTERNATIVES
diff -u /dev/null pkgsrc/textproc/py-jade/ALTERNATIVES:1.1
--- /dev/null   Mon Dec 18 11:09:14 2017
+++ pkgsrc/textproc/py-jade/ALTERNATIVES        Mon Dec 18 11:09:14 2017
@@ -0,0 +1 @@
+bin/pyjade @PREFIX@/bin/pyjade@PYVERSSUFFIX@
Index: pkgsrc/textproc/py-jade/DESCR
diff -u /dev/null pkgsrc/textproc/py-jade/DESCR:1.1
--- /dev/null   Mon Dec 18 11:09:14 2017
+++ pkgsrc/textproc/py-jade/DESCR       Mon Dec 18 11:09:14 2017
@@ -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).
Index: pkgsrc/textproc/py-jade/Makefile
diff -u /dev/null pkgsrc/textproc/py-jade/Makefile:1.1
--- /dev/null   Mon Dec 18 11:09:14 2017
+++ pkgsrc/textproc/py-jade/Makefile    Mon Dec 18 11:09:14 2017
@@ -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"
Index: pkgsrc/textproc/py-jade/PLIST
diff -u /dev/null pkgsrc/textproc/py-jade/PLIST:1.1
--- /dev/null   Mon Dec 18 11:09:14 2017
+++ pkgsrc/textproc/py-jade/PLIST       Mon Dec 18 11:09:14 2017
@@ -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
Index: pkgsrc/textproc/py-jade/distinfo
diff -u /dev/null pkgsrc/textproc/py-jade/distinfo:1.1
--- /dev/null   Mon Dec 18 11:09:14 2017
+++ pkgsrc/textproc/py-jade/distinfo    Mon Dec 18 11:09:14 2017
@@ -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

Index: pkgsrc/textproc/py-jade/patches/patch-pyjade_ext_django_compiler.py
diff -u /dev/null pkgsrc/textproc/py-jade/patches/patch-pyjade_ext_django_compiler.py:1.1
--- /dev/null   Mon Dec 18 11:09:14 2017
+++ pkgsrc/textproc/py-jade/patches/patch-pyjade_ext_django_compiler.py Mon Dec 18 11:09:14 2017
@@ -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
Index: pkgsrc/textproc/py-jade/patches/patch-pyjade_ext_django_loader.py
diff -u /dev/null pkgsrc/textproc/py-jade/patches/patch-pyjade_ext_django_loader.py:1.1
--- /dev/null   Mon Dec 18 11:09:14 2017
+++ pkgsrc/textproc/py-jade/patches/patch-pyjade_ext_django_loader.py   Mon Dec 18 11:09:14 2017
@@ -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