Fix the loading of initHook.py, use Python loading mechanism directly.
This commit is contained in:
parent
b17222e049
commit
8b40b6ecae
|
@ -1,4 +1,5 @@
|
|||
py.install_sources(
|
||||
'__init__.py',
|
||||
'initHook.py',
|
||||
subdir: 'coriolis/bora',
|
||||
)
|
||||
|
|
|
@ -110,22 +110,9 @@ namespace Bora {
|
|||
|
||||
void BoraEngine::_runBoraInit ()
|
||||
{
|
||||
Utilities::Path pythonSitePackages = System::getPath("pythonSitePackages");
|
||||
Utilities::Path confFile = "coriolis/bora/initHook.py";
|
||||
Utilities::Path systemConfFile = pythonSitePackages / confFile;
|
||||
|
||||
if (systemConfFile.exists()) {
|
||||
//Isobar::Script::addPath( systemConfDir.toString() );
|
||||
|
||||
dbo_ptr<Isobar::Script> script = Isobar::Script::create( confFile.toPyModPath() );
|
||||
script->addKwArgument( "bora" , (PyObject*)PyBoraEngine_Link(this) );
|
||||
script->runFunction ( "boraHook", getCell() );
|
||||
|
||||
//Isobar::Script::removePath( systemConfDir.toString() );
|
||||
} else {
|
||||
cerr << Warning( "Bora system configuration file:\n <%s> not found."
|
||||
, systemConfFile.toString().c_str() ) << endl;
|
||||
}
|
||||
dbo_ptr<Isobar::Script> script = Isobar::Script::create( "coriolis.bora.initHook" );
|
||||
script->addKwArgument( "bora" , (PyObject*)PyBoraEngine_Link(this) );
|
||||
script->runFunction ( "boraHook", getCell() );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
py.install_sources(
|
||||
'__init__.py',
|
||||
'initHook.py',
|
||||
subdir: 'coriolis/katana',
|
||||
)
|
||||
|
|
|
@ -221,22 +221,9 @@ namespace Katana {
|
|||
|
||||
void KatanaEngine::_runKatanaInit ()
|
||||
{
|
||||
Utilities::Path pythonSitePackages = System::getPath( "pythonSitePackages" );
|
||||
Utilities::Path confFile = "coriolis/katana/initHook.py";
|
||||
Utilities::Path systemConfFile = pythonSitePackages / confFile;
|
||||
|
||||
if (systemConfFile.exists()) {
|
||||
//Isobar::Script::addPath( systemConfDir.toString() );
|
||||
|
||||
dbo_ptr<Isobar::Script> script = Isobar::Script::create( confFile.toPyModPath() );
|
||||
script->addKwArgument( "katana" , (PyObject*)PyKatanaEngine_Link(this) );
|
||||
script->runFunction ( "katanaHook", getCell() );
|
||||
|
||||
//Isobar::Script::removePath( systemConfDir.toString() );
|
||||
} else {
|
||||
cerr << Warning( "Katana system configuration file:\n <%s> not found."
|
||||
, systemConfFile.toString().c_str() ) << endl;
|
||||
}
|
||||
dbo_ptr<Isobar::Script> script = Isobar::Script::create( "coriolis.katana.initHook" );
|
||||
script->addKwArgument( "katana" , (PyObject*)PyKatanaEngine_Link(this) );
|
||||
script->runFunction ( "katanaHook", getCell() );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
py.install_sources(
|
||||
'__init__.py',
|
||||
'initHook.py',
|
||||
subdir: 'coriolis/unicorn',
|
||||
)
|
||||
|
|
|
@ -118,22 +118,9 @@ namespace Unicorn {
|
|||
|
||||
void UnicornGui::_runUnicornInit ()
|
||||
{
|
||||
Utilities::Path pythonSitePackages = System::getPath("pythonSitePackages");
|
||||
Utilities::Path confFile = "coriolis/unicorn/initHook.py";
|
||||
Utilities::Path systemConfFile = pythonSitePackages / confFile;
|
||||
|
||||
if (systemConfFile.exists()) {
|
||||
//Isobar::Script::addPath( systemConfDir.toString() );
|
||||
|
||||
dbo_ptr<Isobar::Script> script = Isobar::Script::create( confFile.toPyModPath() );
|
||||
script->addKwArgument( "editor" , (PyObject*)PyCellViewer_Link(this) );
|
||||
script->runFunction ( "unicornConfigure", getCell() );
|
||||
|
||||
//Isobar::Script::removePath( systemConfDir.toString() );
|
||||
} else {
|
||||
cerr << Warning("Unicorn system configuration file:\n <%s> not found."
|
||||
,systemConfFile.toString().c_str()) << endl;
|
||||
}
|
||||
dbo_ptr<Isobar::Script> script = Isobar::Script::create( "coriolis.unicorn.initHook" );
|
||||
script->addKwArgument( "editor" , (PyObject*)PyCellViewer_Link(this) );
|
||||
script->runFunction ( "unicornConfigure", getCell() );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue