Commit 6f236c2b authored by Julien Muchembled's avatar Julien Muchembled

Fix file import with Jinja2 >= 2.7

parent 90772890
2.5 (2013-08-07)
======================
* Fix file import with Jinja2 >= 2.7
2.4.3 (2013-08-02) 2.4.3 (2013-08-02)
====================== ======================
......
from setuptools import setup, find_packages from setuptools import setup, find_packages
import os import os
version = '2.4.3' version = '2.5'
name = 'slapos.recipe.template' name = 'slapos.recipe.template'
long_description = open("README.txt").read() + "\n" + \ long_description = open("README.txt").read() + "\n" + \
open(os.path.join('slapos', 'recipe', open(os.path.join('slapos', 'recipe',
...@@ -26,7 +26,7 @@ setup(name=name, ...@@ -26,7 +26,7 @@ setup(name=name,
install_requires=[ install_requires=[
'setuptools', # namespaces 'setuptools', # namespaces
'zc.buildout', # plays with buildout 'zc.buildout', # plays with buildout
'jinja2', 'jinja2 >= 2.7',
], ],
zip_safe=True, zip_safe=True,
entry_points={ entry_points={
......
...@@ -71,11 +71,10 @@ class RelaxedPrefixLoader(PrefixLoader): ...@@ -71,11 +71,10 @@ class RelaxedPrefixLoader(PrefixLoader):
""" """
Same as PrefixLoader, but accepts imports lacking separator. Same as PrefixLoader, but accepts imports lacking separator.
""" """
def get_source(self, environment, template): def get_loader(self, template):
if self.delimiter not in template: if self.delimiter not in template:
template += self.delimiter template += self.delimiter
return super(RelaxedPrefixLoader, self).get_source(environment, return super(RelaxedPrefixLoader, self).get_loader(template)
template)
class RecipeBaseLoader(BaseLoader): class RecipeBaseLoader(BaseLoader):
""" """
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment