[elbe-devel] [PATCH v2 24/24] elbeproject: dont reimplement write_pack_template
Manuel Traut
manut at linutronix.de
Thu Feb 8 14:17:10 CET 2018
Signed-off-by: Manuel Traut <manut at linutronix.de>
---
elbepack/elbeproject.py | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
index 01fac01a..1434c5e6 100644
--- a/elbepack/elbeproject.py
+++ b/elbepack/elbeproject.py
@@ -44,7 +44,7 @@ from elbepack.repomanager import ProjectRepo
from elbepack.config import cfg
from elbepack.pkgutils import extract_pkg
from elbepack.directories import (mako_template_dir, pack_dir)
-from elbepack.templates import template
+from elbepack.templates import template, write_pack_template
class IncompatibleArchitectureException(Exception):
@@ -95,17 +95,16 @@ def gen_sdk_scripts(triplet, prj_name, prj_version, builddir, sdkpath):
'sdk_title': 'ELBE %s' % prj_name,
'sdk_version': prj_version,
}
- t = os.path.join(mako_template_dir, 'toolchain-shar-extract.sh.mako')
sdkname = 'setup-elbe-sdk-%s-%s-%s.sh' % (triplet, prj_name, prj_version)
- with open(os.path.join(builddir, sdkname), 'w') as f:
- f.write(template(t, sdkvalues))
-
- t = os.path.join(mako_template_dir, 'environment-setup-elbe.mako')
+ write_pack_template(os.path.join(builddir, sdkname),
+ 'toolchain-shar-extract.sh.mako',
+ sdkvalues)
envname = 'environment-setup-elbe-%s-%s-%s' % (triplet,
prj_name,
prj_version)
- with open(os.path.join(sdkpath, envname), 'w') as f:
- f.write(template(t, sdkvalues))
+ write_pack_template(os.path.join(sdkpath, envname),
+ 'environment-setup-elbe.mako',
+ sdkvalues)
return sdkname
--
2.15.1
More information about the elbe-devel
mailing list