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(
|
py.install_sources(
|
||||||
|
'__init__.py',
|
||||||
'initHook.py',
|
'initHook.py',
|
||||||
subdir: 'coriolis/bora',
|
subdir: 'coriolis/bora',
|
||||||
)
|
)
|
||||||
|
|
|
@ -110,22 +110,9 @@ namespace Bora {
|
||||||
|
|
||||||
void BoraEngine::_runBoraInit ()
|
void BoraEngine::_runBoraInit ()
|
||||||
{
|
{
|
||||||
Utilities::Path pythonSitePackages = System::getPath("pythonSitePackages");
|
dbo_ptr<Isobar::Script> script = Isobar::Script::create( "coriolis.bora.initHook" );
|
||||||
Utilities::Path confFile = "coriolis/bora/initHook.py";
|
script->addKwArgument( "bora" , (PyObject*)PyBoraEngine_Link(this) );
|
||||||
Utilities::Path systemConfFile = pythonSitePackages / confFile;
|
script->runFunction ( "boraHook", getCell() );
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
py.install_sources(
|
py.install_sources(
|
||||||
|
'__init__.py',
|
||||||
'initHook.py',
|
'initHook.py',
|
||||||
subdir: 'coriolis/katana',
|
subdir: 'coriolis/katana',
|
||||||
)
|
)
|
||||||
|
|
|
@ -221,22 +221,9 @@ namespace Katana {
|
||||||
|
|
||||||
void KatanaEngine::_runKatanaInit ()
|
void KatanaEngine::_runKatanaInit ()
|
||||||
{
|
{
|
||||||
Utilities::Path pythonSitePackages = System::getPath( "pythonSitePackages" );
|
dbo_ptr<Isobar::Script> script = Isobar::Script::create( "coriolis.katana.initHook" );
|
||||||
Utilities::Path confFile = "coriolis/katana/initHook.py";
|
script->addKwArgument( "katana" , (PyObject*)PyKatanaEngine_Link(this) );
|
||||||
Utilities::Path systemConfFile = pythonSitePackages / confFile;
|
script->runFunction ( "katanaHook", getCell() );
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
py.install_sources(
|
py.install_sources(
|
||||||
|
'__init__.py',
|
||||||
'initHook.py',
|
'initHook.py',
|
||||||
subdir: 'coriolis/unicorn',
|
subdir: 'coriolis/unicorn',
|
||||||
)
|
)
|
||||||
|
|
|
@ -118,22 +118,9 @@ namespace Unicorn {
|
||||||
|
|
||||||
void UnicornGui::_runUnicornInit ()
|
void UnicornGui::_runUnicornInit ()
|
||||||
{
|
{
|
||||||
Utilities::Path pythonSitePackages = System::getPath("pythonSitePackages");
|
dbo_ptr<Isobar::Script> script = Isobar::Script::create( "coriolis.unicorn.initHook" );
|
||||||
Utilities::Path confFile = "coriolis/unicorn/initHook.py";
|
script->addKwArgument( "editor" , (PyObject*)PyCellViewer_Link(this) );
|
||||||
Utilities::Path systemConfFile = pythonSitePackages / confFile;
|
script->runFunction ( "unicornConfigure", getCell() );
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue