cmake: move jinja2 check to Python modules

This removes the cmake check for jinja2 and moves it to the respective
Python scripts.
This commit is contained in:
Julian Oes
2020-01-16 16:25:26 +01:00
parent b04f68553e
commit c77816aef2
4 changed files with 22 additions and 83 deletions
+12 -1
View File
@@ -6,7 +6,18 @@ from __future__ import print_function
import xml.etree.ElementTree as ET
import codecs
import argparse
from jinja2 import Environment, FileSystemLoader
import sys
try:
from jinja2 import Environment, FileSystemLoader
except ImportError as e:
print("Failed to import jinja2: " + e)
print("")
print("You may need to install it using:")
print(" pip3 install --user jinja2")
print("")
sys.exit(1)
import os
def generate(xml_file, dest='.'):