From 163a913a226cca335544231da5051562891c286b Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Sun, 29 Aug 2010 03:19:48 +0000 Subject: Make sure components execute in the correct contribution directory and fix support for Python relative module imports. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@990483 13f79535-47bb-0310-9956-ffa450edef68 --- sca-cpp/trunk/modules/python/mod-python.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sca-cpp/trunk/modules/python/mod-python.hpp') diff --git a/sca-cpp/trunk/modules/python/mod-python.hpp b/sca-cpp/trunk/modules/python/mod-python.hpp index d13f2227ab..0121779530 100644 --- a/sca-cpp/trunk/modules/python/mod-python.hpp +++ b/sca-cpp/trunk/modules/python/mod-python.hpp @@ -62,11 +62,12 @@ struct applyImplementation { * lambda function. */ const failable&)> > evalImplementation(const string& path, const value& impl, const list& px) { - const string fpath(path + attributeValue("script", impl)); + const string spath(attributeValue("script", impl)); + const string fpath(path + spath); ifstream is(fpath); if (fail(is)) return mkfailure&)> >(string("Could not read implementation: ") + fpath); - const failable script = python::readScript(fpath, is); + const failable script = python::readScript(python::moduleName(spath), fpath, is); if (!hasContent(script)) return mkfailure&)> >(reason(script)); return lambda&)>(applyImplementation(content(script), px)); -- cgit v1.2.3