Edward, you're right, markupsafe is needed by Jinja2, in a clean virtualenv it wasn't installed. The deb package doesn't expose this problem, because python-jinja2 explicitly depends on python-markupsafe.
This is weird, because jinja2 defined markupsafe as a dependency[0]
(maas-deployer)freyes@alienware:~/Projects/maas-deployer$ maas-deployer -h
Traceback (most recent call last):
File "/home/freyes/.virtualenvs/maas-deployer/bin/maas-deployer", line 9, in <module>
load_entry_point('maas-deployer==0.0.1', 'console_scripts', 'maas-deployer')()
File "/home/freyes/.virtualenvs/maas-deployer/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 558, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/home/freyes/.virtualenvs/maas-deployer/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2682, in load_entry_point
return ep.load()
File "/home/freyes/.virtualenvs/maas-deployer/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2355, in load
return self.resolve()
File "/home/freyes/.virtualenvs/maas-deployer/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2361, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "build/bdist.linux-x86_64/egg/maas_deployer/cli.py", line 25, in <module>
File "build/bdist.linux-x86_64/egg/maas_deployer/vmaas/engine.py", line 17, in <module>
File "build/bdist.linux-x86_64/egg/maas_deployer/vmaas/vm.py", line 21, in <module>
File "build/bdist.linux-x86_64/egg/maas_deployer/vmaas/template.py", line 5, in <module>
File "/home/freyes/.virtualenvs/maas-deployer/local/lib/python2.7/site-packages/jinja2/__init__.py", line 33, in <module>
from jinja2.environment import Environment, Template
File "/home/freyes/.virtualenvs/maas-deployer/local/lib/python2.7/site-packages/jinja2/environment.py", line 13, in <module>
from jinja2 import nodes
File "/home/freyes/.virtualenvs/maas-deployer/local/lib/python2.7/site-packages/jinja2/nodes.py", line 19, in <module>
from jinja2.utils import Markup
File "/home/freyes/.virtualenvs/maas-deployer/local/lib/python2.7/site-packages/jinja2/utils.py", line 531, in <module>
from markupsafe import Markup, escape, soft_unicode
ImportError: No module named markupsafe
I'll drop the other MP and update this one to just include pyyaml.
Edward, you're right, markupsafe is needed by Jinja2, in a clean virtualenv it wasn't installed. The deb package doesn't expose this problem, because python-jinja2 explicitly depends on python-markupsafe.
This is weird, because jinja2 defined markupsafe as a dependency[0]
(maas-deployer)freyes@alienware:~/Projects/maas-deployer$ maas-deployer -hfreyes/.virtualenvs/maas-deployer/bin/maas-deployer", line 9, in <module>entry_point('maas-deployer==0.0.1', 'console_scripts', 'maas-deployer')()freyes/.virtualenvs/maas-deployer/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 558, in load_entry_pointn(dist).load_entry_point(group, name)freyes/.virtualenvs/maas-deployer/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2682, in load_entry_pointfreyes/.virtualenvs/maas-deployer/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2355, in loadfreyes/.virtualenvs/maas-deployer/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2361, in resolve_(self.module_name, fromlist=['__name__'], level=0)bdist.linux-x86_64/egg/maas_deployer/cli.py", line 25, in <module>bdist.linux-x86_64/egg/maas_deployer/vmaas/engine.py", line 17, in <module>bdist.linux-x86_64/egg/maas_deployer/vmaas/vm.py", line 21, in <module>bdist.linux-x86_64/egg/maas_deployer/vmaas/template.py", line 5, in <module>freyes/.virtualenvs/maas-deployer/local/lib/python2.7/site-packages/jinja2/__init__.py", line 33, in <module>freyes/.virtualenvs/maas-deployer/local/lib/python2.7/site-packages/jinja2/environment.py", line 13, in <module>freyes/.virtualenvs/maas-deployer/local/lib/python2.7/site-packages/jinja2/nodes.py", line 19, in <module>freyes/.virtualenvs/maas-deployer/local/lib/python2.7/site-packages/jinja2/utils.py", line 531, in <module>
Traceback (most recent call last):
File "/home/
load_
File "/home/
return get_distributio
File "/home/
return ep.load()
File "/home/
return self.resolve()
File "/home/
module = __import_
File "build/
File "build/
File "build/
File "build/
File "/home/
from jinja2.environment import Environment, Template
File "/home/
from jinja2 import nodes
File "/home/
from jinja2.utils import Markup
File "/home/
from markupsafe import Markup, escape, soft_unicode
ImportError: No module named markupsafe
I'll drop the other MP and update this one to just include pyyaml.
[0] https://github.com/mitsuhiko/jinja2/blob/master/setup.py#L70