Fix linking/compile problems in the meson configuration.
* The Hurricane python module was not compiled at all. The name of Python module wrappers is a bit inconsistent: isobar --> Hurricane crlcore --> CRL anabatic --> Anabatic katana --> Katana * Use "py_mod_deps" and not only "py_deps" so the __PYTHON_MODULE__ flag is used for py.extension_module(). * In cumulus, the "cumulus" directory is not used for the installation in site-packages/coriolis/. * In designflow/pnr.py, temporarily disable Tramontana & Tutorial, until they are ported to meson.
This commit is contained in:
parent
1c657c958d
commit
1693241302
|
@ -1,3 +1,9 @@
|
||||||
|
|
||||||
|
anabatic_py = files([
|
||||||
|
'PyStyleFlags.cpp',
|
||||||
|
'PyAnabatic.cpp'
|
||||||
|
])
|
||||||
|
|
||||||
anabatic = shared_library(
|
anabatic = shared_library(
|
||||||
'anabatic',
|
'anabatic',
|
||||||
'Constants.cpp',
|
'Constants.cpp',
|
||||||
|
@ -30,18 +36,17 @@ anabatic = shared_library(
|
||||||
'AntennaProtect.cpp',
|
'AntennaProtect.cpp',
|
||||||
'PreRouteds.cpp',
|
'PreRouteds.cpp',
|
||||||
'AnabaticEngine.cpp',
|
'AnabaticEngine.cpp',
|
||||||
|
anabatic_py,
|
||||||
|
|
||||||
dependencies: [Etesian],
|
dependencies: [Etesian],
|
||||||
install: true,
|
install: true,
|
||||||
)
|
)
|
||||||
|
|
||||||
py.extension_module(
|
py.extension_module(
|
||||||
'pyanabatic',
|
'Anabatic',
|
||||||
'PyStyleFlags.cpp',
|
anabatic_py,
|
||||||
'PyAnabatic.cpp',
|
|
||||||
|
|
||||||
link_with: [anabatic],
|
link_with: [anabatic],
|
||||||
dependencies: [Etesian],
|
dependencies: [Etesian, py_mod_deps],
|
||||||
install: true,
|
install: true,
|
||||||
subdir: 'coriolis'
|
subdir: 'coriolis'
|
||||||
)
|
)
|
||||||
|
|
|
@ -61,7 +61,7 @@ py.extension_module(
|
||||||
bora_py,
|
bora_py,
|
||||||
|
|
||||||
link_with: [bora],
|
link_with: [bora],
|
||||||
dependencies: [Katana, qwt],
|
dependencies: [Katana, qwt, py_mod_deps],
|
||||||
install: true,
|
install: true,
|
||||||
subdir: 'coriolis'
|
subdir: 'coriolis'
|
||||||
)
|
)
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include <boost/program_options.hpp>
|
#include <boost/program_options.hpp>
|
||||||
#include <boost/process.hpp>
|
#include <boost/process.hpp>
|
||||||
namespace boptions = boost::program_options;
|
namespace boptions = boost::program_options;
|
||||||
|
namespace bprocess = boost::process;
|
||||||
|
|
||||||
#include "hurricane/utilities/Path.h"
|
#include "hurricane/utilities/Path.h"
|
||||||
#include "hurricane/configuration/Configuration.h"
|
#include "hurricane/configuration/Configuration.h"
|
||||||
|
@ -256,26 +257,25 @@ namespace CRL {
|
||||||
if (coriolis_top_env) {
|
if (coriolis_top_env) {
|
||||||
coriolis_top = coriolis_top_env;
|
coriolis_top = coriolis_top_env;
|
||||||
} else {
|
} else {
|
||||||
//We're running as a binary and PyCRL hasn't been instantiated
|
std::error_code rvalue;
|
||||||
// use python to find our where we should look
|
bprocess::ipstream pipeout;
|
||||||
using namespace boost::process;
|
string command = "python3 -c 'from coriolis import CRL;"
|
||||||
std::error_code ec;
|
"import os;"
|
||||||
ipstream out;
|
"print( os.path.abspath(os.path.dirname( CRL.__file__ )))'";
|
||||||
//TODO: will need fixing for windoews
|
bprocess::system( command, bprocess::std_out > pipeout, rvalue );
|
||||||
system("python3 -c 'from coriolis import CRL; import os; print(os.path.abspath(os.path.dirname(CRL.__file__)))'", std_out > out, ec);
|
if (rvalue) {
|
||||||
if (ec) {
|
cerr << "[ERROR] Unable to find coriolis python package.\n"
|
||||||
cerr << "Unable to find coriolis python package. Please set CORIOLIS_TOP environment variable\n";
|
<< " Please set CORIOLIS_TOP environment variable." << endl;
|
||||||
exit ( 1 );
|
exit( 1 );
|
||||||
}
|
}
|
||||||
|
pipeout >> coriolis_top;
|
||||||
out >> coriolis_top;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Environment variables reading.
|
// Environment variables reading.
|
||||||
boptions::options_description options ("Environment Variables");
|
boptions::options_description options ("Environment Variables");
|
||||||
options.add_options()
|
options.add_options()
|
||||||
( "coriolis_top", boptions::value<string>()->default_value(coriolis_top)
|
( "coriolis_top", boptions::value<string>()->default_value(coriolis_top)
|
||||||
, "Location of Corilois module." )
|
, "Location of Coriolis module." )
|
||||||
( "stratus_mapping_name", boptions::value<string>()
|
( "stratus_mapping_name", boptions::value<string>()
|
||||||
, "Stratus virtual cells mapping." );
|
, "Stratus virtual cells mapping." );
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ pyCRL_files = files([
|
||||||
py.extension_module(
|
py.extension_module(
|
||||||
'Constant',
|
'Constant',
|
||||||
'PyConstant.cpp',
|
'PyConstant.cpp',
|
||||||
dependencies: [qt_deps, py_deps, boost, Hurricane],
|
dependencies: [qt_deps, py_mod_deps, boost, Hurricane],
|
||||||
include_directories: crlcore_includes,
|
include_directories: crlcore_includes,
|
||||||
subdir: 'coriolis',
|
subdir: 'coriolis',
|
||||||
install: true
|
install: true
|
||||||
|
@ -39,7 +39,7 @@ pycrlcore = shared_library(
|
||||||
'pycrlcore',
|
'pycrlcore',
|
||||||
pyCRL_files,
|
pyCRL_files,
|
||||||
link_with: crlcore,
|
link_with: crlcore,
|
||||||
dependencies: [qt_deps, py_deps, boost, Hurricane],
|
dependencies: [qt_deps, boost, Hurricane],
|
||||||
include_directories: crlcore_includes,
|
include_directories: crlcore_includes,
|
||||||
install: true,
|
install: true,
|
||||||
)
|
)
|
||||||
|
@ -48,9 +48,8 @@ pycrlcore = shared_library(
|
||||||
py.extension_module(
|
py.extension_module(
|
||||||
'CRL',
|
'CRL',
|
||||||
pyCRL_files,
|
pyCRL_files,
|
||||||
cpp_args: '-D__PYTHON_MODULE__=1',
|
|
||||||
link_with: pycrlcore,
|
link_with: pycrlcore,
|
||||||
dependencies: [qt_deps, py_deps, boost, Hurricane],
|
dependencies: [qt_deps, py_mod_deps, boost, Hurricane],
|
||||||
include_directories: crlcore_includes,
|
include_directories: crlcore_includes,
|
||||||
subdir: 'coriolis',
|
subdir: 'coriolis',
|
||||||
install: true
|
install: true
|
||||||
|
|
|
@ -3,16 +3,16 @@ subdir('src/designflow')
|
||||||
subdir('src/plugins')
|
subdir('src/plugins')
|
||||||
subdir('src/tools')
|
subdir('src/tools')
|
||||||
|
|
||||||
py.install_sources(cumulus, subdir: 'coriolis/cumulus')
|
py.install_sources(cumulus, subdir: 'coriolis')
|
||||||
py.install_sources(designflow, subdir: 'coriolis/cumulus/designflow')
|
py.install_sources(designflow, subdir: 'coriolis/designflow')
|
||||||
py.install_sources(plugins, subdir: 'coriolis/cumulus/plugins')
|
py.install_sources(plugins, subdir: 'coriolis/plugins')
|
||||||
py.install_sources(block, subdir: 'coriolis/cumulus/plugins/block')
|
py.install_sources(block, subdir: 'coriolis/plugins/block')
|
||||||
py.install_sources(chip, subdir: 'coriolis/cumulus/plugins/chip')
|
py.install_sources(chip, subdir: 'coriolis/plugins/chip')
|
||||||
py.install_sources(core2chip, subdir: 'coriolis/cumulus/plugins/core2chip')
|
py.install_sources(core2chip, subdir: 'coriolis/plugins/core2chip')
|
||||||
py.install_sources(harness, subdir: 'coriolis/cumulus/plugins/harness')
|
py.install_sources(harness, subdir: 'coriolis/plugins/harness')
|
||||||
py.install_sources(macro, subdir: 'coriolis/cumulus/plugins/macro')
|
py.install_sources(macro, subdir: 'coriolis/plugins/macro')
|
||||||
py.install_sources(sram, subdir: 'coriolis/cumulus/plugins/sram')
|
py.install_sources(sram, subdir: 'coriolis/plugins/sram')
|
||||||
py.install_sources(tools, subdir: 'coriolis/cumulus/tools')
|
py.install_sources(tools, subdir: 'coriolis/tools')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,8 @@ class PnR ( FlowTask ):
|
||||||
else:
|
else:
|
||||||
print( 'PnR.doTask() run in interactive CGT mode.' )
|
print( 'PnR.doTask() run in interactive CGT mode.' )
|
||||||
PnR.textMode = False
|
PnR.textMode = False
|
||||||
from .. import Etesian, Anabatic, Katana, Bora, Tramontana, Tutorial, Viewer, Unicorn
|
#from .. import Etesian, Anabatic, Katana, Bora, Tramontana, Tutorial, Viewer, Unicorn
|
||||||
|
from .. import Etesian, Anabatic, Katana, Bora, Viewer, Unicorn
|
||||||
|
|
||||||
ShellEnv().export()
|
ShellEnv().export()
|
||||||
if self.script and not callable(self.script):
|
if self.script and not callable(self.script):
|
||||||
|
@ -85,9 +86,9 @@ class PnR ( FlowTask ):
|
||||||
unicorn.setApplicationName ( 'cgt')
|
unicorn.setApplicationName ( 'cgt')
|
||||||
unicorn.registerTool ( Etesian.GraphicEtesianEngine.grab() )
|
unicorn.registerTool ( Etesian.GraphicEtesianEngine.grab() )
|
||||||
unicorn.registerTool ( Katana.GraphicKatanaEngine.grab() )
|
unicorn.registerTool ( Katana.GraphicKatanaEngine.grab() )
|
||||||
unicorn.registerTool ( Tramontana.GraphicTramontanaEngine.grab() )
|
#unicorn.registerTool ( Tramontana.GraphicTramontanaEngine.grab() )
|
||||||
unicorn.registerTool ( Bora.GraphicBoraEngine.grab() )
|
unicorn.registerTool ( Bora.GraphicBoraEngine.grab() )
|
||||||
unicorn.registerTool ( Tutorial.GraphicTutorialEngine.grab() )
|
#unicorn.registerTool ( Tutorial.GraphicTutorialEngine.grab() )
|
||||||
#unicorn.setAnonNetSelectable(False)
|
#unicorn.setAnonNetSelectable(False)
|
||||||
unicorn.setLayerVisible ( "grid" , False );
|
unicorn.setLayerVisible ( "grid" , False );
|
||||||
unicorn.setLayerVisible ( "text.instance" , False );
|
unicorn.setLayerVisible ( "text.instance" , False );
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
cumulus = files([
|
cumulus = files([
|
||||||
'__init__.py'
|
'__init__.py'
|
||||||
])
|
])
|
||||||
|
|
|
@ -78,7 +78,7 @@ class Configuration ( object ):
|
||||||
self.onLepka = False
|
self.onLepka = False
|
||||||
self.onDocker = False
|
self.onDocker = False
|
||||||
hostname = socket.gethostname()
|
hostname = socket.gethostname()
|
||||||
if hostname.startswith('lepka'): self.onLepka = True
|
if hostname.startswith('lepka'): self.onLepka = False
|
||||||
else: self.onDocker = True
|
else: self.onDocker = True
|
||||||
scriptDir = os.path.abspath(os.getcwd())
|
scriptDir = os.path.abspath(os.getcwd())
|
||||||
if scriptDir.endswith( 'coriolis/documentation' ) and not self.onLepka:
|
if scriptDir.endswith( 'coriolis/documentation' ) and not self.onLepka:
|
||||||
|
|
|
@ -5,6 +5,12 @@ etesian_mocs = qt.compile_moc(
|
||||||
dependencies: [Hurricane, CrlCore, Coloquinte],
|
dependencies: [Hurricane, CrlCore, Coloquinte],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
etesian_py = files([
|
||||||
|
'PyEtesian.cpp',
|
||||||
|
'PyEtesianEngine.cpp',
|
||||||
|
'PyGraphicEtesianEngine.cpp',
|
||||||
|
])
|
||||||
|
|
||||||
etesian = shared_library(
|
etesian = shared_library(
|
||||||
'etesian',
|
'etesian',
|
||||||
'Configuration.cpp',
|
'Configuration.cpp',
|
||||||
|
@ -18,6 +24,7 @@ etesian = shared_library(
|
||||||
'BloatProperty.cpp',
|
'BloatProperty.cpp',
|
||||||
'EtesianEngine.cpp',
|
'EtesianEngine.cpp',
|
||||||
'GraphicEtesianEngine.cpp',
|
'GraphicEtesianEngine.cpp',
|
||||||
|
etesian_py,
|
||||||
etesian_mocs,
|
etesian_mocs,
|
||||||
dependencies: [Hurricane, CrlCore, Coloquinte],
|
dependencies: [Hurricane, CrlCore, Coloquinte],
|
||||||
install: true,
|
install: true,
|
||||||
|
@ -25,12 +32,9 @@ etesian = shared_library(
|
||||||
|
|
||||||
py.extension_module(
|
py.extension_module(
|
||||||
'Etesian',
|
'Etesian',
|
||||||
'PyEtesian.cpp',
|
etesian_py,
|
||||||
'PyEtesianEngine.cpp',
|
link_with: [configuration, etesian],
|
||||||
'PyGraphicEtesianEngine.cpp',
|
dependencies: [py_mod_deps, Hurricane, CrlCore, Coloquinte],
|
||||||
|
|
||||||
link_with: [configuration],
|
|
||||||
dependencies: [Hurricane, CrlCore, Coloquinte],
|
|
||||||
install: true,
|
install: true,
|
||||||
subdir: 'coriolis'
|
subdir: 'coriolis'
|
||||||
)
|
)
|
||||||
|
|
|
@ -20,7 +20,7 @@ flute = shared_library(
|
||||||
py.extension_module(
|
py.extension_module(
|
||||||
'Flute',
|
'Flute',
|
||||||
'PyFlute.cpp',
|
'PyFlute.cpp',
|
||||||
dependencies: [py_deps, Hurricane, CrlCore],
|
dependencies: [py_mod_deps, Hurricane, CrlCore],
|
||||||
include_directories: flute_includes,
|
include_directories: flute_includes,
|
||||||
subdir: 'coriolis',
|
subdir: 'coriolis',
|
||||||
install: true
|
install: true
|
||||||
|
|
|
@ -90,4 +90,13 @@ isobar = library(
|
||||||
install: true,
|
install: true,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
py.extension_module(
|
||||||
|
'Hurricane',
|
||||||
|
isobar_sources,
|
||||||
|
dependencies: [qt_deps, py_deps, boost],
|
||||||
|
link_with: [isobar, hurricane],
|
||||||
|
include_directories: hurricane_includes,
|
||||||
|
install: true,
|
||||||
|
subdir: 'coriolis'
|
||||||
|
)
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ py.extension_module(
|
||||||
katana_py,
|
katana_py,
|
||||||
|
|
||||||
link_with: [katana],
|
link_with: [katana],
|
||||||
dependencies: [Anabatic],
|
dependencies: [py_mod_deps, Anabatic],
|
||||||
install: true,
|
install: true,
|
||||||
subdir: 'coriolis'
|
subdir: 'coriolis'
|
||||||
)
|
)
|
||||||
|
|
|
@ -37,7 +37,7 @@ py.extension_module(
|
||||||
unicorn_py,
|
unicorn_py,
|
||||||
|
|
||||||
link_with: [unicorn],
|
link_with: [unicorn],
|
||||||
dependencies: [Katana],
|
dependencies: [py_mod_deps,Katana],
|
||||||
install: true,
|
install: true,
|
||||||
subdir: 'coriolis'
|
subdir: 'coriolis'
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue