Adapt Nix code to Python 3 switch.

This commit also reduces the diff by not removing
some (unnecessary) error handling.
This commit is contained in:
Las Safin 2021-10-26 20:10:05 +00:00
commit 6e5c03434a
1334 changed files with 18306 additions and 7485 deletions

View File

@ -7,6 +7,7 @@
option(BUILD_DOC "Build the documentation (doxygen)" OFF) option(BUILD_DOC "Build the documentation (doxygen)" OFF)
option(CHECK_DATABASE "Run database in full check mode (very slow)" OFF) option(CHECK_DATABASE "Run database in full check mode (very slow)" OFF)
option(USE_LIBBFD "Link with BFD libraries to print stack traces" OFF)
cmake_minimum_required(VERSION 2.8.9) cmake_minimum_required(VERSION 2.8.9)
@ -18,10 +19,9 @@
setup_boost() setup_boost()
setup_qt() setup_qt()
find_package(PythonLibs 2 REQUIRED) find_package(Python 3 REQUIRED COMPONENTS Interpreter Development)
find_package(PythonSitePackages REQUIRED) find_package(PythonSitePackages REQUIRED)
find_package(FLUTE REQUIRED) find_package(FLUTE REQUIRED)
find_package(VLSISAPD REQUIRED)
find_package(HURRICANE REQUIRED) find_package(HURRICANE REQUIRED)
find_package(CORIOLIS REQUIRED) find_package(CORIOLIS REQUIRED)
find_package(ETESIAN REQUIRED) find_package(ETESIAN REQUIRED)

View File

@ -1109,12 +1109,17 @@ namespace Anabatic {
} }
EtesianEngine* etesian = static_cast<EtesianEngine*> EtesianEngine* etesian = static_cast<EtesianEngine*>
( ToolEngine::get( getCell(), EtesianEngine::staticGetName() )); ( ToolEngine::get( getCell(), EtesianEngine::staticGetName() ));
DbU::Unit segmentMaxWL = etesian->getAntennaDiodeMaxWL() / 2;
if (not etesian->getDiodeCell()) { if (not etesian->getDiodeCell()) {
cerr << Warning( "AnabaticEngine::antennaProtect(): No diode cell found, skipped." ) << endl; cerr << Warning( "AnabaticEngine::antennaProtect(): No diode cell found, skipped." ) << endl;
return; return;
} }
if (etesian->getAntennaDiodeMaxWL() <= 0) {
cerr << Warning( "AnabaticEngine::antennaProtect(): Maximum antenna diode WL not set, skipped." ) << endl;
return;
}
DbU::Unit segmentMaxWL = etesian->getAntennaDiodeMaxWL() / 2;
cmess1 << " o Antenna effect protection." << endl; cmess1 << " o Antenna effect protection." << endl;
startMeasures(); startMeasures();

View File

@ -12,7 +12,7 @@ endif ( CHECK_DETERMINISM )
${FLUTE_INCLUDE_DIR} ${FLUTE_INCLUDE_DIR}
${Boost_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}
${QtX_INCLUDE_DIR} ${QtX_INCLUDE_DIR}
${PYTHON_INCLUDE_PATH} ${Python_INCLUDE_DIRS}
) )
set( includes anabatic/Constants.h set( includes anabatic/Constants.h
anabatic/Configuration.h anabatic/Configuration.h
@ -86,7 +86,7 @@ endif ( CHECK_DETERMINISM )
${QtX_LIBRARIES} ${QtX_LIBRARIES}
${Boost_LIBRARIES} ${Boost_LIBRARIES}
${LIBXML2_LIBRARIES} ${LIBXML2_LIBRARIES}
${PYTHON_LIBRARIES} -lutil ${Python_LIBRARIES} -lutil
) )
add_library( anabatic ${cpps} ) add_library( anabatic ${cpps} )

View File

@ -17,7 +17,7 @@
#include <iostream> #include <iostream>
#include <iomanip> #include <iomanip>
#include <vector> #include <vector>
#include "vlsisapd/configuration/Configuration.h" #include "hurricane/configuration/Configuration.h"
#include "hurricane/Warning.h" #include "hurricane/Warning.h"
#include "hurricane/Error.h" #include "hurricane/Error.h"
#include "hurricane/Technology.h" #include "hurricane/Technology.h"

View File

@ -298,6 +298,7 @@ namespace Anabatic {
, _contacts () , _contacts ()
, _depth (Session::getRoutingGauge()->getDepth()) , _depth (Session::getRoutingGauge()->getDepth())
, _pinDepth (0) , _pinDepth (0)
, _satProcessed (0)
, _rpCount (0) , _rpCount (0)
, _blockages (new DbU::Unit [_depth]) , _blockages (new DbU::Unit [_depth])
, _cDensity (0.0) , _cDensity (0.0)

View File

@ -368,10 +368,13 @@ namespace Anabatic {
if (not finished) { if (not finished) {
optimized = gcell->stepNetDesaturate( depth, globalNets, invalidateds ); optimized = gcell->stepNetDesaturate( depth, globalNets, invalidateds );
gcell->setSatProcessed( depth );
if (optimized) { if (optimized) {
for ( GCell* gcell : invalidateds ) { for ( GCell* gcell : invalidateds ) {
queue.push( gcell->cloneKey(depth) ); if (not gcell->isSatProcessed(depth))
queue.push( gcell->cloneKey(depth) );
} }
invalidateds.clear();
} }
} }
} }
@ -830,7 +833,7 @@ namespace Anabatic {
cmess1 << " o Balance Global Density " cmess1 << " o Balance Global Density "
<< Session::getRoutingGauge()->getRoutingLayer(depth)->getName() << endl; << Session::getRoutingGauge()->getRoutingLayer(depth)->getName() << endl;
GCellDensitySet queue ( depth, getGCells()) ); GCellDensitySet queue ( depth, getGCells() );
GCell::Set invalidateds; GCell::Set invalidateds;
bool optimized = true; bool optimized = true;

View File

@ -55,17 +55,32 @@ extern "C" {
}; };
static PyModuleDef PyAnabatic_ModuleDef =
{ PyModuleDef_HEAD_INIT
, "Anabatic" /* m_name */
, "Low level database for global & detailed routing."
/* m_doc */
, -1 /* m_size */
, PyAnabatic_Methods /* m_methods */
, NULL /* m_reload */
, NULL /* m_traverse */
, NULL /* m_clear */
, NULL /* m_free */
};
// --------------------------------------------------------------- // ---------------------------------------------------------------
// Module Initialization : "initAnabatic ()" // Module Initialization : "initAnabatic ()"
DL_EXPORT(void) initAnabatic () { PyMODINIT_FUNC PyInit_Anabatic ( void )
cdebug_log(32,0) << "initAnabatic()" << endl; {
cdebug_log(32,0) << "PyInit_Anabatic()" << endl;
PyObject* module = Py_InitModule( "Anabatic", PyAnabatic_Methods ); PyObject* module = PyModule_Create( &PyAnabatic_ModuleDef );
if (module == NULL) { if (module == NULL) {
cerr << "[ERROR]\n" cerr << "[ERROR]\n"
<< " Failed to initialize Anabatic module." << endl; << " Failed to initialize Anabatic module." << endl;
return; return NULL;
} }
PyObject* dictionnary = PyModule_GetDict(module); PyObject* dictionnary = PyModule_GetDict(module);
@ -77,6 +92,8 @@ extern "C" {
LoadObjectConstant( dictionnary,EngineLayerAssignByTrunk ,"EngineLayerAssignByTrunk" ); LoadObjectConstant( dictionnary,EngineLayerAssignByTrunk ,"EngineLayerAssignByTrunk" );
LoadObjectConstant( dictionnary,EngineLayerAssignNoGlobalM2V,"EngineLayerAssignNoGlobalM2V" ); LoadObjectConstant( dictionnary,EngineLayerAssignNoGlobalM2V,"EngineLayerAssignNoGlobalM2V" );
LoadObjectConstant( dictionnary,EngineNoNetLayerAssign ,"EngineNoNetLayerAssign" ); LoadObjectConstant( dictionnary,EngineNoNetLayerAssign ,"EngineNoNetLayerAssign" );
return module;
} }

View File

@ -140,6 +140,7 @@ namespace Anabatic {
public: public:
static GCell* create ( AnabaticEngine* ); static GCell* create ( AnabaticEngine* );
public: public:
inline bool isSatProcessed ( size_t depth ) const;
inline bool isSaturated () const; inline bool isSaturated () const;
bool isSaturated ( size_t depth ) const; bool isSaturated ( size_t depth ) const;
inline bool isInvalidated () const; inline bool isInvalidated () const;
@ -257,6 +258,7 @@ namespace Anabatic {
size_t checkDensity () const; size_t checkDensity () const;
bool checkEdgeSaturation ( size_t hreserved, size_t vreserved) const; bool checkEdgeSaturation ( size_t hreserved, size_t vreserved) const;
void setType ( Flags ); void setType ( Flags );
inline void setSatProcessed ( size_t depth );
void addBlockage ( size_t depth, DbU::Unit ); void addBlockage ( size_t depth, DbU::Unit );
inline void addHSegment ( AutoSegment* ); inline void addHSegment ( AutoSegment* );
inline void addVSegment ( AutoSegment* ); inline void addVSegment ( AutoSegment* );
@ -334,6 +336,7 @@ namespace Anabatic {
vector<AutoContact*> _contacts; vector<AutoContact*> _contacts;
size_t _depth; size_t _depth;
size_t _pinDepth; size_t _pinDepth;
uint32_t _satProcessed;
int _rpCount; int _rpCount;
DbU::Unit* _blockages; DbU::Unit* _blockages;
float _cDensity; float _cDensity;
@ -486,6 +489,12 @@ namespace Anabatic {
inline void GCell::addContact ( AutoContact* contact ) inline void GCell::addContact ( AutoContact* contact )
{ _flags |= Flags::Invalidated; _contacts.push_back(contact); } { _flags |= Flags::Invalidated; _contacts.push_back(contact); }
inline bool GCell::isSatProcessed ( size_t depth ) const
{ return (_satProcessed & (1 << depth)); }
inline void GCell::setSatProcessed ( size_t depth )
{ _satProcessed |= (1 << depth); }
inline bool operator< ( const GCell& lhs, const GCell& rhs ) inline bool operator< ( const GCell& lhs, const GCell& rhs )
{ {

View File

@ -3,14 +3,15 @@
set(CMAKE_LEGACY_CYGWIN_WIN32 0) set(CMAKE_LEGACY_CYGWIN_WIN32 0)
project(Bootstrap) project(Bootstrap)
cmake_minimum_required(VERSION 2.4.0) cmake_minimum_required(VERSION 2.8.0)
set(ignoreVariables "${BUILD_DOC} ${CMAKE_INSTALL_DIR}") set(ignoreVariables USE_LIBBFD "${BUILD_DOC} ${CMAKE_INSTALL_DIR}")
add_subdirectory(cmake_modules) add_subdirectory(cmake_modules)
list(INSERT CMAKE_MODULE_PATH 0 "${Bootstrap_SOURCE_DIR}/cmake_modules/") list(INSERT CMAKE_MODULE_PATH 0 "${Bootstrap_SOURCE_DIR}/cmake_modules/")
find_package(Bootstrap REQUIRED) find_package(Bootstrap REQUIRED)
find_package(Python 3 REQUIRED COMPONENTS Interpreter Development )
find_package(PythonSitePackages REQUIRED) find_package(PythonSitePackages REQUIRED)
print_cmake_module_path() print_cmake_module_path()
@ -23,7 +24,7 @@
OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE) OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE)
install(DIRECTORY builder install(DIRECTORY builder
DESTINATION ${PYTHON_SITE_PACKAGES} ) DESTINATION ${Python_CORIOLISLIB} )
install(FILES ccb.py install(FILES ccb.py
DESTINATION bin DESTINATION bin

View File

@ -15,7 +15,6 @@ projects = [
, 'tools' : [ "bootstrap" , 'tools' : [ "bootstrap"
, "lefdef" , "lefdef"
, "coloquinte" , "coloquinte"
, "vlsisapd"
, "hurricane" , "hurricane"
, "crlcore" , "crlcore"
, "flute" , "flute"

View File

@ -2,98 +2,88 @@
# -*- mode:Python -*- # -*- mode:Python -*-
# #
# This file is part of the Coriolis Software. # This file is part of the Coriolis Software.
# Copyright (c) UPMC/LIP6 2012-2018, All Rights Reserved # Copyright (c) Sorbonne Université 2012-2021, All Rights Reserved
# #
# +-----------------------------------------------------------------+ # +-----------------------------------------------------------------+
# | C O R I O L I S | # | C O R I O L I S |
# | C o r i o l i s / C h a m s B u i l d e r | # | T o o l c h a i n B u i l d e r |
# | | # | |
# | Author : Jean-Paul Chaput | # | Author : Jean-Paul Chaput |
# | E-mail : Jean-Paul.Chaput@asim.lip6.fr | # | E-mail : Jean-Paul.Chaput@lip6.fr |
# | =============================================================== | # | =============================================================== |
# | Python : "./builder/AboutWidget.py" | # | Python : "./builder/AboutWidget.py" |
# +-----------------------------------------------------------------+ # +-----------------------------------------------------------------+
from PyQt4.QtCore import Qt from PyQt4.QtCore import Qt
from PyQt4.QtGui import QPalette from PyQt4.QtGui import QPalette, QColor, QFont, QWidget, \
from PyQt4.QtGui import QColor QFrame, QLabel, QVBoxLayout, QAction, \
from PyQt4.QtGui import QFont QKeySequence, QApplication
from PyQt4.QtGui import QWidget
from PyQt4.QtGui import QFrame
from PyQt4.QtGui import QLabel
from PyQt4.QtGui import QVBoxLayout
from PyQt4.QtGui import QAction
from PyQt4.QtGui import QKeySequence
from PyQt4.QtGui import QApplication
class AboutWidget ( QWidget ): class AboutWidget ( QWidget ):
def __init__ ( self, parent=None ): def __init__ ( self, parent=None ):
QWidget.__init__ ( self, parent ) QWidget.__init__ ( self, parent )
self.setFixedSize( 500, 400 ) self.setFixedSize( 500, 400 )
self.setStyleSheet( 'background-color: #ffffdd;' ) self.setStyleSheet( 'background-color: #ffffdd;' )
topLine = QFrame() topLine = QFrame()
topLine.setFrameShape( QFrame.HLine ) topLine.setFrameShape( QFrame.HLine )
topLine.setLineWidth ( 2 ) topLine.setLineWidth ( 2 )
botLine = QFrame() botLine = QFrame()
botLine.setFrameShape( QFrame.HLine ) botLine.setFrameShape( QFrame.HLine )
botLine.setLineWidth ( 2 ) botLine.setLineWidth ( 2 )
title = QLabel( 'CCB' ) title = QLabel( 'CCB' )
title.setAlignment( Qt.AlignCenter ) title.setAlignment( Qt.AlignCenter )
font = title.font() font = title.font()
font.setPointSize( 72 ) font.setPointSize( 72 )
font.setWeight ( QFont.Bold ) font.setWeight ( QFont.Bold )
title.setFont( font ) title.setFont( font )
subTitle = QLabel( 'Coriolis & Chams Builder for the Dummies' ) subTitle = QLabel( 'Coriolis Toolchain Builder for the Dummies' )
subTitle.setAlignment( Qt.AlignCenter ) subTitle.setAlignment( Qt.AlignCenter )
subTitle.setFont( QFont('Courier',10,QFont.Bold) ) subTitle.setFont( QFont('Courier',10,QFont.Bold) )
authors = QLabel( 'Coriolis CAD System 3.0 . . . . . . . . ccb 1.0\n'
'Copyright (c) 2008-2021 . . Sorbonne Universite\n'
'Authors . . . . . . . . . . . . . Damien Dupuis\n'
' . . . . . . . . . . . . Jean-Paul Chaput\n'
'E-Mail . . . . . . . . Jean-Paul.Chaput@lip6.fr'
)
authors.setAlignment( Qt.AlignCenter )
authors.setFont( QFont('Courier',10,QFont.Bold) )
authors = QLabel( 'Coriolis CAD System 1.0 . . . . . . . . ccb 1.0\n' vLayout = QVBoxLayout()
'Copyright (c) 2008-2016 . . . . . . . . . . UPMC\n' vLayout.addStretch(10)
'Authors . . . . . . . . . . . . . Damien Dupuis\n' vLayout.addWidget( topLine )
' . . . . . . . . . . . . Jean-Paul Chaput\n' vLayout.addWidget( title )
'E-Mail . . . . . . . . Jean-Paul.Chaput@lip6.fr' vLayout.addStretch(1)
) vLayout.addWidget( subTitle )
authors.setAlignment( Qt.AlignCenter ) vLayout.addWidget( authors )
authors.setFont( QFont('Courier',10,QFont.Bold) ) vLayout.addStretch(1)
vLayout.addWidget( botLine )
vLayout.addStretch(10)
vLayout = QVBoxLayout() frame = QFrame()
vLayout.addStretch(10) frame.setFrameShape ( QFrame.Box )
vLayout.addWidget( topLine ) frame.setFrameShadow( QFrame.Sunken )
vLayout.addWidget( title ) frame.setLayout ( vLayout )
vLayout.addStretch(1) frame.setLineWidth ( 1 )
vLayout.addWidget( subTitle )
vLayout.addWidget( authors )
vLayout.addStretch(1)
vLayout.addWidget( botLine )
vLayout.addStretch(10)
frame = QFrame() vLayout = QVBoxLayout()
frame.setFrameShape ( QFrame.Box ) vLayout.addWidget( frame )
frame.setFrameShadow( QFrame.Sunken ) self.setLayout( vLayout )
frame.setLayout ( vLayout )
frame.setLineWidth ( 1 )
vLayout = QVBoxLayout() self._exitAction = QAction( '&Exit', self )
vLayout.addWidget( frame ) self._exitAction.setStatusTip( 'Exit CCB (settings are saved)' )
self._exitAction.setShortcut ( QKeySequence('CTRL+Q') )
self._exitAction.triggered.connect( QApplication.closeAllWindows )
self.addAction( self._exitAction )
self.setLayout( vLayout ) self._closeAction = QAction( '&Close', self )
self._closeAction.setStatusTip( 'Close the About Window' )
self._exitAction = QAction( '&Exit', self ) self._closeAction.setShortcut ( QKeySequence('CTRL+A') )
self._exitAction.setStatusTip( 'Exit CCB (settings are saved)' ) self._closeAction.triggered.connect( self.close )
self._exitAction.setShortcut ( QKeySequence('CTRL+Q') ) self.addAction( self._closeAction )
self._exitAction.triggered.connect( QApplication.closeAllWindows ) return
self.addAction( self._exitAction )
self._closeAction = QAction( '&Close', self )
self._closeAction.setStatusTip( 'Close the About Window' )
self._closeAction.setShortcut ( QKeySequence('CTRL+A') )
self._closeAction.triggered.connect( self.close )
self.addAction( self._closeAction )
return

View File

@ -1,14 +1,14 @@
# -*- mode:Python -*- # -*- mode:Python -*-
# #
# This file is part of the Coriolis Software. # This file is part of the Coriolis Software.
# Copyright (c) UPMC/LIP6 2008-2018, All Rights Reserved # Copyright (c) Sorbonne Université 2008-2021, All Rights Reserved
# #
# +-----------------------------------------------------------------+ # +-----------------------------------------------------------------+
# | C O R I O L I S | # | C O R I O L I S |
# | C o r i o l i s / C h a m s B u i l d e r | # | T o o l c h a i n B u i l d e r |
# | | # | |
# | Author : Jean-Paul Chaput | # | Author : Jean-Paul Chaput |
# | E-mail : Jean-Paul.Chaput@asim.lip6.fr | # | E-mail : Jean-Paul.Chaput@lip6.fr |
# | =============================================================== | # | =============================================================== |
# | Python : "./builder/Builder.py" | # | Python : "./builder/Builder.py" |
# +-----------------------------------------------------------------+ # +-----------------------------------------------------------------+
@ -20,9 +20,9 @@ import os
import os.path import os.path
import datetime import datetime
import subprocess import subprocess
from . import ErrorMessage from . import ErrorMessage
from Project import Project from .Project import Project
from Configuration import Configuration from .Configuration import Configuration
class Builder: class Builder:
@ -51,14 +51,11 @@ class Builder:
self._environment = os.environ self._environment = os.environ
return return
def __setattr__ ( self, attribute, value ): def __setattr__ ( self, attribute, value ):
if attribute[0] == "_": if attribute[0] == "_":
self.__dict__[attribute] = value self.__dict__[attribute] = value
return return
if attribute in self._conf.getAllIds(): setattr( self._conf, attribute, value ) if attribute in self._conf.getAllIds(): setattr( self._conf, attribute, value )
if attribute == "quiet": self._quiet = value if attribute == "quiet": self._quiet = value
elif attribute == "rmBuild": self._rmBuild = value elif attribute == "rmBuild": self._rmBuild = value
elif attribute == "doBuild": self._doBuild = value elif attribute == "doBuild": self._doBuild = value
@ -84,18 +81,15 @@ class Builder:
elif attribute == "makeArguments": self._makeArguments = value.split () elif attribute == "makeArguments": self._makeArguments = value.split ()
return return
def __getattr__ ( self, attribute ): def __getattr__ ( self, attribute ):
if attribute[0] != "_": if attribute[0] != "_":
if attribute == 'conf': return self._conf if attribute == 'conf': return self._conf
if attribute in self._conf.getAllIds(): if attribute in self._conf.getAllIds():
return getattr( self._conf, attribute ) return getattr( self._conf, attribute )
if not attribute in self.__dict__:
if not self.__dict__.has_key(attribute):
raise ErrorMessage( 1, 'Builder has no attribute <%s>.'%attribute ) raise ErrorMessage( 1, 'Builder has no attribute <%s>.'%attribute )
return self.__dict__[attribute] return self.__dict__[attribute]
def _guessGitHash ( self, project ): def _guessGitHash ( self, project ):
self.gitHash = 'x' self.gitHash = 'x'
os.chdir ( self.sourceDir+'/'+project.getName() ) os.chdir ( self.sourceDir+'/'+project.getName() )
@ -103,58 +97,48 @@ class Builder:
self.gitHash = subprocess.Popen ( command, stdout=subprocess.PIPE ).stdout.readlines()[0] self.gitHash = subprocess.Popen ( command, stdout=subprocess.PIPE ).stdout.readlines()[0]
return return
def _configure ( self, fileIn, fileOut ): def _configure ( self, fileIn, fileOut ):
fdFileIn = open ( fileIn , "r" ) fdFileIn = open ( fileIn , "r" )
fdFileOut = open ( fileOut, "w" ) fdFileOut = open ( fileOut, "w" )
for line in fdFileIn.readlines(): for line in fdFileIn.readlines():
stable = False stable = False
substituted0 = line substituted0 = line
while not stable: while not stable:
substituted1 = re.sub ( r"@revdate@" , self.revDate, substituted0 ) substituted1 = re.sub ( r"@revdate@" , self.revDate, substituted0 )
substituted1 = re.sub ( r"@githash@" , self.gitHash, substituted1 ) substituted1 = re.sub ( r"@githash@" , self.gitHash, substituted1 )
substituted1 = re.sub ( r"@coriolisTop@", "/usr" , substituted1 ) substituted1 = re.sub ( r"@coriolisTop@", "/usr" , substituted1 )
if substituted0 == substituted1: stable = True if substituted0 == substituted1: stable = True
else: substituted0 = substituted1 else: substituted0 = substituted1
fdFileOut.write ( substituted0 ) fdFileOut.write ( substituted0 )
fdFileIn.close () fdFileIn.close ()
fdFileOut.close () fdFileOut.close ()
return return
def _doSpec ( self ): def _doSpec ( self ):
self._configure ( self.specFileIn, self.specFile ) self._configure ( self.specFileIn, self.specFile )
return return
def _doDebChangelog ( self ): def _doDebChangelog ( self ):
self._configure ( self.debChangelogIn, self.debChangelog ) self._configure ( self.debChangelogIn, self.debChangelog )
return return
def _execute ( self, command, error ): def _execute ( self, command, error ):
collections = [] collections = []
if self._devtoolset: if self._devtoolset:
collections.append( 'devtoolset-%d' % self._devtoolset ) collections.append( 'devtoolset-{}'.format(self._devtoolset) )
print 'Using devtoolset-%(v)d (scl enable devtoolset-%(v)d ...)' % {'v':self._devtoolset} print( 'Using devtoolset-{0} (scl enable devtoolset-{0} ...)'.format(self._devtoolset) )
if self._llvmtoolset: if self._llvmtoolset:
collections.append( 'llvm-toolset-%d' % self._llvmtoolset ) collections.append( 'llvm-toolset-{}'.format(self._llvmtoolset) )
print 'Using llvm-toolset-%(v)d (scl enable llvm-toolset-%(v)d ...)' % {'v':self._llvmtoolset} print( 'Using llvm-toolset-{0} (scl enable llvm-toolset-{v} ...)'.format(self._llvmtoolset) )
if collections: if collections:
commandAsString = '' commandAsString = ''
for i in range(len(command)): for i in range(len(command)):
if i: commandAsString += ' ' if i: commandAsString += ' '
if ' ' in command[i]: commandAsString += '"'+command[i]+'"' if ' ' in command[i]: commandAsString += '"'+command[i]+'"'
else: commandAsString += command[i] else: commandAsString += command[i]
command = [ 'scl', 'enable' ] command = [ 'scl', 'enable' ]
command += collections command += collections
command.append( commandAsString ) command.append( commandAsString )
sys.stdout.flush () sys.stdout.flush ()
sys.stderr.flush () sys.stderr.flush ()
child = subprocess.Popen ( command, env=self._environment, stdout=None ) child = subprocess.Popen ( command, env=self._environment, stdout=None )
@ -164,28 +148,26 @@ class Builder:
ErrorMessage( status, "%s (status:%d)."%(error,status) ).terminate() ErrorMessage( status, "%s (status:%d)."%(error,status) ).terminate()
return return
def _enableTool ( self, tool ): def _enableTool ( self, tool ):
return return
def _build ( self, tool ): def _build ( self, tool ):
toolSourceDir = os.path.join ( self.sourceDir, tool.getToolDir() ) toolSourceDir = os.path.join ( self.sourceDir, tool.getToolDir() )
toolBuildDir = os.path.join ( self.buildDir , tool.name ) toolBuildDir = os.path.join ( self.buildDir , tool.name )
cmakeInstallDir = os.path.join ( self.installDir, "share", "cmake", "Modules" ) cmakeInstallDir = os.path.join ( self.installDir, "share", "cmake", "Modules" )
# Supplied directly in the CMakeLists.txt. # Supplied directly in the CMakeLists.txt.
#cmakeModules = os.path.join ( self.installDir, "share", "cmake", "Modules" ) #cmakeModules = os.path.join ( self.installDir, "share", "cmake", "Modules" )
if not os.path.isdir(toolSourceDir): if not os.path.isdir(toolSourceDir):
print ErrorMessage( 0, "Missing tool source directory: \"%s\" (skipped)."%toolSourceDir ) print( ErrorMessage( 0, 'Missing tool source directory: "{}" (skipped).' \
.format(toolSourceDir) ))
return return
if self._rmBuild: if self._rmBuild:
print "Removing tool build directory: \"%s\"." % toolBuildDir print( 'Removing tool build directory: "{}".'.format(toolBuildDir) )
command = [ "/bin/rm", "-rf", toolBuildDir ] command = [ "/bin/rm", "-rf", toolBuildDir ]
self._execute ( command, "Removing tool build directory" ) self._execute ( command, "Removing tool build directory" )
command = [ 'cmake' ] command = [ 'cmake' ]
if self.libSuffix: command += [ "-D", "LIB_SUFFIX:STRING=%s" % self.libSuffix ]
if self._ninja: command += [ "-G", "Ninja" ] if self._ninja: command += [ "-G", "Ninja" ]
if self._macports: command += [ "-D", "WITH_MACPORTS:STRING=TRUE" ] if self._macports: command += [ "-D", "WITH_MACPORTS:STRING=TRUE" ]
if self._noSystemBoost: command += [ "-D", "Boost_NO_SYSTEM_PATHS:STRING=TRUE" if self._noSystemBoost: command += [ "-D", "Boost_NO_SYSTEM_PATHS:STRING=TRUE"
@ -195,7 +177,6 @@ class Builder:
if self._bfd: command += [ "-D", "USE_LIBBFD:STRING=%s" % self._bfd ] if self._bfd: command += [ "-D", "USE_LIBBFD:STRING=%s" % self._bfd ]
if self._qt5: command += [ "-D", "WITH_QT5:STRING=TRUE" ] if self._qt5: command += [ "-D", "WITH_QT5:STRING=TRUE" ]
if self._openmp: command += [ "-D", "WITH_OPENMP:STRING=TRUE" ] if self._openmp: command += [ "-D", "WITH_OPENMP:STRING=TRUE" ]
command += [ "-D", "CMAKE_BUILD_TYPE:STRING=%s" % self.buildMode command += [ "-D", "CMAKE_BUILD_TYPE:STRING=%s" % self.buildMode
#, "-D", "BUILD_SHARED_LIBS:STRING=%s" % self.enableShared #, "-D", "BUILD_SHARED_LIBS:STRING=%s" % self.enableShared
, "-D", "CMAKE_INSTALL_PREFIX:STRING=%s" % self.installDir , "-D", "CMAKE_INSTALL_PREFIX:STRING=%s" % self.installDir
@ -205,11 +186,10 @@ class Builder:
, toolSourceDir ] , toolSourceDir ]
if not os.path.isdir(toolBuildDir): if not os.path.isdir(toolBuildDir):
print "Creating tool build directory: \"%s\"." % toolBuildDir print( 'Creating tool build directory: "{}".'.format(toolBuildDir) )
os.makedirs ( toolBuildDir ) os.makedirs ( toolBuildDir )
os.chdir ( toolBuildDir ) os.chdir ( toolBuildDir )
self._execute ( command, "First CMake failed" ) self._execute ( command, "First CMake failed" )
os.chdir ( toolBuildDir ) os.chdir ( toolBuildDir )
if self._noCache: if self._noCache:
cmakeCache = os.path.join(toolBuildDir,"CMakeCache.txt") cmakeCache = os.path.join(toolBuildDir,"CMakeCache.txt")
@ -226,22 +206,19 @@ class Builder:
command += [ toolSourceDir ] command += [ toolSourceDir ]
self._execute ( command, "Second CMake failed" ) self._execute ( command, "Second CMake failed" )
if self._doBuild: if self._doBuild:
command = [ "make" ] command = [ "make" ]
if self._ninja: if self._ninja:
command = [ "ninja-build" ] command = [ "ninja-build" ]
#command += [ "DESTDIR=%s" % self.installDir ] #command += [ "DESTDIR=%s" % self.installDir ]
command += self._makeArguments command += self._makeArguments
print "Make/Ninja command:", command print( "Make/Ninja command:", command )
sys.stdout.flush () sys.stdout.flush ()
self._execute ( command, "Build failed" ) self._execute ( command, "Build failed" )
return return
def gitArchive ( self, projectName ): def gitArchive ( self, projectName ):
rawArchive = self.tarballDir+'/'+projectName+'.tar' rawArchive = self.tarballDir+'/'+projectName+'.tar'
os.chdir ( self.sourceDir+'/'+projectName ) os.chdir ( self.sourceDir+'/'+projectName )
command = [ 'git' command = [ 'git'
, 'archive' , 'archive'
@ -250,11 +227,10 @@ class Builder:
, 'devel' , 'devel'
] ]
self._execute ( command, "git archive of project %s" % projectName ) self._execute ( command, "git archive of project %s" % projectName )
if not os.path.isdir ( self.archiveDir ): if not os.path.isdir ( self.archiveDir ):
os.mkdir ( self.archiveDir ) os.mkdir ( self.archiveDir )
os.chdir ( self.archiveDir ) os.chdir ( self.archiveDir )
command = [ 'tar', 'xf', rawArchive ] command = [ 'tar', 'xf', rawArchive ]
self._execute ( command, "unpacking raw archive %s" % rawArchive ) self._execute ( command, "unpacking raw archive %s" % rawArchive )
@ -284,32 +260,27 @@ class Builder:
# , "--no-backup-if-mismatch" # , "--no-backup-if-mismatch"
# , "-p0", "-i", self.distribPatch ] # , "-p0", "-i", self.distribPatch ]
# self._execute ( command, "patch for distribution command failed" ) # self._execute ( command, "patch for distribution command failed" )
absSourceTarBz2 = '%s/%s' % (self.tarballDir,self.sourceTarBz2) absSourceTarBz2 = '%s/%s' % (self.tarballDir,self.sourceTarBz2)
os.chdir ( self.tarballDir ) os.chdir ( self.tarballDir )
command = [ 'tar', 'jcf', absSourceTarBz2, os.path.basename(self.archiveDir) ] command = [ 'tar', 'jcf', absSourceTarBz2, os.path.basename(self.archiveDir) ]
self._execute ( command, "Creating composite archive %s" % absSourceTarBz2 ) self._execute ( command, "Creating composite archive %s" % absSourceTarBz2 )
return return
def _setEnvironment ( self, systemVariable, userVariable ): def _setEnvironment ( self, systemVariable, userVariable ):
if not self._environment.has_key(systemVariable) or self._environment[systemVariable] == "": if not systemVariable in self._environment or self._environment[systemVariable] == "":
if not self._environment.has_key(userVariable) or self._environment[userVariable] == "" : if not userVariable in self._environment or self._environment[userVariable] == "" :
self._environment[ systemVariable ] = self.installDir self._environment[ systemVariable ] = self.installDir
print "[WARNING] Neither <%s> nor <%s> environment variables are sets." \ print( '[WARNING] Neither "{0}" nor "{1}" environment variables are sets.' \
% (systemVariable,userVariable) .format(systemVariable,userVariable) )
print " Setting <%s> to <%s>." % (systemVariable,self.installDir) print( ' Setting "{0}" to "{1}".'.format(systemVariable,self.installDir) )
else: else:
self._environment[ systemVariable ] = self._environment[ userVariable ] self._environment[ systemVariable ] = self._environment[ userVariable ]
if not self._quiet: if not self._quiet:
print "Setting <%s> to <%s>." % (systemVariable,self._environment[systemVariable]) print( 'Setting "{0}" to "{1}".'.format(systemVariable,self._environment[systemVariable]) )
if self._environment.has_key(userVariable): if userVariable in self._environment:
print "Transmitting <%s> as <%s>." % (userVariable,self._environment[userVariable]) print( 'Transmitting "{0}" as "{1}".'.format(userVariable,self._environment[userVariable]) )
return return
def _commandTemplate ( self, tools, projects, command ): def _commandTemplate ( self, tools, projects, command ):
if self._clang: if self._clang:
self._environment[ 'CC' ] = 'clang' self._environment[ 'CC' ] = 'clang'
@ -320,87 +291,70 @@ class Builder:
if self._macports: if self._macports:
self._environment[ 'BOOST_INCLUDEDIR' ] = '/opt/local/include' self._environment[ 'BOOST_INCLUDEDIR' ] = '/opt/local/include'
self._environment[ 'BOOST_LIBRARYDIR' ] = '/opt/local/lib' self._environment[ 'BOOST_LIBRARYDIR' ] = '/opt/local/lib'
# Set or guess the various projects TOP environment variables. # Set or guess the various projects TOP environment variables.
for project in self.projects: for project in self.projects:
topVariable = "%s_TOP" % project.getName().upper() topVariable = "%s_TOP" % project.getName().upper()
topUserVariable = "%s_USER_TOP" % project.getName().upper() topUserVariable = "%s_USER_TOP" % project.getName().upper()
self._setEnvironment ( topVariable, topUserVariable ) self._setEnvironment ( topVariable, topUserVariable )
if tools: if tools:
# Checks if the requested tools are in the various projects. # Checks if the requested tools are in the various projects.
self.standalones = tools self.standalones = tools
for project in self.projects: for project in self.projects:
self.standalones = project.activate ( self.standalones ) self.standalones = project.activate ( self.standalones )
for tool in self.standalones: for tool in self.standalones:
print "[WARNING] Tool \"%s\" is not part of any project." % tool print( '[WARNING] Tool "{}" is not part of any project.'.format(tool) )
if projects: if projects:
for projectName in projects: for projectName in projects:
project = self.getProject ( projectName ) project = self.getProject ( projectName )
if not project: if not project:
ErrorMessage( 1, "No project of name \"%s\"."%projectName ).terminate() ErrorMessage( 1, "No project of name \"%s\"."%projectName ).terminate()
project.activateAll() project.activateAll()
if not tools and not projects: if not tools and not projects:
for project in self.projects: for project in self.projects:
project.activateAll () project.activateAll ()
for project in self.projects: for project in self.projects:
for tool in project.getActives(): for tool in project.getActives():
print "\nProcessing tool: \"%s\"." % tool.name print( '\nProcessing tool: "{}".'.format(tool.name) )
getattr(self,command) ( tool ) getattr(self,command) ( tool )
return return
def enable ( self, tools, projects ): def enable ( self, tools, projects ):
self._commandTemplate ( tools, projects, "_enableTool" ) self._commandTemplate ( tools, projects, "_enableTool" )
return return
def enabledTools ( self ): def enabledTools ( self ):
tools = [] tools = []
for project in self.projects: for project in self.projects:
tools += project.getActives() tools += project.getActives()
return tools return tools
def build ( self, tools, projects ): def build ( self, tools, projects ):
self._commandTemplate ( tools, projects, "_build" ) self._commandTemplate ( tools, projects, "_build" )
return return
def gitTarball ( self, tools, projects ): def gitTarball ( self, tools, projects ):
if self.gitHash == "x": if self.gitHash == "x":
self._guessGitHash ( self.getProject(projects[0]) ) self._guessGitHash ( self.getProject(projects[0]) )
self._doSpec () self._doSpec ()
# self._doDebChangelog () # self._doDebChangelog ()
if os.path.isdir(self.tarballDir): if os.path.isdir(self.tarballDir):
print "Removing previous tarball directory: \"%s\"." % self.tarballDir print( 'Removing previous tarball directory: "{}".'.format(self.tarballDir) )
command = [ "/bin/rm", "-rf", self.tarballDir ] command = [ "/bin/rm", "-rf", self.tarballDir ]
self._execute ( command, "Removing top export (tarball) directory" ) self._execute ( command, "Removing top export (tarball) directory" )
print( 'Creating tarball directory: "{}".'.format(self.tarballDir) )
print "Creating tarball directory: \"%s\"." % self.tarballDir
os.makedirs ( self.tarballDir ) os.makedirs ( self.tarballDir )
self.gitArchive ( projects[0] ) self.gitArchive ( projects[0] )
return return
def userTarball ( self, tools, projects ): def userTarball ( self, tools, projects ):
self.enable( tools, projects ) self.enable( tools, projects )
userSourceTarBz2 = os.path.join ( self.tarballDir userSourceTarBz2 = os.path.join ( self.tarballDir
, datetime.date.today().strftime('%s-%s-%%Y%%m%%d.tar.bz2'% , datetime.date.today().strftime('%s-%s-%%Y%%m%%d.tar.bz2'%
(self.packageName (self.packageName
,self.packageVersion)) ) ,self.packageVersion)) )
excludes = [] excludes = []
for exclude in self.packageExcludes: for exclude in self.packageExcludes:
excludes += [ '--exclude='+exclude ] excludes += [ '--exclude='+exclude ]
os.chdir ( self.sourceDir ) os.chdir ( self.sourceDir )
command = [ "/bin/tar" command = [ "/bin/tar"
, "--exclude-backups" , "--exclude-backups"
@ -410,27 +364,23 @@ class Builder:
+ [ "-jcvf", userSourceTarBz2 ] \ + [ "-jcvf", userSourceTarBz2 ] \
+ self.enabledTools() + self.enabledTools()
self._execute ( command, "tar command failed" ) self._execute ( command, "tar command failed" )
return return
def doRpm ( self ): def doRpm ( self ):
self.gitTarball ( [], self.packageProjects ) self.gitTarball ( [], self.packageProjects )
for rpmDir in [ "SOURCES", "SPECS", "BUILD", "tmp" for rpmDir in [ "SOURCES", "SPECS", "BUILD", "tmp"
, "SRPMS", "RPMS/i386", "RPMS/i686", "RPMS/x86_64" ]: , "SRPMS", "RPMS/i386", "RPMS/i686", "RPMS/x86_64" ]:
rpmFullDir = os.path.join ( self.rpmbuildDir, rpmDir ) rpmFullDir = os.path.join ( self.rpmbuildDir, rpmDir )
if not os.path.isdir(rpmFullDir): if not os.path.isdir(rpmFullDir):
os.makedirs ( rpmFullDir ) os.makedirs ( rpmFullDir )
else: else:
for entry in os.listdir(rpmFullDir): for entry in os.listdir(rpmFullDir):
path = os.path.join( rpmFullDir, entry ) path = os.path.join( rpmFullDir, entry )
if os.path.islink(path): if os.path.islink(path):
realpath = os.path.realpath( os.readlink(path) ) realpath = os.path.realpath( os.readlink(path) )
if not os.path.isfile(realpath): if not os.path.isfile(realpath):
print 'Remove obsolete link: <%s>.' % path print( 'Remove obsolete link: "{}".'.format(path) )
os.unlink( path ) os.unlink( path )
rpmSpecFile = os.path.join ( self.rpmbuildDir, "SPECS" , "coriolis2.spec" ) rpmSpecFile = os.path.join ( self.rpmbuildDir, "SPECS" , "coriolis2.spec" )
rpmSourceFile = os.path.join ( self.rpmbuildDir, "SOURCES", self.sourceTarBz2 ) rpmSourceFile = os.path.join ( self.rpmbuildDir, "SOURCES", self.sourceTarBz2 )
sourceFile = os.path.join ( self.tarballDir , self.sourceTarBz2 ) sourceFile = os.path.join ( self.tarballDir , self.sourceTarBz2 )
@ -438,12 +388,10 @@ class Builder:
if os.path.isfile ( rpmSpecFile ): if os.path.isfile ( rpmSpecFile ):
os.unlink ( rpmSpecFile ) os.unlink ( rpmSpecFile )
os.symlink ( self.specFile, rpmSpecFile ) os.symlink ( self.specFile, rpmSpecFile )
if not os.path.islink ( rpmSourceFile ): if not os.path.islink ( rpmSourceFile ):
os.symlink ( sourceFile, rpmSourceFile ) os.symlink ( sourceFile, rpmSourceFile )
os.chdir ( self.rpmbuildDir ) os.chdir ( self.rpmbuildDir )
command = [ "/usr/bin/rpmbuild" command = [ "/usr/bin/rpmbuild"
, "--define", "_topdir %s" % self.rpmbuildDir , "--define", "_topdir %s" % self.rpmbuildDir
, "--define", "_tmppath %s" % self.tmppathDir , "--define", "_tmppath %s" % self.tmppathDir
@ -452,18 +400,13 @@ class Builder:
if self._devtoolset: if self._devtoolset:
command += [ "--define", "scl devtoolset-%d"%self._devtoolset ] command += [ "--define", "scl devtoolset-%d"%self._devtoolset ]
command += [ "-ba", "--clean", rpmSpecFile ] command += [ "-ba", "--clean", rpmSpecFile ]
self._execute ( command, "Rebuild rpm packages" ) self._execute ( command, "Rebuild rpm packages" )
return return
def doDeb ( self ): def doDeb ( self ):
self.svnTarball ( [], self.packageProjects ) self.svnTarball ( [], self.packageProjects )
if not os.path.isdir(self.debbuildDir): if not os.path.isdir(self.debbuildDir):
os.makedirs ( self.debbuildDir ) os.makedirs ( self.debbuildDir )
os.chdir ( self.debbuildDir ) os.chdir ( self.debbuildDir )
sourceFile = os.path.join ( self.tarballDir , self.sourceTarBz2 ) sourceFile = os.path.join ( self.tarballDir , self.sourceTarBz2 )
debOrigFile = os.path.join ( self.debbuildDir, "coriolis2_1.0.%s.orig.tar.bz2" % self.gitHash ) debOrigFile = os.path.join ( self.debbuildDir, "coriolis2_1.0.%s.orig.tar.bz2" % self.gitHash )
@ -478,17 +421,12 @@ class Builder:
packageDir = os.path.join ( self.debbuildDir, "coriolis2-1.0.%s" % self.gitHash ) packageDir = os.path.join ( self.debbuildDir, "coriolis2-1.0.%s" % self.gitHash )
os.chdir ( packageDir ) os.chdir ( packageDir )
self._environment["CFLAGS" ] = "-O2" self._environment["CFLAGS" ] = "-O2"
self._environment["CXXFLAGS"] = "-O2" self._environment["CXXFLAGS"] = "-O2"
command = [ "/usr/bin/debuild", "-us", "-uc" ] command = [ "/usr/bin/debuild", "-us", "-uc" ]
self._execute ( command, "Rebuild Debian packages" ) self._execute ( command, "Rebuild Debian packages" )
return return
def getProject ( self, name ): return self._conf.getProject(name) def getProject ( self, name ): return self._conf.getProject(name)
def loadConfiguration ( self, confFile ): self._conf.load( confFile ) def loadConfiguration ( self, confFile ): self._conf.load( confFile )
def showConfiguration ( self ): self._conf.show() def showConfiguration ( self ): self._conf.show()

View File

@ -2,75 +2,72 @@
# -*- mode:Python -*- # -*- mode:Python -*-
# #
# This file is part of the Coriolis Software. # This file is part of the Coriolis Software.
# Copyright (c) UPMC/LIP6 2012-2018, All Rights Reserved # Copyright (c) Sorbonne Université 2012-2021, All Rights Reserved
# #
# +-----------------------------------------------------------------+ # +-----------------------------------------------------------------+
# | C O R I O L I S | # | C O R I O L I S |
# | C o r i o l i s / C h a m s B u i l d e r | # | T o o l c h a i n B u i l d e r |
# | | # | |
# | Author : Damien Dupuis | # | Author : Damien Dupuis |
# | E-mail : Jean-Paul.Chaput@asim.lip6.fr | # | E-mail : Jean-Paul.Chaput@lip6.fr |
# | =============================================================== | # | =============================================================== |
# | Python : "./builder/BuilderGui.py" | # | Python : "./builder/BuilderGui.py" |
# +-----------------------------------------------------------------+ # +-----------------------------------------------------------------+
from PyQt4.QtGui import QTabWidget from PyQt4.QtGui import QTabWidget, QApplication, QMainWindow, \
from PyQt4.QtGui import QApplication QAction , QKeySequence
from PyQt4.QtGui import QMainWindow from .OptionsWidget import OptionsWidget
from PyQt4.QtGui import QAction from .CompileWidget import CompileWidget
from PyQt4.QtGui import QKeySequence from .ConfigureWidget import ConfigureWidget
from OptionsWidget import OptionsWidget from .AboutWidget import AboutWidget
from CompileWidget import CompileWidget
from ConfigureWidget import ConfigureWidget
from AboutWidget import AboutWidget
class BuilderGui ( QMainWindow ): class BuilderGui ( QMainWindow ):
def __init__ ( self, confFile, parent=None ): def __init__ ( self, confFile, parent=None ):
QMainWindow.__init__( self, parent ) QMainWindow.__init__( self, parent )
self.setWindowTitle( 'Coriolis/Chams Builder' ) self.setWindowTitle( 'Coriolis Toolchain Builder' )
self._tabWidget = QTabWidget() self._tabWidget = QTabWidget()
self._configureWidget = ConfigureWidget(confFile) self._configureWidget = ConfigureWidget(confFile)
self._optionsWidget = OptionsWidget(self._configureWidget.conf) self._optionsWidget = OptionsWidget(self._configureWidget.conf)
self._compileWidget = CompileWidget() self._compileWidget = CompileWidget()
self._aboutWidget = AboutWidget() self._aboutWidget = AboutWidget()
self._tabWidget.addTab( self._optionsWidget , 'Options' ) self._tabWidget.addTab( self._optionsWidget , 'Options' )
self._tabWidget.addTab( self._compileWidget , 'Compile' ) self._tabWidget.addTab( self._compileWidget , 'Compile' )
self._tabWidget.addTab( self._configureWidget, 'Configure' ) self._tabWidget.addTab( self._configureWidget, 'Configure' )
self.setCentralWidget( self._tabWidget ) self.setCentralWidget( self._tabWidget )
self._compileWidget.conf = self._configureWidget self._compileWidget.conf = self._configureWidget
self._compileWidget.options = self._optionsWidget self._compileWidget.options = self._optionsWidget
self._exitAction = QAction( '&Exit', self ) self._exitAction = QAction( '&Exit', self )
self._exitAction.setStatusTip( 'Exit CCB (settings are saved)' ) self._exitAction.setStatusTip( 'Exit CCB (settings are saved)' )
self._exitAction.setShortcut ( QKeySequence('CTRL+Q') ) self._exitAction.setShortcut ( QKeySequence('CTRL+Q') )
self._exitAction.triggered.connect( QApplication.closeAllWindows ) self._exitAction.triggered.connect( QApplication.closeAllWindows )
self._saveAction = QAction( '&Save Settings', self ) self._saveAction = QAction( '&Save Settings', self )
self._saveAction.setStatusTip( 'Save Settings' ) self._saveAction.setStatusTip( 'Save Settings' )
self._saveAction.setShortcut ( QKeySequence('CTRL+S') ) self._saveAction.setShortcut ( QKeySequence('CTRL+S') )
self._saveAction.triggered.connect( self._configureWidget.saveSettings ) self._saveAction.triggered.connect( self._configureWidget.saveSettings )
self._saveAction.triggered.connect( self._optionsWidget.saveSettings ) self._saveAction.triggered.connect( self._optionsWidget.saveSettings )
self._saveAction.triggered.connect( self._compileWidget.saveSettings ) self._saveAction.triggered.connect( self._compileWidget.saveSettings )
self._aboutAction = QAction( '&About', self ) self._aboutAction = QAction( '&About', self )
self._aboutAction.setStatusTip( 'A Word About Who\'s Responsible for This Thing' ) self._aboutAction.setStatusTip( 'A Word About Who\'s Responsible for This Thing' )
self._aboutAction.setShortcut ( QKeySequence('CTRL+A') ) self._aboutAction.setShortcut ( QKeySequence('CTRL+A') )
self._aboutAction.triggered.connect( self._aboutWidget.show ) self._aboutAction.triggered.connect( self._aboutWidget.show )
fileMenu = self.menuBar().addMenu( 'File' ) fileMenu = self.menuBar().addMenu( 'File' )
fileMenu.addAction( self._exitAction ) fileMenu.addAction( self._exitAction )
fileMenu.addAction( self._saveAction ) fileMenu.addAction( self._saveAction )
fileMenu.addAction( self._aboutAction ) fileMenu.addAction( self._aboutAction )
return return
def closeEvent ( self, event ): def closeEvent ( self, event ):
self._configureWidget.saveSettings() self._configureWidget.saveSettings()
self._optionsWidget .saveSettings() self._optionsWidget .saveSettings()
self._compileWidget .saveSettings() self._compileWidget .saveSettings()
event.accept() event.accept()
return return

View File

@ -2,11 +2,11 @@
# -*- mode:Python -*- # -*- mode:Python -*-
# #
# This file is part of the Coriolis Software. # This file is part of the Coriolis Software.
# Copyright (c) UPMC/LIP6 2012-2018, All Rights Reserved # Copyright (c) Sorbonne Université 2012-2021, All Rights Reserved
# #
# +-----------------------------------------------------------------+ # +-----------------------------------------------------------------+
# | C O R I O L I S | # | C O R I O L I S |
# | C o r i o l i s / C h a m s B u i l d e r | # | T o o l c h a i n B u i l d e r |
# | | # | |
# | Author : Damien Dupuis | # | Author : Damien Dupuis |
# | E-mail : Jean-Paul.Chaput@asim.lip6.fr | # | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
@ -17,195 +17,166 @@
import re import re
import subprocess import subprocess
from PyQt4.QtCore import Qt from PyQt4.QtCore import Qt, pyqtSignal, QSettings
from PyQt4.QtCore import pyqtSignal from PyQt4.QtGui import QFont, QColor, QPalette, QTextCharFormat, \
from PyQt4.QtCore import QSettings QWidget, QLabel, QPushButton, QCheckBox, \
from PyQt4.QtGui import QFont QGroupBox, QButtonGroup, QVBoxLayout, \
from PyQt4.QtGui import QColor QHBoxLayout, QGridLayout, QScrollArea, \
from PyQt4.QtGui import QPalette QComboBox, QLineEdit, QTextEdit, \
from PyQt4.QtGui import QTextCharFormat QFileDialog, QProgressBar, QApplication
from PyQt4.QtGui import QWidget from .Highlighter import Highlighter
from PyQt4.QtGui import QLabel
from PyQt4.QtGui import QPushButton
from PyQt4.QtGui import QCheckBox
from PyQt4.QtGui import QGroupBox
from PyQt4.QtGui import QButtonGroup
from PyQt4.QtGui import QVBoxLayout
from PyQt4.QtGui import QHBoxLayout
from PyQt4.QtGui import QGridLayout
from PyQt4.QtGui import QScrollArea
from PyQt4.QtGui import QComboBox
from PyQt4.QtGui import QLineEdit
from PyQt4.QtGui import QTextEdit
from PyQt4.QtGui import QFileDialog
from PyQt4.QtGui import QProgressBar
from PyQt4.QtGui import QApplication
from builder.Highlighter import Highlighter
class CompileWidget ( QWidget ): class CompileWidget ( QWidget ):
progress = pyqtSignal(int) progress = pyqtSignal(int)
def __init__ ( self, parent=None ): def __init__ ( self, parent=None ):
QWidget.__init__ ( self, parent ) QWidget.__init__ ( self, parent )
self._options = None self._options = None
self._conf = None self._conf = None
self._go = QPushButton( 'Go' ) self._go = QPushButton( 'Go' )
self._go.setMaximumWidth( 100 ) self._go.setMaximumWidth( 100 )
font = self._go.font() font = self._go.font()
font.setPointSizeF( font.pointSizeF()*2.0 ) font.setPointSizeF( font.pointSizeF()*2.0 )
font.setWeight ( QFont.Bold ) font.setWeight ( QFont.Bold )
self._go.setFont( font ) self._go.setFont( font )
self._go.clicked.connect( self.go ) self._go.clicked.connect( self.go )
self._saveLog = QPushButton( 'Save' ) self._saveLog = QPushButton( 'Save' )
saveLogLabel = QLabel( 'Log File:' ) saveLogLabel = QLabel( 'Log File:' )
saveLogBrowse = QPushButton( '&Browse' ) saveLogBrowse = QPushButton( '&Browse' )
saveLogBrowse.clicked.connect( self.browseSaveLog ) saveLogBrowse.clicked.connect( self.browseSaveLog )
self._saveLogEdit = QLineEdit( '' ) self._saveLogEdit = QLineEdit( '' )
gLayout = QGridLayout() gLayout = QGridLayout()
gLayout.addWidget( saveLogLabel , 0, 0, 1, 1, Qt.AlignRight ) gLayout.addWidget( saveLogLabel , 0, 0, 1, 1, Qt.AlignRight )
gLayout.addWidget( self._saveLogEdit, 0, 1, 1, 6 ) gLayout.addWidget( self._saveLogEdit, 0, 1, 1, 6 )
gLayout.addWidget( saveLogBrowse , 0, 7, 1, 1 ) gLayout.addWidget( saveLogBrowse , 0, 7, 1, 1 )
self._console = QTextEdit() self._console = QTextEdit()
self._console.setLineWrapMode( QTextEdit.NoWrap ) self._console.setLineWrapMode( QTextEdit.NoWrap )
self._console.setMinimumSize ( 800, 400 ) self._console.setMinimumSize ( 800, 400 )
palette = self._console.palette() palette = self._console.palette()
palette.setColor( QPalette.Base, QColor.fromRgb(255,255,221) ) # ffffdd. palette.setColor( QPalette.Base, QColor.fromRgb(255,255,221) ) # ffffdd.
self._console.setPalette( palette ) self._console.setPalette( palette )
font = QFont( 'Bitstream Vera Sans Mono', self._console.font().pointSize() ) font = QFont( 'Bitstream Vera Sans Mono', self._console.font().pointSize() )
self._console.setFont( font ) self._console.setFont( font )
self._highlighter = Highlighter( self._console.document() ) self._highlighter = Highlighter( self._console.document() )
self._progressBar = QProgressBar() self._progressBar = QProgressBar()
self._progressBar.setRange ( 0, 100 ) self._progressBar.setRange ( 0, 100 )
self._progressBar.setTextVisible( True ) self._progressBar.setTextVisible( True )
hLayout = QHBoxLayout() hLayout = QHBoxLayout()
hLayout.addStretch() hLayout.addStretch()
hLayout.addWidget( self._go ) hLayout.addWidget( self._go )
hLayout.addStretch() hLayout.addStretch()
hLayout.addWidget( self._saveLog ) hLayout.addWidget( self._saveLog )
hLayout.addStretch() hLayout.addStretch()
vLayout = QVBoxLayout() vLayout = QVBoxLayout()
vLayout.addLayout( hLayout ) vLayout.addLayout( hLayout )
vLayout.addLayout( gLayout ) vLayout.addLayout( gLayout )
vLayout.addWidget( self._progressBar ) vLayout.addWidget( self._progressBar )
vLayout.addWidget( self._console ) vLayout.addWidget( self._console )
self.setLayout( vLayout ) self.setLayout( vLayout )
self.progress.connect( self._progressBar.setValue ) self.progress.connect( self._progressBar.setValue )
self._saveLog.clicked.connect( self.saveLog ) self._saveLog.clicked.connect( self.saveLog )
self.readSettings() self.readSettings()
return return
def _setOptions ( self, options ): self._options = options
def _setConf ( self, conf ): self._conf = conf
def _getOptions ( self ): return self._options
def _getConf ( self ): return self._conf
def _setOptions ( self, options ): self._options = options options = property( _getOptions, _setOptions )
def _setConf ( self, conf ): self._conf = conf conf = property( _getConf , _setConf )
def _getOptions ( self ): return self._options
def _getConf ( self ): return self._conf
options = property( _getOptions, _setOptions ) def browseSaveLog ( self ):
conf = property( _getConf , _setConf ) self._saveLogEdit.setText( QFileDialog.getSaveFileName( self
, 'Select Log File Report'
, self._saveLogEdit.text()
, 'Report Files (*.log *.txt)' ) )
return
def saveLog ( self ):
if self._saveLogEdit.text():
fd = open( self._saveLogEdit.text(), 'w+' )
fd.write( self._console.toPlainText() )
fd.close()
return
def browseSaveLog ( self ): def shellCommand ( self ):
self._saveLogEdit.setText( QFileDialog.getSaveFileName(self command = [ self.conf.bootstrapDir+'/ccb.py' ]
,'Select Log File Report' for project in self.options.projects:
,self._saveLogEdit.text() for tool in project.actives:
,'Report Files (*.log *.txt)') ) command += [ '--tool='+tool ]
return toolsCount = len(command) - 1
if self.conf.rootDir: command += [ '--root=%s'%self.conf.rootDir ]
#if self.options.svnUpdate: command += [ '--svn-update' ]
#if self.options.svnStatus: command += [ '--svn-update' ]
if self.options.enableDoc: command += [ '--doc' ]
if self.options.devtoolset: command += [ '--devtoolset-8' ]
if self.options.qt5: command += [ '--qt5' ]
if self.options.noCache: command += [ '--no-cache' ]
if self.options.rmBuild: command += [ '--rm-build' ]
if self.options.verbose: command += [ '--verbose' ]
if self.options.make:
makeArguments='install '+self.options.threads
command += [ '--make=%s'%makeArguments ]
if self.options.buildMode == 'Debug':
command += [ '--debug' ]
return toolsCount, command
def saveLog ( self ): def go ( self ):
if self._saveLogEdit.text(): rePercentage = re.compile(r'^\[\s*(?P<percent>\d+)%\].*')
fd = open( self._saveLogEdit.text(), 'w+' ) reProcessTool = re.compile(r'^Processing tool:\s*"(?P<tool>.+)"')
fd.write( self._console.toPlainText() ) if not self.options or not self.conf: return
fd.close() toolsCount, command = self.shellCommand()
return if not toolsCount: return
self._progressBar.reset()
self._progressBar.setRange( 0, toolsCount*100 )
strCommand = command[0]
for arg in command[1:]:
strCommand += ' ' + arg
strCommand += '\n\n'
self._console.setFontItalic( True )
self._console.insertPlainText( strCommand )
self._console.setFontItalic( False )
def shellCommand ( self ): toolsDone = -1
command = [ self.conf.bootstrapDir+'/ccb.py' ] builderProcess = subprocess.Popen( command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT )
for project in self.options.projects: while True:
for tool in project.actives: line = builderProcess.stdout.readline()
command += [ '--tool='+tool ] if line == '': break
toolsCount = len(command) - 1 m = rePercentage.match( line )
if m:
self.progress.emit( toolsDone*100+int(m.group('percent')) )
else:
m = reProcessTool.match( line )
if m:
toolsDone += 1
self._console.insertPlainText( line )
scrollBar = self._console.verticalScrollBar()
scrollBar.setValue( scrollBar.maximum() )
QApplication.processEvents()
builderProcess.wait()
if builderProcess.returncode == None:
pass
return
if self.conf.rootDir: command += [ '--root=%s'%self.conf.rootDir ] def readSettings ( self ):
settings = QSettings()
self._saveLogEdit.setText( settings.value('compile/saveLog') )
return
#if self.options.svnUpdate: command += [ '--svn-update' ] def saveSettings ( self ):
#if self.options.svnStatus: command += [ '--svn-update' ] settings = QSettings()
if self.options.enableDoc: command += [ '--doc' ] settings.setValue( 'compile/saveLog', self._saveLogEdit.text() )
if self.options.devtoolset: command += [ '--devtoolset-8' ] return
if self.options.qt5: command += [ '--qt5' ]
if self.options.noCache: command += [ '--no-cache' ]
if self.options.rmBuild: command += [ '--rm-build' ]
if self.options.verbose: command += [ '--verbose' ]
if self.options.make:
makeArguments='install '+self.options.threads
command += [ '--make=%s'%makeArguments ]
if self.options.buildMode == 'Debug':
command += [ '--debug' ]
return toolsCount, command
def go ( self ):
rePercentage = re.compile(r'^\[\s*(?P<percent>\d+)%\].*')
reProcessTool = re.compile(r'^Processing tool:\s*"(?P<tool>.+)"')
if not self.options or not self.conf: return
toolsCount, command = self.shellCommand()
if not toolsCount: return
self._progressBar.reset()
self._progressBar.setRange( 0, toolsCount*100 )
strCommand = command[0]
for arg in command[1:]:
strCommand += ' ' + arg
strCommand += '\n\n'
self._console.setFontItalic( True )
self._console.insertPlainText( strCommand )
self._console.setFontItalic( False )
toolsDone = -1
builderProcess = subprocess.Popen( command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT )
while True:
line = builderProcess.stdout.readline()
if line == '': break
m = rePercentage.match( line )
if m:
self.progress.emit( toolsDone*100+int(m.group('percent')) )
else:
m = reProcessTool.match( line )
if m:
toolsDone += 1
self._console.insertPlainText( line )
scrollBar = self._console.verticalScrollBar()
scrollBar.setValue( scrollBar.maximum() )
QApplication.processEvents()
builderProcess.wait()
if builderProcess.returncode == None:
pass
return
def readSettings ( self ):
settings = QSettings()
self._saveLogEdit.setText( settings.value('compile/saveLog').toString() )
return
def saveSettings ( self ):
settings = QSettings()
settings.setValue( 'compile/saveLog', self._saveLogEdit.text() )
return

View File

@ -2,14 +2,14 @@
# -*- mode:Python -*- # -*- mode:Python -*-
# #
# This file is part of the Coriolis Software. # This file is part of the Coriolis Software.
# Copyright (c) UPMC 2008-2018, All Rights Reserved # Copyright (c) Sorbonne Université 2008-2021, All Rights Reserved
# #
# +-----------------------------------------------------------------+ # +-----------------------------------------------------------------+
# | C O R I O L I S | # | C O R I O L I S |
# | C o r i o l i s / C h a m s B u i l d e r | # | T o o l c h a i n B u i l d e r |
# | | # | |
# | Author : Jean-Paul Chaput | # | Author : Jean-Paul Chaput |
# | E-mail : Jean-Paul.Chaput@asim.lip6.fr | # | E-mail : Jean-Paul.Chaput@lip6.fr |
# | =============================================================== | # | =============================================================== |
# | Python : "./builder/Configuration.py" | # | Python : "./builder/Configuration.py" |
# +-----------------------------------------------------------------+ # +-----------------------------------------------------------------+
@ -21,8 +21,8 @@ import os
import os.path import os.path
import datetime import datetime
import subprocess import subprocess
from . import ErrorMessage from . import ErrorMessage
from Project import Project from .Project import Project
class Configuration ( object ): class Configuration ( object ):
@ -64,31 +64,26 @@ class Configuration ( object ):
self._updateSecondary() self._updateSecondary()
return return
def __setattr__ ( self, attribute, value ): def __setattr__ ( self, attribute, value ):
if attribute in Configuration.SecondaryNames: if attribute in Configuration.SecondaryNames:
print ErrorMessage( 1, 'Attempt to write in read-only attribute <%s> in Configuration.'%attribute ) print( ErrorMessage( 1, 'Attempt to write in read-only attribute "{}" in Configuration.' \
.format(attribute) ))
return return
if attribute[0] == '_': if attribute[0] == '_':
self.__dict__[attribute] = value self.__dict__[attribute] = value
return return
if attribute == 'rootDir': value = os.path.expanduser(value) if attribute == 'rootDir': value = os.path.expanduser(value)
elif attribute == 'enableShared' and value != 'ON': value = 'OFF' elif attribute == 'enableShared' and value != 'ON': value = 'OFF'
self.__dict__['_'+attribute] = value self.__dict__['_'+attribute] = value
self._updateSecondary() self._updateSecondary()
return return
def __getattr__ ( self, attribute ): def __getattr__ ( self, attribute ):
if attribute[0] != '_': attribute = '_'+attribute if attribute[0] != '_': attribute = '_'+attribute
if not self.__dict__.has_key(attribute): if not attribute in self.__dict__:
raise ErrorMessage( 1, 'Configuration has no attribute <%s>.'%attribute ) raise ErrorMessage( 1, 'Configuration has no attribute <%s>.'%attribute )
return self.__dict__[attribute] return self.__dict__[attribute]
def _updateSecondary ( self ): def _updateSecondary ( self ):
if self._enableShared == "ON": self._libMode = "Shared" if self._enableShared == "ON": self._libMode = "Shared"
else: self._libMode = "Static" else: self._libMode = "Static"
@ -109,7 +104,6 @@ class Configuration ( object ):
, "%s.%s" % (self._buildMode,self._libMode) ) , "%s.%s" % (self._buildMode,self._libMode) )
self._buildDir = os.path.join ( self._osDir, "build" ) self._buildDir = os.path.join ( self._osDir, "build" )
self._installDir = os.path.join ( self._osDir, "install" ) self._installDir = os.path.join ( self._osDir, "install" )
self._specFileIn = os.path.join ( self._bootstrapDir, "%s.spec.in"%self._packageName ) self._specFileIn = os.path.join ( self._bootstrapDir, "%s.spec.in"%self._packageName )
self._specFile = os.path.join ( self._bootstrapDir, "%s.spec" %self._packageName ) self._specFile = os.path.join ( self._bootstrapDir, "%s.spec" %self._packageName )
self._debianDir = os.path.join ( self._bootstrapDir, "debian" ) self._debianDir = os.path.join ( self._bootstrapDir, "debian" )
@ -126,7 +120,6 @@ class Configuration ( object ):
self._distribPatch = os.path.join ( self._sourceDir, "bootstrap", "%s-for-distribution.patch"%self._packageName ) self._distribPatch = os.path.join ( self._sourceDir, "bootstrap", "%s-for-distribution.patch"%self._packageName )
return return
def _guessOs ( self ): def _guessOs ( self ):
self._libSuffix = None self._libSuffix = None
self._osSlsoc7x_64 = re.compile (".*Linux.*(el7|slsoc7).*x86_64.*") self._osSlsoc7x_64 = re.compile (".*Linux.*(el7|slsoc7).*x86_64.*")
@ -149,95 +142,89 @@ class Configuration ( object ):
self._osCygwinW10_64 = re.compile (".*CYGWIN_NT-10\.[0-3].*x86_64.*") self._osCygwinW10_64 = re.compile (".*CYGWIN_NT-10\.[0-3].*x86_64.*")
self._osCygwinW10 = re.compile (".*CYGWIN_NT-10\.[0-3].*i686.*") self._osCygwinW10 = re.compile (".*CYGWIN_NT-10\.[0-3].*i686.*")
uname = subprocess.Popen ( ["uname", "-srm"], stdout=subprocess.PIPE ) uname = subprocess.Popen ( ["uname", "-srm"], stdout=subprocess.PIPE )
lines = uname.stdout.readlines() lines = uname.stdout.readlines()
osLine = lines[0].decode( 'ascii' )
if self._osSlsoc7x_64.match(lines[0]): if self._osSlsoc7x_64.match(osLine):
self._osType = "Linux.el7_64" self._osType = "Linux.el7_64"
self._libSuffix = "64" self._libSuffix = "64"
elif self._osSlsoc6x_64.match(lines[0]): elif self._osSlsoc6x_64.match(osLine):
self._osType = "Linux.slsoc6x_64" self._osType = "Linux.slsoc6x_64"
self._libSuffix = "64" self._libSuffix = "64"
elif self._osSlsoc6x .match(lines[0]): self._osType = "Linux.slsoc6x" elif self._osSlsoc6x .match(osLine): self._osType = "Linux.slsoc6x"
elif self._osSLSoC5x_64.match(lines[0]): elif self._osSLSoC5x_64.match(osLine):
self._osType = "Linux.SLSoC5x_64" self._osType = "Linux.SLSoC5x_64"
self._libSuffix = "64" self._libSuffix = "64"
elif self._osSLSoC5x .match(lines[0]): self._osType = "Linux.SLSoC5x" elif self._osSLSoC5x .match(osLine): self._osType = "Linux.SLSoC5x"
elif self._osFedora_64 .match(lines[0]): elif self._osFedora_64 .match(osLine):
self._osType = "Linux.fc_64" self._osType = "Linux.fc_64"
self._libSuffix = "64" self._libSuffix = "64"
elif self._osFedora .match(lines[0]): self._osType = "Linux.fc" elif self._osFedora .match(osLine): self._osType = "Linux.fc"
elif self._osLinux_64 .match(lines[0]): elif self._osLinux_64 .match(osLine):
self._osType = "Linux.x86_64" self._osType = "Linux.x86_64"
if os.path.exists("/usr/lib64/"): if os.path.exists("/usr/lib64/"):
self._libSuffix = "64" self._libSuffix = "64"
elif self._osLinux .match(lines[0]): self._osType = "Linux.i386" elif self._osLinux .match(osLine): self._osType = "Linux.i386"
elif self._osDarwin .match(lines[0]): self._osType = "Darwin" elif self._osDarwin .match(osLine): self._osType = "Darwin"
elif self._osFreeBSD8x_amd64.match(lines[0]): elif self._osFreeBSD8x_amd64.match(osLine):
self._osType = "FreeBSD.8x.amd64" self._osType = "FreeBSD.8x.amd64"
self._libSuffix = "64" self._libSuffix = "64"
elif self._osFreeBSD8x_64.match(lines[0]): elif self._osFreeBSD8x_64.match(osLine):
self._osType = "FreeBSD.8x.x86_64" self._osType = "FreeBSD.8x.x86_64"
self._libSuffix = "64" self._libSuffix = "64"
elif self._osFreeBSD8x .match(lines[0]): self._osType = "FreeBSD.8x.i386" elif self._osFreeBSD8x .match(osLine): self._osType = "FreeBSD.8x.i386"
elif self._osCygwinW7_64.match(lines[0]): elif self._osCygwinW7_64.match(osLine):
self._osType = "Cygwin.W7_64" self._osType = "Cygwin.W7_64"
self._libSuffix = "64" self._libSuffix = "64"
elif self._osCygwinW7.match(lines[0]): self._osType = "Cygwin.W7" elif self._osCygwinW7.match(osLine): self._osType = "Cygwin.W7"
elif self._osCygwinW8_64.match(lines[0]): elif self._osCygwinW8_64.match(osLine):
self._osType = "Cygwin.W8_64" self._osType = "Cygwin.W8_64"
self._libSuffix = "64" self._libSuffix = "64"
elif self._osCygwinW8.match(lines[0]): self._osType = "Cygwin.W8" elif self._osCygwinW8.match(osLine): self._osType = "Cygwin.W8"
elif self._osCygwinW10_64.match(lines[0]): elif self._osCygwinW10_64.match(osLine):
self._osType = "Cygwin.W10_64" self._osType = "Cygwin.W10_64"
self._libSuffix = "64" self._libSuffix = "64"
elif self._osCygwinW10.match(lines[0]): self._osType = "Cygwin.W10" elif self._osCygwinW10.match(osLine): self._osType = "Cygwin.W10"
else: else:
uname = subprocess.Popen ( ["uname", "-sr"], stdout=subprocess.PIPE ) uname = subprocess.Popen ( ["uname", "-sr"], stdout=subprocess.PIPE )
self._osType = uname.stdout.readlines()[0][:-1] self._osType = uname.stdout.readlines()[0][:-1]
print "[WARNING] Unrecognized OS: \"%s\"." % lines[0][:-1] print( '[WARNING] Unrecognized OS: "{}."'.format(osLine[:-1]) )
print " (using: \"%s\")" % self._osType print( ' (using: "{}")'.format(self._osType) )
if self._libSuffix == '64' and not os.path.exists('/usr/lib64'): if self._libSuffix == '64' and not os.path.exists('/usr/lib64'):
self._libSuffix = None self._libSuffix = None
return return
def getPrimaryIds ( self ): return Configuration.PrimaryNames def getPrimaryIds ( self ): return Configuration.PrimaryNames
def getSecondaryIds ( self ): return Configuration.SecondaryNames def getSecondaryIds ( self ): return Configuration.SecondaryNames
def getAllIds ( self ): return Configuration.PrimaryNames + Configuration.SecondaryNames def getAllIds ( self ): return Configuration.PrimaryNames + Configuration.SecondaryNames
def register ( self, project ): def register ( self, project ):
for registered in self._projects: for registered in self._projects:
if registered.getName() == project.getName(): if registered.getName() == project.getName():
print ErrorMessage( 0, "Project \"%s\" is already registered (ignored)." ) print( ErrorMessage( 0, 'Project "{}" is already registered (ignored).'.format(project.getName()) ))
return return
self._projects += [ project ] self._projects += [ project ]
return return
def getProject ( self, name ): def getProject ( self, name ):
for project in self._projects: for project in self._projects:
if project.getName() == name: if project.getName() == name:
return project return project
return None return None
def getToolProject ( self, name ): def getToolProject ( self, name ):
for project in self._projects: for project in self._projects:
if project.hasTool(name): if project.hasTool(name):
return project return project
return None return None
def load ( self, confFile ): def load ( self, confFile ):
moduleGlobals = globals() moduleGlobals = globals()
if not confFile: if not confFile:
print 'Making an educated guess to locate the configuration file:' print( 'Making an educated guess to locate the configuration file:' )
locations = [ os.path.abspath(os.path.dirname(sys.argv[0])) locations = [ os.path.abspath(os.path.dirname(sys.argv[0]))
, os.environ['HOME']+'/coriolis-2.x/src/coriolis/bootstrap' , os.environ['HOME']+'/coriolis-2.x/src/coriolis/bootstrap'
, os.environ['HOME']+'/coriolis/src/coriolis/bootstrap' , os.environ['HOME']+'/coriolis/src/coriolis/bootstrap'
@ -247,86 +234,82 @@ class Configuration ( object ):
for location in locations: for location in locations:
self._confFile = location + '/build.conf' self._confFile = location + '/build.conf'
print ' <%s>' % self._confFile print( ' "{}"'.format(self._confFile) )
if os.path.isfile(self._confFile): break if os.path.isfile(self._confFile): break
if not self._confFile: if not self._confFile:
ErrorMessage( 1, 'Cannot locate any configuration file.' ).terminate() ErrorMessage( 1, 'Cannot locate any configuration file.' ).terminate()
else: else:
print 'Using user-supplied configuration file:' print( 'Using user-supplied configuration file:' )
print ' <%s>' % confFile print( ' "{}"'.format(confFile) )
self._confFile = confFile self._confFile = confFile
if not os.path.isfile(self._confFile): if not os.path.isfile(self._confFile):
ErrorMessage( 1, 'Missing configuration file:', '<%s>'%self._confFile ).terminate() ErrorMessage( 1, 'Missing configuration file:', '<%s>'%self._confFile ).terminate()
print 'Reading configuration from:' print( 'Reading configuration from:' )
print ' <%s>' % self._confFile print( ' "{}"'.format(self._confFile) )
try: try:
execfile( self._confFile, moduleGlobals ) exec( open(self._confFile).read(), globals() )
except Exception, e: except Exception as e:
ErrorMessage( 1, 'An exception occured while loading the configuration file:' ErrorMessage( 1, 'An exception occured while loading the configuration file:'
, '<%s>\n' % (self._confFile) , '<%s>\n' % (self._confFile)
, 'You should check for simple python errors in this file.' , 'You should check for simple python errors in this file.'
, 'Error was:' , 'Error was:'
, '%s\n' % e ).terminate() , '%s\n' % e ).terminate()
if moduleGlobals.has_key('projects'): if 'projects' in moduleGlobals:
entryNb = 0 entryNb = 0
for entry in moduleGlobals['projects']: for entry in moduleGlobals['projects']:
entryNb += 1 entryNb += 1
if not entry.has_key('name'): if not 'name' in entry:
raise ErrorMessage( 1, 'Missing project name in project entry #%d.' % entryNb ) raise ErrorMessage( 1, 'Missing project name in project entry #%d.' % entryNb )
if not entry.has_key('tools'): if not 'tools' in entry:
raise ErrorMessage( 1, 'Missing tools list in project entry #%d (<%s>).' \ raise ErrorMessage( 1, 'Missing tools list in project entry #%d (<%s>).' \
% (entryNb,entry['name']) ) % (entryNb,entry['name']) )
if not isinstance(entry['tools'],list): if not isinstance(entry['tools'],list):
raise ErrorMessage( 1, 'Tools item of project entry #%d (<%s>) is not a list.' \ raise ErrorMessage( 1, 'Tools item of project entry #%d (<%s>) is not a list.' \
% (entryNb,entry['name']) ) % (entryNb,entry['name']) )
if not entry.has_key('repository'): if not 'repository' in entry:
raise ErrorMessage( 1, 'Missing project repository in project entry #%d.' \ raise ErrorMessage( 1, 'Missing project repository in project entry #%d.' \
% entryNb ) % entryNb )
self.register( Project(entry['name'],entry['tools'],entry['repository']) ) self.register( Project(entry['name'],entry['tools'],entry['repository']) )
else: else:
ErrorMessage( 1, 'Configuration file is missing the \'project\' symbol.' ErrorMessage( 1, 'Configuration file is missing the "project" symbol.'
, '<%s>'%self._confFile ).terminate() , '"{}"'.format(self._confFile) ).terminate()
if moduleGlobals.has_key('projectdir'): if 'projectdir' in moduleGlobals:
self.projectDir = moduleGlobals['projectdir'] self.projectDir = moduleGlobals['projectdir']
if 'svnconfig' in moduleGlobals:
if moduleGlobals.has_key('svnconfig'):
svnconfig = moduleGlobals['svnconfig'] svnconfig = moduleGlobals['svnconfig']
if svnconfig.has_key('method'): self._svnMethod = svnconfig['method'] if 'method' in svnconfig: self._svnMethod = svnconfig['method']
if 'package' in moduleGlobals:
if moduleGlobals.has_key('package'):
package = moduleGlobals['package'] package = moduleGlobals['package']
if package.has_key('name' ): self.packageName = package['name'] if 'name' in package: self.packageName = package['name']
if package.has_key('version' ): self.packageVersion = package['version'] if 'version' in package: self.packageVersion = package['version']
if package.has_key('excludes'): if 'excludes' in package:
if not isinstance(package['excludes'],list): if not isinstance(package['excludes'],list):
raise ErrorMessage( 1, 'Excludes of package configuration is not a list.') raise ErrorMessage( 1, 'Excludes of package configuration is not a list.')
self._packageExcludes = package['excludes'] self._packageExcludes = package['excludes']
if package.has_key('projects'): if 'projects' in package:
if not isinstance(package['projects'],list): if not isinstance(package['projects'],list):
raise ErrorMessage( 1, 'Projects to package is not a list.') raise ErrorMessage( 1, 'Projects to package is not a list.')
self._packageProjects = package['projects'] self._packageProjects = package['projects']
return return
def show ( self ): def show ( self ):
print 'CCB Configuration:' print( 'CCB Configuration:' )
if self._gitMethod: if self._gitMethod:
print ' Git Method: <%s>' % self._gitMethod print( ' Git Method: "{}"'.format(self._gitMethod) )
else: else:
print ' Git Method not defined, will not be able to push/pull.' print( ' Git Method not defined, will not be able to push/pull.' )
for project in self._projects: for project in self._projects:
print ' project:%-15s repository:<%s>' % ( ('<%s>'%project.getName()), project.getRepository() ) print( ' project:{0:>15} repository:"{1}"' \
.format( '"{}"'.format(project.getName()), project.getRepository() ))
toolOrder = 1 toolOrder = 1
for tool in project.getTools(): for tool in project.getTools():
print '%s%02d:<%s>' % (' '*26,toolOrder,tool) print( '{0}{1:02}:"{2}"'.format( ' '*26, toolOrder, tool ))
toolOrder += 1 toolOrder += 1
print print
return return

View File

@ -2,45 +2,32 @@
# -*- mode:Python -*- # -*- mode:Python -*-
# #
# This file is part of the Coriolis Software. # This file is part of the Coriolis Software.
# Copyright (c) UPMC/LIP6 2012-2018, All Rights Reserved # Copyright (c) Sorbonne Université 2012-2021, All Rights Reserved
# #
# +-----------------------------------------------------------------+ # +-----------------------------------------------------------------+
# | C O R I O L I S | # | C O R I O L I S |
# | C o r i o l i s / C h a m s B u i l d e r | # | T o o l c h a i n B u i l d e r |
# | | # | |
# | Author : Damien Dupuis | # | Author : Damien Dupuis |
# | E-mail : Jean-Paul.Chaput@asim.lip6.fr | # | E-mail : Jean-Paul.Chaput@lip6.fr |
# | =============================================================== | # | =============================================================== |
# | Python : "./builder/ConfigureWidget.py" | # | Python : "./builder/ConfigureWidget.py" |
# +-----------------------------------------------------------------+ # +-----------------------------------------------------------------+
from PyQt4.QtCore import Qt from PyQt4.QtCore import Qt, QVariant, pyqtSignal, QSettings, \
from PyQt4.QtCore import QVariant QModelIndex, QAbstractTableModel
from PyQt4.QtCore import pyqtSignal from PyQt4.QtGui import QFont, QWidget, QGridLayout, QHBoxLayout, \
from PyQt4.QtCore import QSettings QVBoxLayout, QLabel, QPushButton, \
from PyQt4.QtGui import QFont QLineEdit, QAbstractItemView, QHeaderView, \
from PyQt4.QtGui import QWidget QTableView, QGroupBox, QFileDialog, \
from PyQt4.QtGui import QGridLayout QApplication
from PyQt4.QtGui import QHBoxLayout from .Configuration import Configuration
from PyQt4.QtGui import QVBoxLayout
from PyQt4.QtGui import QLabel
from PyQt4.QtGui import QPushButton
from PyQt4.QtGui import QLineEdit
from PyQt4.QtCore import QModelIndex
from PyQt4.QtCore import QAbstractTableModel
from PyQt4.QtGui import QAbstractItemView
from PyQt4.QtGui import QHeaderView
from PyQt4.QtGui import QTableView
from PyQt4.QtGui import QGroupBox
from PyQt4.QtGui import QFileDialog
from PyQt4.QtGui import QApplication
from Configuration import Configuration
class ConfSettingsModel ( QAbstractTableModel ): class ConfSettingsModel ( QAbstractTableModel ):
HeaderFont = QApplication.font() HeaderFont = QApplication.font()
PrimaryFont = QFont('Courier',HeaderFont.pointSize()-2,QFont.Normal) PrimaryFont = QFont('Courier',HeaderFont.pointSize()-2,QFont.Normal)
SecondaryFont = QFont('Courier',HeaderFont.pointSize()-2,QFont.Normal) SecondaryFont = QFont('Courier',HeaderFont.pointSize()-2,QFont.Normal)
ValueFont = QFont('Courier',HeaderFont.pointSize()-2,QFont.Bold) ValueFont = QFont('Courier',HeaderFont.pointSize()-2,QFont.Bold)
@ -48,7 +35,6 @@ class ConfSettingsModel ( QAbstractTableModel ):
def __init__ ( self, conf, parent=None ): def __init__ ( self, conf, parent=None ):
ConfSettingsModel.HeaderFont.setBold( True ) ConfSettingsModel.HeaderFont.setBold( True )
ConfSettingsModel.SecondaryFont.setItalic( True ) ConfSettingsModel.SecondaryFont.setItalic( True )
QAbstractTableModel.__init__( self, parent ) QAbstractTableModel.__init__( self, parent )
self._conf = conf self._conf = conf
self._ids = self._conf.getAllIds() self._ids = self._conf.getAllIds()
@ -70,20 +56,15 @@ class ConfSettingsModel ( QAbstractTableModel ):
if row < self.rowCount(): if row < self.rowCount():
if index.column() == 0: return self._ids[row] if index.column() == 0: return self._ids[row]
elif index.column() == 1: return getattr( self._conf, self._ids[row] ) elif index.column() == 1: return getattr( self._conf, self._ids[row] )
return None
return QVariant()
def headerData ( self, section, orientation, role ): def headerData ( self, section, orientation, role ):
if orientation == Qt.Vertical: return QVariant() if orientation == Qt.Vertical: return None
if role == Qt.FontRole: return ConfSettingsModel.HeaderFont if role == Qt.FontRole: return ConfSettingsModel.HeaderFont
if role != Qt.DisplayRole: return QVariant() if role != Qt.DisplayRole: return None
if section == 0: return 'Setting' if section == 0: return 'Setting'
elif section == 1: return 'Value' elif section == 1: return 'Value'
return '?'
return QVariant('?')
def rowCount ( self, index=QModelIndex() ): return len(self._ids) def rowCount ( self, index=QModelIndex() ): return len(self._ids)
def columnCount ( self, index=QModelIndex() ): return 2 def columnCount ( self, index=QModelIndex() ): return 2
@ -119,79 +100,73 @@ class ConfSettingsWidget ( QWidget ):
peanoDataLayout = QGridLayout(); peanoDataLayout = QGridLayout();
peanoDataLayout.addWidget( self._view, 0, 0, 1, 1 ); peanoDataLayout.addWidget( self._view, 0, 0, 1, 1 );
self.setLayout ( peanoDataLayout ); self.setLayout ( peanoDataLayout );
return return
class ConfigureWidget ( QWidget ): class ConfigureWidget ( QWidget ):
def __init__ ( self, confFile, parent=None ): def __init__ ( self, confFile, parent=None ):
QWidget.__init__ ( self, parent ) QWidget.__init__ ( self, parent )
self._confFile = confFile self._confFile = confFile
self._conf = Configuration() self._conf = Configuration()
self._rootDir = '' self._rootDir = ''
rootDirLabel = QLabel( 'Root Directory' ) rootDirLabel = QLabel( 'Root Directory' )
rootDirBrowse = QPushButton( '&Browse' ) rootDirBrowse = QPushButton( '&Browse' )
rootDirBrowse.clicked.connect( self.browseRootDir ) rootDirBrowse.clicked.connect( self.browseRootDir )
self._rootDirEdit = QLineEdit( '' ) self._rootDirEdit = QLineEdit( '' )
#self._rootDirEdit.setFixedWidth( 600 ) #self._rootDirEdit.setFixedWidth( 600 )
gLayout = QGridLayout() gLayout = QGridLayout()
gLayout.addWidget( rootDirLabel , 0, 0, 1, 1 ) gLayout.addWidget( rootDirLabel , 0, 0, 1, 1 )
gLayout.addWidget( self._rootDirEdit, 0, 1, 1, 6 ) gLayout.addWidget( self._rootDirEdit, 0, 1, 1, 6 )
gLayout.addWidget( rootDirBrowse , 0, 7, 1, 1 ) gLayout.addWidget( rootDirBrowse , 0, 7, 1, 1 )
groupDirs = QGroupBox( 'Directories' ) groupDirs = QGroupBox( 'Directories' )
groupDirs.setLayout( gLayout ) groupDirs.setLayout( gLayout )
gLayout = QGridLayout()
groupConf = QGroupBox( 'Configuration' )
groupConf.setLayout( gLayout )
gLayout = QGridLayout() vLayout = QVBoxLayout()
groupConf = QGroupBox( 'Configuration' ) vLayout.addWidget ( groupDirs )
groupConf.setLayout( gLayout ) vLayout.addWidget ( groupConf )
#vLayout.addStretch()
vLayout = QVBoxLayout() self.setLayout( vLayout )
vLayout.addWidget ( groupDirs ) self._rootDirEdit.textChanged.connect( self.rootDirChanged )
vLayout.addWidget ( groupConf ) self.readSettings()
#vLayout.addStretch()
self.setLayout( vLayout ) noteLabel = QLabel( 'Those settings can be changed only by editing build.conf' )
gLayout.addWidget( noteLabel , 0, 0, 1, 1 )
gLayout.addWidget( ConfSettingsWidget(self._conf), 1, 0, 1, 1 )
self._rootDirEdit.textChanged.connect( self.rootDirChanged ) def _getConf ( self ): return self._conf
def _getRootDir ( self ): return self._rootDir
def _getBootstrapDir ( self ): return self._getConf().bootstrapDir
self.readSettings() conf = property( _getConf )
rootDir = property( _getRootDir )
bootstrapDir = property( _getBootstrapDir )
noteLabel = QLabel( 'Those settings can be changed only by editing build.conf' ) def rootDirChanged ( self, rootDir ):
gLayout.addWidget( noteLabel , 0, 0, 1, 1 ) self._rootDir = rootDir
gLayout.addWidget( ConfSettingsWidget(self._conf), 1, 0, 1, 1 ) return
def browseRootDir ( self ):
self._rootDirEdit.setText( QFileDialog.getExistingDirectory(self,'Select the Building Root Directory') )
return
def _getConf ( self ): return self._conf def readSettings ( self ):
def _getRootDir ( self ): return self._rootDir settings = QSettings()
def _getBootstrapDir ( self ): return self._getConf().bootstrapDir self._rootDirEdit.setText( settings.value('conf/rootDir') )
if not self._confFile and settings.value('conf/confFile'):
self._confFile = str( settings.value('conf/confFile') )
self._conf.load( self._confFile )
return
conf = property( _getConf ) def saveSettings ( self ):
rootDir = property( _getRootDir ) settings = QSettings()
bootstrapDir = property( _getBootstrapDir ) settings.setValue( 'conf/rootDir' , self._rootDirEdit.text() )
settings.setValue( 'conf/confFile', self._confFile )
return
def rootDirChanged ( self, rootDir ):
self._rootDir = rootDir
return
def browseRootDir ( self ):
self._rootDirEdit.setText( QFileDialog.getExistingDirectory(self,'Select the Building Root Directory') )
return
def readSettings ( self ):
settings = QSettings()
self._rootDirEdit.setText( settings.value('conf/rootDir').toString() )
if not self._confFile and settings.value('conf/confFile'):
self._confFile = str( settings.value('conf/confFile').toString() )
self._conf.load( self._confFile )
return
def saveSettings ( self ):
settings = QSettings()
settings.setValue( 'conf/rootDir' , self._rootDirEdit.text() )
settings.setValue( 'conf/confFile', self._confFile )
return

View File

@ -2,14 +2,14 @@
# -*- mode:Python -*- # -*- mode:Python -*-
# #
# This file is part of the Coriolis Software. # This file is part of the Coriolis Software.
# Copyright (c) UPMC/LIP6 2012-2018, All Rights Reserved # Copyright (c) Sorbonne Université 2012-2021, All Rights Reserved
# #
# +-----------------------------------------------------------------+ # +-----------------------------------------------------------------+
# | C O R I O L I S | # | C O R I O L I S |
# | C o r i o l i s / C h a m s B u i l d e r | # | T o o l c h a i n B u i l d e r |
# | | # | |
# | Author : Damien Dupuis | # | Author : Damien Dupuis |
# | E-mail : Jean-Paul.Chaput@asim.lip6.fr | # | E-mail : Jean-Paul.Chaput@lip6.fr |
# | =============================================================== | # | =============================================================== |
# | Python : "./builder/Highlighter.py" | # | Python : "./builder/Highlighter.py" |
# +-----------------------------------------------------------------+ # +-----------------------------------------------------------------+
@ -17,64 +17,61 @@
import re import re
from PyQt4.QtCore import Qt from PyQt4.QtCore import Qt
from PyQt4.QtGui import QFont from PyQt4.QtGui import QFont, QColor, QTextCharFormat, QSyntaxHighlighter
from PyQt4.QtGui import QColor
from PyQt4.QtGui import QTextCharFormat
from PyQt4.QtGui import QSyntaxHighlighter
class Highlighter ( QSyntaxHighlighter ): class Highlighter ( QSyntaxHighlighter ):
Normal = 0x0001 Normal = 0x0001
Bold = 0x0002 Bold = 0x0002
Italic = 0x0004 Italic = 0x0004
ttyBackground = QColor.fromRgb( 255, 255, 221 ) # #ffffdd ttyBackground = QColor.fromRgb( 255, 255, 221 ) # #ffffdd
ttyBlack = QColor.fromRgb( 46, 52, 54 ) # #2e3436 ttyBlack = QColor.fromRgb( 46, 52, 54 ) # #2e3436
ttyRed = QColor.fromRgb( 204, 0, 0 ) # #cc0000 ttyRed = QColor.fromRgb( 204, 0, 0 ) # #cc0000
ttyGreen = QColor.fromRgb( 78, 154, 6 ) # #4e9a06 ttyGreen = QColor.fromRgb( 78, 154, 6 ) # #4e9a06
ttyYellow = QColor.fromRgb( 196, 160, 0 ) # #c4a000 ttyYellow = QColor.fromRgb( 196, 160, 0 ) # #c4a000
ttyBlue = QColor.fromRgb( 52, 101, 164 ) # #3465a4 ttyBlue = QColor.fromRgb( 52, 101, 164 ) # #3465a4
ttyViolet = QColor.fromRgb( 117, 80, 123 ) # #75507b ttyViolet = QColor.fromRgb( 117, 80, 123 ) # #75507b
ttyCyan = QColor.fromRgb( 6, 152, 154 ) # #06989a ttyCyan = QColor.fromRgb( 6, 152, 154 ) # #06989a
ttyGrey = QColor.fromRgb( 211, 215, 207 ) # #d3d7cf ttyGrey = QColor.fromRgb( 211, 215, 207 ) # #d3d7cf
ttyLightBlack = QColor.fromRgb( 85, 87, 83 ) # #555753 ttyLightBlack = QColor.fromRgb( 85, 87, 83 ) # #555753
ttyLightRed = QColor.fromRgb( 239, 41, 41 ) # #ef2929 ttyLightRed = QColor.fromRgb( 239, 41, 41 ) # #ef2929
ttyLightGreen = QColor.fromRgb( 138, 226, 52 ) # #8ae234 ttyLightGreen = QColor.fromRgb( 138, 226, 52 ) # #8ae234
ttyLightYellow = QColor.fromRgb( 252, 233, 79 ) # #fce94f ttyLightYellow = QColor.fromRgb( 252, 233, 79 ) # #fce94f
ttyLightBlue = QColor.fromRgb( 114, 159, 207 ) # #729fcf ttyLightBlue = QColor.fromRgb( 114, 159, 207 ) # #729fcf
ttyLightViolet = QColor.fromRgb( 173, 127, 168 ) # #ad7fa8 ttyLightViolet = QColor.fromRgb( 173, 127, 168 ) # #ad7fa8
ttyLightCyan = QColor.fromRgb( 52, 226, 226 ) # #34e2e2 ttyLightCyan = QColor.fromRgb( 52, 226, 226 ) # #34e2e2
ttyLightGrey = QColor.fromRgb( 238, 238, 236 ) # #eeeeec ttyLightGrey = QColor.fromRgb( 238, 238, 236 ) # #eeeeec
Rules = [ [ttyLightViolet, Bold , re.compile(r'^Scanning.*'), None] Rules = [ [ttyLightViolet, Bold , re.compile(r'^Scanning.*'), None]
, [ttyLightRed , Bold , re.compile(r'^Linking.*'), None] , [ttyLightRed , Bold , re.compile(r'^Linking.*'), None]
, [ttyLightGreen , Normal , re.compile(r'^\[(?P<percent>\s*\d+)%\]\s*(?P<message>Building.*)'), None] , [ttyLightGreen , Normal , re.compile(r'^\[(?P<percent>\s*\d+)%\]\s*(?P<message>Building.*)'), None]
, [ttyLightGreen , Bold , re.compile(r'^\[(?P<percent>\s*\d+)%\]\s*(?P<message>Built target.*)'), None] , [ttyLightGreen , Bold , re.compile(r'^\[(?P<percent>\s*\d+)%\]\s*(?P<message>Built target.*)'), None]
, [ttyLightBlue , Normal , re.compile(r'^\[(?P<percent>\s*\d+)%\]\s*(?P<message>Generating.*moc_.*)'), None] , [ttyLightBlue , Normal , re.compile(r'^\[(?P<percent>\s*\d+)%\]\s*(?P<message>Generating.*moc_.*)'), None]
, [ttyLightBlue , Bold , re.compile(r'^Generating.*'), None] , [ttyLightBlue , Bold , re.compile(r'^Generating.*'), None]
, [ttyLightCyan , Normal , re.compile(r'^Install the project.*'), None] , [ttyLightCyan , Normal , re.compile(r'^Install the project.*'), None]
, [ttyCyan , Bold , re.compile(r'^-- Install.*'), None] , [ttyCyan , Bold , re.compile(r'^-- Install.*'), None]
, [ttyCyan , Bold|Italic, re.compile(r'^-- Up-to-date.*'), None] , [ttyCyan , Bold|Italic, re.compile(r'^-- Up-to-date.*'), None]
] ]
def __init__ ( self, parent=None ): def __init__ ( self, parent=None ):
QSyntaxHighlighter.__init__ ( self, parent ) QSyntaxHighlighter.__init__ ( self, parent )
for rule in Highlighter.Rules: for rule in Highlighter.Rules:
if not rule[3]: if not rule[3]:
rule[3] = QTextCharFormat() rule[3] = QTextCharFormat()
rule[3].setForeground( rule[0] ) rule[3].setForeground( rule[0] )
if rule[1] & Highlighter.Normal: rule[3].setFontWeight( QFont.Normal ) if rule[1] & Highlighter.Normal: rule[3].setFontWeight( QFont.Normal )
if rule[1] & Highlighter.Bold: rule[3].setFontWeight( QFont.Bold ) if rule[1] & Highlighter.Bold: rule[3].setFontWeight( QFont.Bold )
if rule[1] & Highlighter.Italic: rule[3].setFontItalic( True ) if rule[1] & Highlighter.Italic: rule[3].setFontItalic( True )
return return
def highlightBlock ( self, line ): def highlightBlock ( self, line ):
for rule in Highlighter.Rules: for rule in Highlighter.Rules:
m = rule[2].match(line) m = rule[2].match(line)
if m: if m:
if m.groupdict().has_key('percent'): if 'percent' in m.groupdict():
self.setFormat( 7, len(line), rule[3] ) self.setFormat( 7, len(line), rule[3] )
else: else:
self.setFormat( 0, len(line), rule[3] ) self.setFormat( 0, len(line), rule[3] )
return return

View File

@ -2,14 +2,14 @@
# -*- mode:Python -*- # -*- mode:Python -*-
# #
# This file is part of the Coriolis Software. # This file is part of the Coriolis Software.
# Copyright (c) UPMC/LIP6 2012-2018, All Rights Reserved # Copyright (c) Sorbonne Université 2012-2021, All Rights Reserved
# #
# +-----------------------------------------------------------------+ # +-----------------------------------------------------------------+
# | C O R I O L I S | # | C O R I O L I S |
# | C o r i o l i s / C h a m s B u i l d e r | # | T o o l c h a i n B u i l d e r |
# | | # | |
# | Author : Damien Dupuis | # | Author : Damien Dupuis |
# | E-mail : Jean-Paul.Chaput@asim.lip6.fr | # | E-mail : Jean-Paul.Chaput@lip6.fr |
# | =============================================================== | # | =============================================================== |
# | Python : "./builder/OptionsWidget.py" | # | Python : "./builder/OptionsWidget.py" |
# +-----------------------------------------------------------------+ # +-----------------------------------------------------------------+
@ -17,176 +17,163 @@
import re import re
import subprocess import subprocess
from PyQt4.QtCore import Qt from PyQt4.QtCore import Qt, pyqtSignal, QSettings
from PyQt4.QtCore import pyqtSignal from PyQt4.QtGui import QColor, QWidget, QPushButton, \
from PyQt4.QtCore import QSettings QCheckBox, QGroupBox, QButtonGroup, \
from PyQt4.QtGui import QColor QVBoxLayout, QHBoxLayout, QGridLayout, \
from PyQt4.QtGui import QWidget QScrollArea, QComboBox
from PyQt4.QtGui import QPushButton from .Project import Project
from PyQt4.QtGui import QCheckBox from .ConfigureWidget import ConfigureWidget
from PyQt4.QtGui import QGroupBox from .ProjectWidgets import ProjectWidgets
from PyQt4.QtGui import QButtonGroup
from PyQt4.QtGui import QVBoxLayout
from PyQt4.QtGui import QHBoxLayout
from PyQt4.QtGui import QGridLayout
from PyQt4.QtGui import QScrollArea
from PyQt4.QtGui import QComboBox
from builder.Project import Project
from builder.ConfigureWidget import ConfigureWidget
from builder.ProjectWidgets import ProjectWidgets
class OptionsWidget ( QWidget ): class OptionsWidget ( QWidget ):
progress = pyqtSignal(int) progress = pyqtSignal(int)
def __init__ ( self, conf, parent=None ): def __init__ ( self, conf, parent=None ):
QWidget.__init__ ( self, parent ) QWidget.__init__ ( self, parent )
self._conf = conf self._conf = conf
self._projects = [] self._projects = []
for project in self._conf.projects: for project in self._conf.projects:
self._projects += [ ProjectWidgets(project) ] self._projects += [ ProjectWidgets(project) ]
gLayout = QGridLayout() gLayout = QGridLayout()
column = 0 column = 0
for iproject in range(len(self._projects)): for iproject in range(len(self._projects)):
column += self._projects[iproject].addToLayout( column, gLayout ) column += self._projects[iproject].addToLayout( column, gLayout )
toolsGroup = QGroupBox( 'Projects && Tools' ) toolsGroup = QGroupBox( 'Projects && Tools' )
toolsGroup.setLayout( gLayout ) toolsGroup.setLayout( gLayout )
scrollToolsGroup = QScrollArea() scrollToolsGroup = QScrollArea()
scrollToolsGroup.setMinimumHeight( 350 ) scrollToolsGroup.setMinimumHeight( 350 )
#scrollToolsGroup.setVerticalScrollBarPolicy( Qt.ScrollBarAlwaysOn ) #scrollToolsGroup.setVerticalScrollBarPolicy( Qt.ScrollBarAlwaysOn )
scrollToolsGroup.setWidget( toolsGroup ) scrollToolsGroup.setWidget( toolsGroup )
self._buildMode = QComboBox() self._buildMode = QComboBox()
self._buildMode.addItems( ('Release', 'Debug') ) self._buildMode.addItems( ('Release', 'Debug') )
#self._svnUpdate = QCheckBox( 'SVN Update' ) #self._svnUpdate = QCheckBox( 'SVN Update' )
#self._svnStatus = QCheckBox( 'SVN Status' ) #self._svnStatus = QCheckBox( 'SVN Status' )
self._make = QCheckBox( 'Build' ) self._make = QCheckBox( 'Build' )
self._enableDoc = QCheckBox( 'Build Documentation' ) self._enableDoc = QCheckBox( 'Build Documentation' )
self._devtoolset = QCheckBox( 'Build with devtoolset 8' ) self._devtoolset = QCheckBox( 'Build with devtoolset 8' )
self._qt5 = QCheckBox( 'Build with Qt 5 (Qt 4 default)' ) self._qt5 = QCheckBox( 'Build with Qt 5 (Qt 4 default)' )
self._noCache = QCheckBox( 'Remove previous CMake cache' ) self._noCache = QCheckBox( 'Remove previous CMake cache' )
self._rmBuild = QCheckBox( 'Cleanup Build Directory' ) self._rmBuild = QCheckBox( 'Cleanup Build Directory' )
self._verbose = QCheckBox( 'Display Compiler Commands' ) self._verbose = QCheckBox( 'Display Compiler Commands' )
self._threads = QComboBox() self._threads = QComboBox()
for j in range(16): for j in range(16):
self._threads.addItem( '-j%d'%(j+1), j+1 ) self._threads.addItem( '-j%d'%(j+1), j+1 )
self._commandGroup = QButtonGroup() self._commandGroup = QButtonGroup()
self._commandGroup.setExclusive( True ) self._commandGroup.setExclusive( True )
#self._commandGroup.addButton( self._svnUpdate ) #self._commandGroup.addButton( self._svnUpdate )
#self._commandGroup.addButton( self._svnStatus ) #self._commandGroup.addButton( self._svnStatus )
self._commandGroup.addButton( self._make ) self._commandGroup.addButton( self._make )
vLayout = QVBoxLayout() vLayout = QVBoxLayout()
#vLayout.addWidget( self._svnUpdate ) #vLayout.addWidget( self._svnUpdate )
#vLayout.addWidget( self._svnStatus ) #vLayout.addWidget( self._svnStatus )
vLayout.addWidget( self._make ) vLayout.addWidget( self._make )
vLayout.addStretch() vLayout.addStretch()
commandGroup = QGroupBox( 'Command' ) commandGroup = QGroupBox( 'Command' )
commandGroup.setLayout( vLayout ) commandGroup.setLayout( vLayout )
vLayout = QVBoxLayout() vLayout = QVBoxLayout()
vLayout.addWidget( self._buildMode ) vLayout.addWidget( self._buildMode )
vLayout.addWidget( self._enableDoc ) vLayout.addWidget( self._enableDoc )
vLayout.addWidget( self._devtoolset ) vLayout.addWidget( self._devtoolset )
vLayout.addWidget( self._qt5 ) vLayout.addWidget( self._qt5 )
vLayout.addWidget( self._noCache ) vLayout.addWidget( self._noCache )
vLayout.addWidget( self._rmBuild ) vLayout.addWidget( self._rmBuild )
vLayout.addStretch() vLayout.addStretch()
optionsGroup = QGroupBox( 'Command Options' ) optionsGroup = QGroupBox( 'Command Options' )
optionsGroup.setLayout( vLayout ) optionsGroup.setLayout( vLayout )
vLayout = QVBoxLayout() vLayout = QVBoxLayout()
vLayout.addWidget( self._threads ) vLayout.addWidget( self._threads )
vLayout.addWidget( self._verbose ) vLayout.addWidget( self._verbose )
vLayout.addStretch() vLayout.addStretch()
miscGroup = QGroupBox( 'Misc. Options' ) miscGroup = QGroupBox( 'Misc. Options' )
miscGroup.setLayout( vLayout ) miscGroup.setLayout( vLayout )
hLayout = QHBoxLayout() hLayout = QHBoxLayout()
hLayout.addWidget( commandGroup ) hLayout.addWidget( commandGroup )
hLayout.addWidget( optionsGroup ) hLayout.addWidget( optionsGroup )
hLayout.addWidget( miscGroup ) hLayout.addWidget( miscGroup )
commands = QWidget() commands = QWidget()
commands.setLayout( hLayout ) commands.setLayout( hLayout )
vLayout = QVBoxLayout() vLayout = QVBoxLayout()
vLayout.addWidget( commands ) vLayout.addWidget( commands )
vLayout.addWidget( scrollToolsGroup ) vLayout.addWidget( scrollToolsGroup )
vLayout.addStretch() vLayout.addStretch()
self.setLayout( vLayout ) self.setLayout( vLayout )
self.readSettings() self.readSettings()
return return
def _getProjects ( self ): return self._projects
def _getBuildMode ( self ): return self._buildMode.currentText()
def _getThreads ( self ): return self._threads.currentText()
#def _getSvnUpdate ( self ): return self._svnUpdate.isChecked()
#def _getSvnStatus ( self ): return self._svnStatus.isChecked()
def _getMake ( self ): return self._make.isChecked()
def _getEnableDoc ( self ): return self._enableDoc.isChecked()
def _getDevtoolset ( self ): return self._devtoolset.isChecked()
def _getQt5 ( self ): return self._qt5.isChecked()
def _getNoCache ( self ): return self._noCache.isChecked()
def _getRmBuild ( self ): return self._rmBuild.isChecked()
def _getVerbose ( self ): return self._verbose.isChecked()
def _getProjects ( self ): return self._projects projects = property( _getProjects )
def _getBuildMode ( self ): return self._buildMode.currentText() buildMode = property( _getBuildMode )
def _getThreads ( self ): return self._threads.currentText() threads = property( _getThreads )
#def _getSvnUpdate ( self ): return self._svnUpdate.isChecked() #svnUpdate = property( _getSvnUpdate )
#def _getSvnStatus ( self ): return self._svnStatus.isChecked() #svnStatus = property( _getSvnStatus )
def _getMake ( self ): return self._make.isChecked() make = property( _getMake )
def _getEnableDoc ( self ): return self._enableDoc.isChecked() enableDoc = property( _getEnableDoc )
def _getDevtoolset ( self ): return self._devtoolset.isChecked() devtoolset = property( _getDevtoolset )
def _getQt5 ( self ): return self._qt5.isChecked() qt5 = property( _getQt5 )
def _getNoCache ( self ): return self._noCache.isChecked() noCache = property( _getNoCache )
def _getRmBuild ( self ): return self._rmBuild.isChecked() rmBuild = property( _getRmBuild )
def _getVerbose ( self ): return self._verbose.isChecked() verbose = property( _getVerbose )
projects = property( _getProjects ) def readSettings ( self ):
buildMode = property( _getBuildMode ) settings = QSettings()
threads = property( _getThreads ) #self._svnUpdate .setChecked( bool(settings.value('builder/svnUpdate' )) )
#svnUpdate = property( _getSvnUpdate ) #self._svnStatus .setChecked( bool(settings.value('builder/svnStatus' )) )
#svnStatus = property( _getSvnStatus ) self._make .setChecked( bool(settings.value('builder/make' )) )
make = property( _getMake ) self._enableDoc .setChecked( bool(settings.value('builder/enableDoc' )) )
enableDoc = property( _getEnableDoc ) self._devtoolset .setChecked( bool(settings.value('builder/devtoolset')) )
devtoolset = property( _getDevtoolset ) self._qt5 .setChecked( bool(settings.value('builder/qt5' )) )
qt5 = property( _getQt5 ) self._noCache .setChecked( bool(settings.value('builder/noCache' )) )
noCache = property( _getNoCache ) self._rmBuild .setChecked( bool(settings.value('builder/rmBuild' )) )
rmBuild = property( _getRmBuild ) self._verbose .setChecked( bool(settings.value('builder/verbose' )) )
verbose = property( _getVerbose )
buildModeName = settings.value('builder/buildMode')
index = self._buildMode.findText( buildModeName )
if index >= 0: self._buildMode.setCurrentIndex( index )
def readSettings ( self ): threads = settings.value('builder/threads')
settings = QSettings() index = self._threads.findText( threads )
#self._svnUpdate .setChecked( settings.value('builder/svnUpdate').toBool() ) if index >= 0: self._threads.setCurrentIndex( index )
#self._svnStatus .setChecked( settings.value('builder/svnStatus').toBool() )
self._make .setChecked( settings.value('builder/make' ).toBool() )
self._enableDoc .setChecked( settings.value('builder/enableDoc').toBool() )
self._devtoolset .setChecked( settings.value('builder/devtoolset').toBool() )
self._qt5 .setChecked( settings.value('builder/qt5').toBool() )
self._noCache .setChecked( settings.value('builder/noCache' ).toBool() )
self._rmBuild .setChecked( settings.value('builder/rmBuild' ).toBool() )
self._verbose .setChecked( settings.value('builder/verbose' ).toBool() )
buildModeName = settings.value('builder/buildMode').toString() for project in self._projects: project.readFromSettings()
index = self._buildMode.findText( buildModeName ) return
if index >= 0: self._buildMode.setCurrentIndex( index )
threads = settings.value('builder/threads').toString() def saveSettings ( self ):
index = self._threads.findText( threads ) settings = QSettings()
if index >= 0: self._threads.setCurrentIndex( index ) #settings.setValue('builder/svnUpdate' , self._svnUpdate .isChecked() )
#settings.setValue('builder/svnStatus' , self._svnStatus .isChecked() )
for project in self._projects: project.readFromSettings() settings.setValue('builder/make' , self._make .isChecked() )
return settings.setValue('builder/enableDoc' , self._enableDoc .isChecked() )
settings.setValue('builder/devtoolset', self._devtoolset.isChecked() )
settings.setValue('builder/qt5' , self._qt5 .isChecked() )
def saveSettings ( self ): settings.setValue('builder/buildMode' , self._buildMode .currentText() )
settings = QSettings() settings.setValue('builder/noCache' , self._noCache .isChecked() )
#settings.setValue('builder/svnUpdate' , self._svnUpdate .isChecked() ) settings.setValue('builder/rmBuild' , self._rmBuild .isChecked() )
#settings.setValue('builder/svnStatus' , self._svnStatus .isChecked() ) settings.setValue('builder/verbose' , self._verbose .isChecked() )
settings.setValue('builder/make' , self._make .isChecked() ) settings.setValue('builder/threads' , self._threads .currentText() )
settings.setValue('builder/enableDoc' , self._enableDoc .isChecked() ) for project in self._projects: project.saveToSettings()
settings.setValue('builder/devtoolset', self._devtoolset.isChecked() ) return
settings.setValue('builder/qt5' , self._qt5 .isChecked() )
settings.setValue('builder/buildMode' , self._buildMode .currentText() )
settings.setValue('builder/noCache' , self._noCache .isChecked() )
settings.setValue('builder/rmBuild' , self._rmBuild .isChecked() )
settings.setValue('builder/verbose' , self._verbose .isChecked() )
settings.setValue('builder/threads' , self._threads .currentText() )
for project in self._projects: project.saveToSettings()
return

View File

@ -2,14 +2,14 @@
# -*- mode:Python -*- # -*- mode:Python -*-
# #
# This file is part of the Coriolis Software. # This file is part of the Coriolis Software.
# Copyright (c) UPMC/LIP6 2012-2018, All Rights Reserved # Copyright (c) Sorbonne Université 2012-2021, All Rights Reserved
# #
# +-----------------------------------------------------------------+ # +-----------------------------------------------------------------+
# | C O R I O L I S | # | C O R I O L I S |
# | C o r i o l i s / C h a m s B u i l d e r | # | T o o l c h a i n B u i l d e r |
# | | # | |
# | Author : Jean-Paul Chaput | # | Author : Jean-Paul Chaput |
# | E-mail : Jean-Paul.Chaput@asim.lip6.fr | # | E-mail : Jean-Paul.Chaput@lip6.fr |
# | =============================================================== | # | =============================================================== |
# | Python : "./builder/Project.py" | # | Python : "./builder/Project.py" |
# +-----------------------------------------------------------------+ # +-----------------------------------------------------------------+

View File

@ -2,93 +2,83 @@
# -*- mode:Python -*- # -*- mode:Python -*-
# #
# This file is part of the Coriolis Software. # This file is part of the Coriolis Software.
# Copyright (c) UPMC/LIP6 2012-2018, All Rights Reserved # Copyright (c) Sorbonne Université 2012-2021, All Rights Reserved
# #
# +-----------------------------------------------------------------+ # +-----------------------------------------------------------------+
# | C O R I O L I S | # | C O R I O L I S |
# | C o r i o l i s / C h a m s B u i l d e r | # | T o o l c h a i n B u i l d e r |
# | | # | |
# | Author : Jean-Paul Chaput | # | Author : Jean-Paul Chaput |
# | E-mail : Jean-Paul.Chaput@asim.lip6.fr | # | E-mail : Jean-Paul.Chaput@lip6.fr |
# | =============================================================== | # | =============================================================== |
# | Python : "./builder/ProjectWidget.py" | # | Python : "./builder/ProjectWidget.py" |
# +-----------------------------------------------------------------+ # +-----------------------------------------------------------------+
import string import string
from PyQt4.QtCore import Qt from PyQt4.QtCore import Qt, QObject, QSettings
from PyQt4.QtCore import QObject from PyQt4.QtGui import QSizePolicy, QFrame, QPushButton, QCheckBox, \
from PyQt4.QtCore import QSettings QLabel
from PyQt4.QtGui import QSizePolicy
from PyQt4.QtGui import QFrame
from PyQt4.QtGui import QPushButton
from PyQt4.QtGui import QCheckBox
from PyQt4.QtGui import QLabel
class ProjectWidgets ( QObject ): class ProjectWidgets ( QObject ):
def __init__ ( self, project ): def __init__ ( self, project ):
self._project = project self._project = project
self._projectButton = QLabel( string.capwords(self._project.getName()) ) self._projectButton = QLabel( string.capwords(self._project.getName()) )
self._projectButton.setStyleSheet( 'font-weight: bold;' ) self._projectButton.setStyleSheet( 'font-weight: bold;' )
self._projectButton.setFrameShape( QFrame.Box ) self._projectButton.setFrameShape( QFrame.Box )
self._projectButton.setSizePolicy( QSizePolicy.Expanding, QSizePolicy.Preferred ) self._projectButton.setSizePolicy( QSizePolicy.Expanding, QSizePolicy.Preferred )
self._toolsCheckBoxes = []
for tool in self._project.getTools():
self._toolsCheckBoxes += [ QCheckBox( tool.name ) ]
#self._projectButton.clicked.connect( self.toggleToolsVisibility )
return
self._toolsCheckBoxes = [] def _getProjectButton ( self ): return self._projectButton
for tool in self._project.getTools(): def _getToolsCheckBoxes ( self ): return self._toolsCheckBoxes
self._toolsCheckBoxes += [ QCheckBox( tool.name ) ]
#self._projectButton.clicked.connect( self.toggleToolsVisibility ) def _getActives ( self ):
return actives = []
for toolCb in self._toolsCheckBoxes:
if toolCb.isChecked(): actives += [ str(toolCb.text()) ]
return actives
def _getProjectButton ( self ): return self._projectButton projectButton = property( _getProjectButton )
def _getToolsCheckBoxes ( self ): return self._toolsCheckBoxes toolsCheckBoxes = property( _getToolsCheckBoxes )
actives = property( _getActives )
def _getActives ( self ): def addToLayout( self, column, layout ):
actives = [] toolsNb = len(self._toolsCheckBoxes)
for toolCb in self._toolsCheckBoxes: if toolsNb <= 10:
if toolCb.isChecked(): actives += [ str(toolCb.text()) ] layout.addWidget( self._projectButton, 0, column, Qt.AlignLeft )
return actives for row in range(toolsNb):
layout.addWidget( self._toolsCheckBoxes[row], row+1, column, Qt.AlignTop )
return 1
columnSpan = toolsNb / 10
if toolsNb % 10: columnSpan += 1
layout.addWidget( self._projectButton, 0, column, 1, columnSpan, Qt.AlignJustify )
for row in range(toolsNb):
if row and row % 10 == 0: column += 1
layout.addWidget( self._toolsCheckBoxes[row], row%10+1, column, Qt.AlignTop )
return columnSpan
projectButton = property( _getProjectButton ) #def toggleToolsVisibility ( self ):
toolsCheckBoxes = property( _getToolsCheckBoxes ) # self._visibleTools = not self._visibleTools
actives = property( _getActives ) # for toolCb in self._toolsCheckBoxes:
# toolCb.setVisible( self._visibleTools )
# return
def addToLayout( self, column, layout ): def readFromSettings ( self ):
toolsNb = len(self._toolsCheckBoxes) settings = QSettings()
if toolsNb <= 10: for toolCb in self._toolsCheckBoxes:
layout.addWidget( self._projectButton, 0, column, Qt.AlignLeft ) toolId = 'tools/'+self._project.getName()+'/'+toolCb.text()
for row in range(toolsNb): toolCb.setChecked( bool(settings.value(toolId)) )
layout.addWidget( self._toolsCheckBoxes[row], row+1, column, Qt.AlignTop ) return
return 1
columnSpan = toolsNb / 10 def saveToSettings ( self ):
if toolsNb % 10: columnSpan += 1 settings = QSettings()
for toolCb in self._toolsCheckBoxes:
layout.addWidget( self._projectButton, 0, column, 1, columnSpan, Qt.AlignJustify ) toolId = 'tools/'+self._project.getName()+'/'+toolCb.text()
for row in range(toolsNb): settings.setValue( toolId, toolCb.isChecked() )
if row and row % 10 == 0: column += 1 return
layout.addWidget( self._toolsCheckBoxes[row], row%10+1, column, Qt.AlignTop )
return columnSpan
#def toggleToolsVisibility ( self ):
# self._visibleTools = not self._visibleTools
# for toolCb in self._toolsCheckBoxes:
# toolCb.setVisible( self._visibleTools )
# return
def readFromSettings ( self ):
settings = QSettings()
for toolCb in self._toolsCheckBoxes:
toolId = 'tools/'+self._project.getName()+'/'+toolCb.text()
toolCb.setChecked( settings.value(toolId).toBool() )
return
def saveToSettings ( self ):
settings = QSettings()
for toolCb in self._toolsCheckBoxes:
toolId = 'tools/'+self._project.getName()+'/'+toolCb.text()
settings.setValue( toolId, toolCb.isChecked() )
return

View File

@ -2,14 +2,14 @@
# -*- mode:Python -*- # -*- mode:Python -*-
# #
# This file is part of the Coriolis Software. # This file is part of the Coriolis Software.
# Copyright (c) UPMC/LIP6 2012-2018, All Rights Reserved # Copyright (c) Sorbonne Université 2012-2021, All Rights Reserved
# #
# +-----------------------------------------------------------------+ # +-----------------------------------------------------------------+
# | C O R I O L I S | # | C O R I O L I S |
# | C o r i o l i s / C h a m s B u i l d e r | # | T o o l c h a i n B u i l d e r |
# | | # | |
# | Author : Damien Dupuis | # | Author : Damien Dupuis |
# | E-mail : Jean-Paul.Chaput@asim.lip6.fr | # | E-mail : Jean-Paul.Chaput@lip6.fr |
# | =============================================================== | # | =============================================================== |
# | Python : "./builder/__init__.py" | # | Python : "./builder/__init__.py" |
# +-----------------------------------------------------------------+ # +-----------------------------------------------------------------+
@ -21,8 +21,7 @@ class ErrorMessage ( Exception ):
def __init__ ( self, code, *arguments ): def __init__ ( self, code, *arguments ):
self._code = code self._code = code
self._errors = [ 'Malformed call to ErrorMessage()' self._errors = [ 'Malformed call to ErrorMessage()', '{}'.format(arguments) ]
, '%s' % str(arguments) ]
text = None text = None
if len(arguments) == 1: if len(arguments) == 1:
@ -31,7 +30,6 @@ class ErrorMessage ( Exception ):
self._errors = arguments[0] self._errors = arguments[0]
elif len(arguments) > 1: elif len(arguments) > 1:
text = list(arguments) text = list(arguments)
if text: if text:
self._errors = [] self._errors = []
while len(text[0]) == 0: del text[0] while len(text[0]) == 0: del text[0]
@ -50,11 +48,10 @@ class ErrorMessage ( Exception ):
def __str__ ( self ): def __str__ ( self ):
if not isinstance(self._errors,list): if not isinstance(self._errors,list):
return "[ERROR] %s" % self._errors return "[ERROR] %s" % self._errors
formatted = "\n" formatted = "\n"
for i in range(len(self._errors)): for i in range(len(self._errors)):
if i == 0: formatted += "[ERROR] %s" % self._errors[i] if i == 0: formatted += "[ERROR] {}".format(self._errors[i] )
else: formatted += " %s" % self._errors[i] else: formatted += " {}".format(self._errors[i] )
if i+1 < len(self._errors): formatted += "\n" if i+1 < len(self._errors): formatted += "\n"
return formatted return formatted
@ -69,7 +66,7 @@ class ErrorMessage ( Exception ):
return return
def terminate ( self ): def terminate ( self ):
print self print( self )
sys.exit(self._code) sys.exit(self._code)
def _getCode ( self ): return self._code def _getCode ( self ): return self._code

View File

@ -1,17 +1,17 @@
#!/usr/bin/env python #!/usr/bin/env python3
# #
# -*- mode:Python -*- # -*- mode:Python -*-
# #
# This file is part of the Coriolis Software. # This file is part of the Coriolis Software.
# Copyright (c) UPMC 2008-2018, All Rights Reserved # Copyright (c) Sorbonne Université 2008-2021, All Rights Reserved
# #
# +-----------------------------------------------------------------+ # +-----------------------------------------------------------------+
# | C O R I O L I S | # | C O R I O L I S |
# | C o r i o l i s / C h a m s B u i l d e r | # | T o o l c h a i n B u i l d e r |
# | | # | |
# | Authors : Jean-Paul Chaput | # | Authors : Jean-Paul Chaput |
# | Damien Dupuis | # | Damien Dupuis |
# | E-mail : Jean-Paul.Chaput@asim.lip6.fr | # | E-mail : Jean-Paul.Chaput@lip6.fr |
# | =============================================================== | # | =============================================================== |
# | Python : "./ccb.py" | # | Python : "./ccb.py" |
# +-----------------------------------------------------------------+ # +-----------------------------------------------------------------+
@ -19,37 +19,36 @@
showTrace = True showTrace = True
try: try:
import sys import sys
import os.path import os.path
import optparse import optparse
import traceback import traceback
import distutils.sysconfig import distutils.sysconfig
import subprocess import subprocess
import re import re
except ImportError, e: except ImportError as e:
module = str(e).split()[-1] module = str(e).split()[-1]
print( '[ERROR] The "{}" python module or symbol cannot be loaded.'.format(module) )
print '[ERROR] The <%s> python module or symbol cannot be loaded.' % module print( ' Please check your standard Python installation, it may have problems.' )
print ' Please check your standard Python installation, it may have problems.' quit()
quit()
def safeImport ( moduleName, symbol=None ): def safeImport ( moduleName, symbol=None ):
try: try:
module = __import__( moduleName, globals(), locals(), symbol ) module = __import__( moduleName, globals(), locals(), symbol )
except ImportError, e: except ImportError as e:
print '[ERROR] The <%s> python module or symbol cannot be loaded.' % moduleName print( '[ERROR] The "{}" python module or symbol cannot be loaded.'.format(moduleName) )
print ' Please check the integrity of the <coriolis/boostrap> package.' print( ' Please check the integrity of the "coriolis/boostrap" package.' )
if showTrace: traceback.print_tb(sys.exc_info()[2]) if showTrace: traceback.print_tb(sys.exc_info()[2])
sys.exit(1) sys.exit(1)
except Exception, e: except Exception as e:
print '[ERROR] An exception occured while importing module <%s>. Is is a bug,' % moduleName print( '[ERROR] An exception occured while importing module "{}". Is is a bug,'.format(moduleName) )
print ' you may want to report it...' print( ' you may want to report it...' )
print ' %s' % e print( ' {}'.format(e) )
if showTrace: traceback.print_tb(sys.exc_info()[2]) if showTrace: traceback.print_tb(sys.exc_info()[2])
sys.exit(2) sys.exit(2)
if symbol: return module.__dict__[symbol] if symbol: return module.__dict__[symbol]
return module return module
def checkCMake (): def checkCMake ():
@ -57,8 +56,8 @@ def checkCMake ():
(pid,status) = os.waitpid ( child.pid, 0 ) (pid,status) = os.waitpid ( child.pid, 0 )
status >>= 8 status >>= 8
if status != 0: if status != 0:
print '[ERROR] The <cmake> program has not been found, please install it.' print( '[ERROR] The "cmake" program has not been found, please install it.' )
sys.exit(1) sys.exit(1)
def guessOs (): def guessOs ():
@ -85,62 +84,60 @@ def guessOs ():
uname = subprocess.Popen ( ["uname", "-srm"], stdout=subprocess.PIPE ) uname = subprocess.Popen ( ["uname", "-srm"], stdout=subprocess.PIPE )
lines = uname.stdout.readlines() lines = uname.stdout.readlines()
line = lines[0].decode( 'ascii' )
if osSlsoc7x_64.match(lines[0]): if osSlsoc7x_64.match(line):
osType = "Linux.el7_64" osType = "Linux.el7_64"
libDir = "lib64" libDir = "lib64"
elif osSlsoc6x_64.match(lines[0]): elif osSlsoc6x_64.match(line):
osType = "Linux.slsoc6x_64" osType = "Linux.slsoc6x_64"
libDir = "lib64" libDir = "lib64"
elif osSlsoc6x.match(lines[0]): elif osSlsoc6x.match(line):
osType = "Linux.slsoc6x" osType = "Linux.slsoc6x"
elif osSLSoC5x_64.match(lines[0]): elif osSLSoC5x_64.match(line):
osType = "Linux.SLSoC5x_64" osType = "Linux.SLSoC5x_64"
libDir = "lib64" libDir = "lib64"
elif osSLSoC5x .match(lines[0]): elif osSLSoC5x .match(line):
osType = "Linux.SLSoC5x" osType = "Linux.SLSoC5x"
elif osFedora_64.match(lines[0]): elif osFedora_64.match(line):
osType = "Linux.fc_64" osType = "Linux.fc_64"
libDir = "lib64" libDir = "lib64"
elif osFedora .match(lines[0]): elif osFedora .match(line):
osType = "Linux.fc" osType = "Linux.fc"
elif osLinux_64.match(lines[0]): elif osLinux_64.match(line):
osType = "Linux.x86_64" osType = "Linux.x86_64"
libDir = "lib64" libDir = "lib64"
elif osLinux .match(lines[0]): elif osLinux .match(line):
osType = "Linux.i386" osType = "Linux.i386"
elif osDarwin.match(lines[0]): elif osDarwin.match(line):
osType = "Darwin" osType = "Darwin"
elif osFreeBSD8x_amd64.match(lines[0]): elif osFreeBSD8x_amd64.match(line):
osType = "FreeBSD.8x.amd64" osType = "FreeBSD.8x.amd64"
libDir = "lib64" libDir = "lib64"
elif osFreeBSD8x_64.match(lines[0]): elif osFreeBSD8x_64.match(line):
osType = "FreeBSD.8x.x86_64" osType = "FreeBSD.8x.x86_64"
libDir = "lib64" libDir = "lib64"
elif osFreeBSD8x.match(lines[0]): elif osFreeBSD8x.match(line):
osType = "FreeBSD.8x.i386" osType = "FreeBSD.8x.i386"
elif osCygwinW7_64.match(lines[0]): elif osCygwinW7_64.match(line):
osType = "Cygwin.W7_64" osType = "Cygwin.W7_64"
libDir = "lib64" libDir = "lib64"
elif osCygwinW7.match(lines[0]): elif osCygwinW7.match(line):
osType = "Cygwin.W7" osType = "Cygwin.W7"
elif osCygwinW8_64.match(lines[0]): elif osCygwinW8_64.match(line):
osType = "Cygwin.W8_64" osType = "Cygwin.W8_64"
libDir = "lib64" libDir = "lib64"
elif osCygwinW8.match(lines[0]): elif osCygwinW8.match(line):
osType = "Cygwin.W8" osType = "Cygwin.W8"
elif osCygwinW10_64.match(lines[0]): elif osCygwinW10_64.match(line):
osType = "Cygwin.W10_64" osType = "Cygwin.W10_64"
libDir = "lib64" libDir = "lib64"
elif osCygwinW10.match(lines[0]): elif osCygwinW10.match(line):
osType = "Cygwin.W10" osType = "Cygwin.W10"
else: else:
uname = subprocess.Popen ( ["uname", "-sr"], stdout=subprocess.PIPE ) uname = subprocess.Popen ( ["uname", "-sr"], stdout=subprocess.PIPE )
osType = uname.stdout.readlines()[0][:-1] osType = uname.stdout.readlines()[0][:-1]
print( '[WARNING] Unrecognized OS: "{}".'.format(lines[0][:-1]) )
print "[WARNING] Unrecognized OS: \"%s\"." % lines[0][:-1] print( ' (using: "{}")'.format(osType) )
print " (using: \"%s\")" % osType
return osType, libDir return osType, libDir
@ -151,10 +148,9 @@ def guessPythonSitePackage ():
def autoLocate (): def autoLocate ():
osType, libDir = guessOs() osType, libDir = guessOs()
print 'Building for target: <%s>' % osType print( 'Building for target: "{}"'.format(osType) )
print 'Making an educated guess to locate myself:' print( 'Making an educated guess to locate myself:' )
sitePackage = guessPythonSitePackage() sitePackage = guessPythonSitePackage()
builderDir = None builderDir = None
locations = [ os.path.abspath(os.path.dirname(sys.argv[0])) locations = [ os.path.abspath(os.path.dirname(sys.argv[0]))
, os.environ['HOME']+'/coriolis-2.x/src/coriolis/bootstrap' , os.environ['HOME']+'/coriolis-2.x/src/coriolis/bootstrap'
@ -163,26 +159,22 @@ def autoLocate ():
, os.environ['HOME']+'/coriolis-2.x/'+osType+'/Release.Shared/install/'+libDir+'/'+sitePackage , os.environ['HOME']+'/coriolis-2.x/'+osType+'/Release.Shared/install/'+libDir+'/'+sitePackage
, '/users/outil/coriolis/coriolis-2.x/'+osType+'/Release.Shared/install/'+libDir+'/'+sitePackage , '/users/outil/coriolis/coriolis-2.x/'+osType+'/Release.Shared/install/'+libDir+'/'+sitePackage
] ]
for location in locations: for location in locations:
print ' <%s>' % location, print( ' "{}" '.format(location), end='' )
if os.path.isfile(location + '/builder/__init__.py'): if os.path.isfile(location + '/builder/__init__.py'):
if not builderDir: if not builderDir:
builderDir = location builderDir = location
print '(Found*)' print( '(Found*)' )
else: else:
print '(Found)' print( '(Found)' )
else: else:
print '(No)' print( '(No)' )
if not builderDir: if not builderDir:
print '[ERROR] Failed to locate the builder modules in any of the normal pathes.' print( '[ERROR] Failed to locate the builder modules in any of the normal pathes.' )
print ' Please check your Coriolis/Bootsrap installation.' print( ' Please check your Coriolis/Bootsrap installation.' )
if showTrace: traceback.print_tb(sys.exc_info()[2]) if showTrace: traceback.print_tb(sys.exc_info()[2])
sys.exit(1) sys.exit(1)
sys.path.insert( 0, builderDir ) sys.path.insert( 0, builderDir )
return return
@ -193,125 +185,117 @@ autoLocate()
checkCMake() checkCMake()
parser = optparse.OptionParser () parser = optparse.OptionParser ()
parser.add_option ( "-g", "--gui" , action="store_true" , dest="gui" , help="Lauch the graphical interface." ) parser.add_option ( "-g", "--gui" , action="store_true" , dest="gui" , help="Lauch the graphical interface." )
# Build relateds. # Build relateds.
parser.add_option ( "-c", "--conf" , type="string", dest="conf" , help="Fichier de configuration." ) parser.add_option ( "-c", "--conf" , type="string", dest="conf" , help="Fichier de configuration." )
parser.add_option ( "--show-conf" , action="store_true" , dest="showConf" , help="Display the Project/Tools configuration, then exit." ) parser.add_option ( "--show-conf" , action="store_true" , dest="showConf" , help="Display the Project/Tools configuration, then exit." )
parser.add_option ( "-q", "--quiet" , action="store_true" , dest="quiet" , help="Do not print all the informative messages." ) parser.add_option ( "-q", "--quiet" , action="store_true" , dest="quiet" , help="Do not print all the informative messages." )
parser.add_option ( "-r", "--release" , action="store_true" , dest="release" , help="Build a <Release> aka optimized version." ) parser.add_option ( "-r", "--release" , action="store_true" , dest="release" , help="Build a <Release> aka optimized version." )
parser.add_option ( "-d", "--debug" , action="store_true" , dest="debug" , help="Build a <Debug> aka (-g) version." ) parser.add_option ( "-d", "--debug" , action="store_true" , dest="debug" , help="Build a <Debug> aka (-g) version." )
parser.add_option ( "-s", "--static" , action="store_true" , dest="static" , help="Try to link statically, as much as possible." ) parser.add_option ( "-s", "--static" , action="store_true" , dest="static" , help="Try to link statically, as much as possible." )
parser.add_option ( "--doc" , action="store_true" , dest="doc" , help="Enable the documentation building (uses with -j1)." ) parser.add_option ( "--doc" , action="store_true" , dest="doc" , help="Enable the documentation building (uses with -j1)." )
parser.add_option ( "-v", "--verbose" , action="store_true" , dest="verboseMakefile" , help="Tells CMake to print all compilation commands." ) parser.add_option ( "-v", "--verbose" , action="store_true" , dest="verboseMakefile", help="Tells CMake to print all compilation commands." )
parser.add_option ( "--root" , action="store" , type="string", dest="rootDir" , help="The root directory (default: <~/coriolis-2.x/>)." ) parser.add_option ( "--root" , action="store" , type="string", dest="rootDir" , help="The root directory (default: <~/coriolis-2.x/>)." )
parser.add_option ( "--no-build" , action="store_true" , dest="noBuild" , help="Do *not* build anything (by default: build)." ) parser.add_option ( "--no-build" , action="store_true" , dest="noBuild" , help="Do *not* build anything (by default: build)." )
parser.add_option ( "--no-cache" , action="store_true" , dest="noCache" , help="Remove previous CMake cache before building." ) parser.add_option ( "--no-cache" , action="store_true" , dest="noCache" , help="Remove previous CMake cache before building." )
parser.add_option ( "--rm-build" , action="store_true" , dest="rmBuild" , help="Remove previous build directoty before building." ) parser.add_option ( "--rm-build" , action="store_true" , dest="rmBuild" , help="Remove previous build directoty before building." )
parser.add_option ( "--macports" , action="store_true" , dest="macports" , help="Build against MacPorts." ) parser.add_option ( "--macports" , action="store_true" , dest="macports" , help="Build against MacPorts." )
parser.add_option ( "--devtoolset" , action="store" , type="int" , dest="devtoolset" , help="Build against TUV Dev Toolset N." ) parser.add_option ( "--devtoolset" , action="store" , type="int" , dest="devtoolset" , help="Build against TUV Dev Toolset N." )
parser.add_option ( "--llvm-toolset" , action="store" , type="int" , dest="llvmtoolset" , help="Build against TUV Dev LLVM Toolset N." ) parser.add_option ( "--llvm-toolset" , action="store" , type="int" , dest="llvmtoolset" , help="Build against TUV Dev LLVM Toolset N." )
parser.add_option ( "--qt5" , action="store_true" , dest="qt5" , help="Build against Qt 5 (default: Qt 4)." ) parser.add_option ( "--qt5" , action="store_true" , dest="qt5" , help="Build against Qt 5 (default: Qt 4)." )
parser.add_option ( "--bfd" , action="store_true" , dest="bfd" , help="Build against Qt 5 (default: Qt 4)." ) parser.add_option ( "--bfd" , action="store_true" , dest="bfd" , help="Build against Qt 5 (default: Qt 4)." )
parser.add_option ( "--openmp" , action="store_true" , dest="openmp" , help="Enable the use of OpenMP in Gcc." ) parser.add_option ( "--openmp" , action="store_true" , dest="openmp" , help="Enable the use of OpenMP in Gcc." )
parser.add_option ( "--ninja" , action="store_true" , dest="ninja" , help="Use Ninja instead of UNIX Makefile." ) parser.add_option ( "--ninja" , action="store_true" , dest="ninja" , help="Use Ninja instead of UNIX Makefile." )
parser.add_option ( "--clang" , action="store_true" , dest="clang" , help="Force use of Clang C/C++ compiler instead of system default." ) parser.add_option ( "--clang" , action="store_true" , dest="clang" , help="Force use of Clang C/C++ compiler instead of system default." )
parser.add_option ( "--make" , action="store" , type="string", dest="makeArguments", help="Arguments to pass to make (ex: \"-j4 install\")." ) parser.add_option ( "--make" , action="store" , type="string", dest="makeArguments" , help="Arguments to pass to make (ex: \"-j4 install\")." )
parser.add_option ( "--project" , action="append" , type="string", dest="projects" , help="The name of a project to build (may appears any number of time)." ) parser.add_option ( "--project" , action="append" , type="string", dest="projects" , help="The name of a project to build (may appears any number of time)." )
parser.add_option ( "-t", "--tool" , action="append" , type="string", dest="tools" , help="The name of a tool to build (may appears any number of time)." ) parser.add_option ( "-t", "--tool" , action="append" , type="string", dest="tools" , help="The name of a tool to build (may appears any number of time)." )
# SVN repository relateds. # SVN repository relateds.
# Have to be ported to Git. # Have to be ported to Git.
#parser.add_option ( "--svn-tag" , action="store" , type="string", dest="svnTag" , help="Explicitly select a SVN tag (for SVN related commands)." ) #parser.add_option ( "--svn-tag" , action="store" , type="string", dest="svnTag" , help="Explicitly select a SVN tag (for SVN related commands)." )
#parser.add_option ( "--svn-method" , action="store" , type="string", dest="svnMethod" , help="Allows to sets the svn checkout method (svn+ssh://coriolis.soc.lip6.fr)." ) #parser.add_option ( "--svn-method" , action="store" , type="string", dest="svnMethod" , help="Allows to sets the svn checkout method (svn+ssh://coriolis.soc.lip6.fr)." )
#parser.add_option ( "--svn-status" , action="store_true" , dest="svnStatus" , help="Check status against the SVN repository." ) #parser.add_option ( "--svn-status" , action="store_true" , dest="svnStatus" , help="Check status against the SVN repository." )
#parser.add_option ( "--svn-diff" , action="store_true" , dest="svnDiff" , help="Perform a diff against the SVN repository." ) #parser.add_option ( "--svn-diff" , action="store_true" , dest="svnDiff" , help="Perform a diff against the SVN repository." )
#parser.add_option ( "--svn-update" , action="store_true" , dest="svnUpdate" , help="Update to the latest SVN version *or* the one given by svn-tag." ) #parser.add_option ( "--svn-update" , action="store_true" , dest="svnUpdate" , help="Update to the latest SVN version *or* the one given by svn-tag." )
#parser.add_option ( "--svn-checkout" , action="store_true" , dest="svnCheckout" , help="Checkout the latest SVN version *or* the one given by svn-tag." ) #parser.add_option ( "--svn-checkout" , action="store_true" , dest="svnCheckout" , help="Checkout the latest SVN version *or* the one given by svn-tag." )
# Miscellaneous. # Miscellaneous.
parser.add_option ( "--user-tarball" , action="store_true" , dest="userTarball" , help="Regenerate a tarball from checked out sources (in <root>/tarball/." ) parser.add_option ( "--user-tarball" , action="store_true" , dest="userTarball" , help="Regenerate a tarball from checked out sources (in <root>/tarball/." )
parser.add_option ( "--tarball" , action="store_true" , dest="tarball" , help="Regenerate a tarball (in <root>/tarball/." ) parser.add_option ( "--tarball" , action="store_true" , dest="tarball" , help="Regenerate a tarball (in <root>/tarball/." )
parser.add_option ( "--rpm" , action="store_true" , dest="doRpm" , help="Regenerate RPM packages." ) parser.add_option ( "--rpm" , action="store_true" , dest="doRpm" , help="Regenerate RPM packages." )
parser.add_option ( "--deb" , action="store_true" , dest="doDeb" , help="Regenerate Debian/Ubuntu packages." ) parser.add_option ( "--deb" , action="store_true" , dest="doDeb" , help="Regenerate Debian/Ubuntu packages." )
# Katabatic/Kite specific options. # Katabatic/Kite specific options.
parser.add_option ( "-D", "--check-db" , action="store_true" , dest="checkDb" , help="Enable Katabatic/Kite data-base checking (*very* slow)." ) parser.add_option ( "-D", "--check-db" , action="store_true" , dest="checkDb" , help="Enable Katabatic/Kite data-base checking (*very* slow)." )
parser.add_option ( "-u", "--check-deter" , action="store_true" , dest="checkDeterminism", help="Enable Katabatic/Kite determinism checking (*very* slow)." ) parser.add_option ( "-u", "--check-deter" , action="store_true" , dest="checkDeterminism", help="Enable Katabatic/Kite determinism checking (*very* slow)." )
(options, args) = parser.parse_args () (options, args) = parser.parse_args ()
if options.gui: if options.gui:
ErrorMessage = safeImport( 'builder' , 'ErrorMessage' ) ErrorMessage = safeImport( 'builder' , 'ErrorMessage' )
QApplication = safeImport( 'PyQt4.QtGui' , 'QApplication' ) QApplication = safeImport( 'PyQt4.QtGui' , 'QApplication' )
BuilderGui = safeImport( 'builder.BuilderGui', 'BuilderGui' ) BuilderGui = safeImport( 'builder.BuilderGui', 'BuilderGui' )
try:
try: app = QApplication( sys.argv )
app = QApplication( sys.argv ) app.setOrganizationName ( 'UPMC' )
app.setOrganizationName ( 'UPMC' ) app.setOrganizationDomain( 'lip6.fr' )
app.setOrganizationDomain( 'lip6.fr' ) app.setApplicationName ( 'CoriolisBuilder' )
app.setApplicationName ( 'CoriolisBuilder' ) gui = BuilderGui( options.conf )
gui = BuilderGui( options.conf ) gui.show()
gui.show() rcode = app.exec_()
rcode = app.exec_() sys.exit( rcode )
sys.exit( rcode ) except ErrorMessage as e:
except ErrorMessage, e: print( e )
print e if showTrace: traceback.print_tb(sys.exc_info()[2])
if showTrace: traceback.print_tb(sys.exc_info()[2]) sys.exit(2)
sys.exit(2) except Exception as e:
except Exception, e: print( '[ERROR] An exception occured while running the Qt application.' )
print '[ERROR] An exception occured while running the Qt application.' print( ' {}'.format(e) )
print ' %s' % e if showTrace: traceback.print_tb(sys.exc_info()[2])
if showTrace: traceback.print_tb(sys.exc_info()[2]) sys.exit(2)
sys.exit(2)
else: else:
ErrorMessage = safeImport( 'builder' , 'ErrorMessage' )
ErrorMessage = safeImport( 'builder' , 'ErrorMessage' ) Builder = safeImport( 'builder.Builder', 'Builder' )
Builder = safeImport( 'builder.Builder', 'Builder' ) try:
builder = Builder()
try: builder.loadConfiguration( options.conf )
builder = Builder() if options.showConf:
builder.loadConfiguration( options.conf ) builder.showConfiguration ()
sys.exit(0)
if options.showConf: if options.quiet: builder.quiet = True
builder.showConfiguration () if options.release: builder.buildMode = "Release"
sys.exit(0) if options.debug: builder.buildMode = "Debug"
if options.static: builder.enableShared = "OFF"
if options.quiet: builder.quiet = True if options.doc: builder.enableDoc = "ON"
if options.release: builder.buildMode = "Release" if options.checkDb: builder.checkDatabase = "ON"
if options.debug: builder.buildMode = "Debug" if options.checkDeterminism: builder.checkDeterminism = "ON"
if options.static: builder.enableShared = "OFF" if options.verboseMakefile: builder.verboseMakefile = "ON"
if options.doc: builder.enableDoc = "ON" if options.rootDir: builder.rootDir = options.rootDir
if options.checkDb: builder.checkDatabase = "ON" if options.noBuild: builder.doBuild = False
if options.checkDeterminism: builder.checkDeterminism = "ON" if options.noCache: builder.noCache = True
if options.verboseMakefile: builder.verboseMakefile = "ON" if options.rmBuild: builder.rmBuild = True
if options.rootDir: builder.rootDir = options.rootDir if options.ninja: builder.ninja = True
if options.noBuild: builder.doBuild = False if options.clang or options.llvmtoolset: builder.clang = True
if options.noCache: builder.noCache = True if options.macports: builder.macports = True
if options.rmBuild: builder.rmBuild = True if options.devtoolset: builder.devtoolset = options.devtoolset
if options.ninja: builder.ninja = True if options.llvmtoolset: builder.llvmtoolset = options.llvmtoolset
if options.clang or options.llvmtoolset: builder.clang = True if options.bfd: builder.bfd = "ON"
if options.macports: builder.macports = True if options.qt5: builder.qt5 = True
if options.devtoolset: builder.devtoolset = options.devtoolset if options.openmp: builder.openmp = True
if options.llvmtoolset: builder.llvmtoolset = options.llvmtoolset if options.makeArguments: builder.makeArguments = options.makeArguments
if options.bfd: builder.bfd = "ON" #if options.svnMethod: builder.svnMethod = options.svnMethod
if options.qt5: builder.qt5 = True #if options.svnTag: builder.svnTag = options.svnTag
if options.openmp: builder.openmp = True #if options.svnStatus: builder.svnStatus ( tools=options.tools, projects=options.projects )
if options.makeArguments: builder.makeArguments = options.makeArguments #elif options.svnUpdate: builder.svnUpdate ( tools=options.tools, projects=options.projects )
#if options.svnMethod: builder.svnMethod = options.svnMethod #elif options.svnDiff: builder.svnDiff ( tools=options.tools, projects=options.projects )
#if options.svnTag: builder.svnTag = options.svnTag #elif options.svnCheckout: builder.svnCheckout ( tools=options.tools, projects=options.projects )
if options.userTarball: builder.userTarball ( tools=options.tools, projects=options.projects )
#if options.svnStatus: builder.svnStatus ( tools=options.tools, projects=options.projects ) elif options.tarball: builder.svnTarball ( tools=options.tools, projects=options.projects )
#elif options.svnUpdate: builder.svnUpdate ( tools=options.tools, projects=options.projects ) elif options.doRpm: builder.doRpm ()
#elif options.svnDiff: builder.svnDiff ( tools=options.tools, projects=options.projects ) elif options.doDeb: builder.doDeb ()
#elif options.svnCheckout: builder.svnCheckout ( tools=options.tools, projects=options.projects ) else: builder.build ( tools=options.tools, projects=options.projects )
if options.userTarball: builder.userTarball ( tools=options.tools, projects=options.projects ) except ErrorMessage as e:
elif options.tarball: builder.svnTarball ( tools=options.tools, projects=options.projects ) print( e )
elif options.doRpm: builder.doRpm () if showTrace: traceback.print_tb(sys.exc_info()[2])
elif options.doDeb: builder.doDeb () sys.exit(e.code)
else: builder.build ( tools=options.tools, projects=options.projects ) except KeyboardInterrupt as e:
except ErrorMessage, e: print( '\n[ERROR] Interrupted by user\'s request (CTRL+C)' )
print e sys.exit(1)
if showTrace: traceback.print_tb(sys.exc_info()[2])
sys.exit(e.code)
except KeyboardInterrupt, e:
print '\n[ERROR] Interrupted by user\'s request (CTRL+C)'
sys.exit(1)
sys.exit(0) sys.exit(0)

View File

@ -7,12 +7,12 @@
if(COMMAND CMAKE_POLICY) if(COMMAND CMAKE_POLICY)
cmake_policy(SET CMP0003 NEW) cmake_policy(SET CMP0003 NEW)
cmake_policy(SET CMP0005 NEW) cmake_policy(SET CMP0005 NEW)
if(NOT (CMAKE_VERSION VERSION_LESS 2.8.0)) #if(NOT (CMAKE_VERSION VERSION_LESS 2.8.0))
cmake_policy(SET CMP0014 OLD) # cmake_policy(SET CMP0014 OLD)
endif() #endif()
if(NOT (CMAKE_VERSION VERSION_LESS 2.8.12)) #if(NOT (CMAKE_VERSION VERSION_LESS 2.8.12))
cmake_policy(SET CMP0022 OLD) # cmake_policy(SET CMP0022 OLD)
endif() #endif()
endif(COMMAND CMAKE_POLICY) endif(COMMAND CMAKE_POLICY)
endmacro(set_cmake_policies) endmacro(set_cmake_policies)
@ -85,12 +85,12 @@
set(ADDTIONAL_FLAGS "") set(ADDTIONAL_FLAGS "")
set(CXX_STANDARD "c++11") set(CXX_STANDARD "c++11")
endif() endif()
set(CMAKE_C_FLAGS_DEBUG " -Wall -fsanitize=address ${ADDTIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C Compiler Debug options." FORCE) #set(CMAKE_C_FLAGS_DEBUG " -Wall -fsanitize=address ${ADDTIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C Compiler Debug options." FORCE)
#set(CMAKE_C_FLAGS_DEBUG " -Wall ${ADDTIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C Compiler Debug options." FORCE) set(CMAKE_C_FLAGS_DEBUG " -Wall ${ADDTIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C Compiler Debug options." FORCE)
set(CMAKE_C_FLAGS_RELEASE " -Wall -O2 ${ADDTIONAL_FLAGS} -DNDEBUG" CACHE STRING "C Compiler Release options." FORCE) set(CMAKE_C_FLAGS_RELEASE " -Wall -O2 ${ADDTIONAL_FLAGS} -DNDEBUG" CACHE STRING "C Compiler Release options." FORCE)
#set(CMAKE_C_FLAGS_RELEASE " -Wall -fsanitize=address ${ADDTIONAL_FLAGS} -DNDEBUG" CACHE STRING "C Compiler Release options." FORCE) #set(CMAKE_C_FLAGS_RELEASE " -Wall -fsanitize=address ${ADDTIONAL_FLAGS} -DNDEBUG" CACHE STRING "C Compiler Release options." FORCE)
set(CMAKE_CXX_FLAGS_DEBUG "-std=${CXX_STANDARD} -Wall -fsanitize=address ${ADDTIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C++ Compiler Debug options." FORCE) #set(CMAKE_CXX_FLAGS_DEBUG "-std=${CXX_STANDARD} -Wall -fsanitize=address ${ADDTIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C++ Compiler Debug options." FORCE)
#set(CMAKE_CXX_FLAGS_DEBUG "-std=${CXX_STANDARD} -Wall ${ADDTIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C++ Compiler Debug options." FORCE) set(CMAKE_CXX_FLAGS_DEBUG "-std=${CXX_STANDARD} -Wall ${ADDTIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C++ Compiler Debug options." FORCE)
set(CMAKE_CXX_FLAGS_RELEASE "-std=${CXX_STANDARD} -Wall -O2 ${ADDTIONAL_FLAGS} -DNDEBUG" CACHE STRING "C++ Compiler Release options." FORCE) set(CMAKE_CXX_FLAGS_RELEASE "-std=${CXX_STANDARD} -Wall -O2 ${ADDTIONAL_FLAGS} -DNDEBUG" CACHE STRING "C++ Compiler Release options." FORCE)
#set(CMAKE_CXX_FLAGS_RELEASE "-std=${CXX_STANDARD} -Wall -fsanitize=address ${ADDTIONAL_FLAGS} -DNDEBUG" CACHE STRING "C++ Compiler Release options." FORCE) #set(CMAKE_CXX_FLAGS_RELEASE "-std=${CXX_STANDARD} -Wall -fsanitize=address ${ADDTIONAL_FLAGS} -DNDEBUG" CACHE STRING "C++ Compiler Release options." FORCE)
@ -410,8 +410,30 @@
) )
target_link_libraries( ${pytarget} ${pyDeplibs} ) target_link_libraries( ${pytarget} ${pyDeplibs} )
install( TARGETS ${pytarget} DESTINATION ${PYTHON_SITE_PACKAGES} ) install( TARGETS ${pytarget} DESTINATION ${Python_CORIOLISARCH} )
if( NOT ("${pyIncludes}" STREQUAL "None") ) if( NOT ("${pyIncludes}" STREQUAL "None") )
install( FILES ${pyIncludes} DESTINATION ${inc_install_dir} ) install( FILES ${pyIncludes} DESTINATION ${inc_install_dir} )
endif() endif()
endmacro( add_python_module ) endmacro( add_python_module )
#
# Build a Python extention module (3rd version).
# Usage:
# * pyCpps: The list of C/C++ module files.
# * pyIncludes: The list of C/C++ header files (will be installed in
# "inc_install_dir").
# * pymodule: The name of the Python module (for "import PYMODULE").
# * deplibs: The list of dependencies.
# * inc_install_dir: The directory into which install the includes.
#
macro( add_python_module3 pyCpps pyIncludes pymodule deplibs inc_install_dir )
add_library( ${pymodule} MODULE ${pyCpps} )
set_target_properties( ${pymodule} PROPERTIES PREFIX "" )
target_link_libraries( ${pymodule} ${deplibs} )
install( TARGETS ${pymodule} DESTINATION ${Python_CORIOLISARCH} )
if( NOT ("${pyIncludes}" STREQUAL "None") )
install( FILES ${pyIncludes} DESTINATION ${inc_install_dir} )
endif()
endmacro( add_python_module3 )

View File

@ -1,13 +1,26 @@
if(UNIX) if(UNIX)
if(NOT Python_FOUND)
message(FATAL_ERROR "Python has not been found, maybe forgot to call find_package(Python). ")
endif()
# This way avoids newline in the script string. # This way avoids newline in the script string.
set(SCRIPT "import os.path,distutils.sysconfig") set(SCRIPT "import os.path,distutils.sysconfig")
set(SCRIPT "${SCRIPT}; pathes = distutils.sysconfig.get_python_lib().split('/')") set(SCRIPT "${SCRIPT}; pathes = distutils.sysconfig.get_python_lib('platstdlib').split('/')")
set(SCRIPT "${SCRIPT}; print os.path.join(pathes[-2],pathes[-1])") set(SCRIPT "${SCRIPT}; print( os.path.join(pathes[-2],pathes[-1]) )")
execute_process(COMMAND "python" "-c" "${SCRIPT}" execute_process(COMMAND "${Python_EXECUTABLE}" "-c" "${SCRIPT}"
RESULT_VARIABLE RETURN_CODE RESULT_VARIABLE RETURN_CODE
OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_VARIABLE Python_CORIOLISARCH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(SCRIPT "import os.path,distutils.sysconfig")
set(SCRIPT "${SCRIPT}; pathes = distutils.sysconfig.get_python_lib('stdlib').split('/')")
set(SCRIPT "${SCRIPT}; print( os.path.join(pathes[-2],pathes[-1]) )")
execute_process(COMMAND "${Python_EXECUTABLE}" "-c" "${SCRIPT}"
RESULT_VARIABLE RETURN_CODE
OUTPUT_VARIABLE Python_CORIOLISLIB
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_STRIP_TRAILING_WHITESPACE
) )
@ -17,14 +30,17 @@ if(UNIX)
set(FindPythonSitePackages_FOUND FALSE) set(FindPythonSitePackages_FOUND FALSE)
endif(RETURN_CODE EQUAL 0) endif(RETURN_CODE EQUAL 0)
set(PYTHON_SITE_PACKAGES "lib${LIB_SUFFIX}/${PYTHON_SITE_PACKAGES}" set(Python_CORIOLISARCH "lib${LIB_SUFFIX}/${Python_CORIOLISARCH}"
CACHE STRING "Python site packages directory." FORCE) CACHE STRING "Python platform dependent install directory." FORCE)
mark_as_advanced(PYTHON_SITE_PACKAGES) set(Python_CORIOLISLIB "lib${LIB_SUFFIX}/${Python_CORIOLISLIB}"
CACHE STRING "Python platform independent install directory." FORCE)
mark_as_advanced(Python_CORIOLISARCH)
mark_as_advanced(Python_CORIOLISLIB)
if(FindPythonSitePackages_FOUND) if(FindPythonSitePackages_FOUND)
if(NOT FindPythonSitePackages_FIND_QUIETLY) if(NOT FindPythonSitePackages_FIND_QUIETLY)
if(FindPythonSitePackages_FOUND) if(FindPythonSitePackages_FOUND)
message(STATUS "Found FindPythonSitePackages : ${PYTHON_SITE_PACKAGES}") message(STATUS "Found FindPythonSitePackages : ${Python_CORIOLISARCH}")
endif(FindPythonSitePackages_FOUND) endif(FindPythonSitePackages_FOUND)
endif(NOT FindPythonSitePackages_FIND_QUIETLY) endif(NOT FindPythonSitePackages_FIND_QUIETLY)
else(FindPythonSitePackages_FOUND) else(FindPythonSitePackages_FOUND)

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
import re import re
@ -17,27 +17,23 @@ reDebugStaticPattern = re.compile( r".*Debug\.Static.*" )
def scrubPath ( pathName ): def scrubPath ( pathName ):
pathEnv = os.getenv( pathName ) pathEnv = os.getenv( pathName )
if not pathEnv: return "" if not pathEnv: return ""
pathList = pathEnv.split( ':' )
pathList = string.split( pathEnv, ':' ) scrubbedList = []
scrubbedList = [] for pathElement in pathList:
for pathElement in pathList: if reCoriolisPattern .match(pathElement) \
if reCoriolisPattern .match(pathElement) \ or reReleaseSharedPattern.match(pathElement) \
or reReleaseSharedPattern.match(pathElement) \ or reReleaseStaticPattern.match(pathElement) \
or reReleaseStaticPattern.match(pathElement) \ or reDebugSharedPattern .match(pathElement) \
or reDebugSharedPattern .match(pathElement) \ or reDebugStaticPattern .match(pathElement):
or reDebugStaticPattern .match(pathElement): continue
continue scrubbedList += [ pathElement ]
scrubbedList += [ pathElement ] if len(scrubbedList) == 0: return ""
scrubbedEnv = scrubbedList[0]
if len(scrubbedList) == 0: return "" for pathElement in scrubbedList[1:]:
scrubbedEnv += ":" + pathElement
scrubbedEnv = scrubbedList[0] return scrubbedEnv
for pathElement in scrubbedList[1:]:
scrubbedEnv += ":" + pathElement
return scrubbedEnv
def guessOs (): def guessOs ():
@ -67,80 +63,83 @@ def guessOs ():
uname = subprocess.Popen ( ["uname", "-srm"], stdout=subprocess.PIPE ) uname = subprocess.Popen ( ["uname", "-srm"], stdout=subprocess.PIPE )
lines = uname.stdout.readlines() lines = uname.stdout.readlines()
if osSlsoc7x_64.match(lines[0]): osType = "Linux.el7_64" line = lines[0].decode( 'ascii' )
elif osSlsoc6x_64.match(lines[0]): if osSlsoc7x_64.match(line): osType = "Linux.el7_64"
osType = "Linux.slsoc6x_64" elif osSlsoc6x_64.match(line):
useDevtoolset = True osType = "Linux.slsoc6x_64"
elif osSlsoc6x.match(lines[0]): useDevtoolset = True
osType = "Linux.slsoc6x" elif osSlsoc6x.match(line):
useDevtoolset = True osType = "Linux.slsoc6x"
elif osSLSoC5x_64 .match(lines[0]): osType = "Linux.SLSoC5x_64" useDevtoolset = True
elif osSLSoC5x .match(lines[0]): osType = "Linux.SLSoC5x" elif osSLSoC5x_64 .match(line): osType = "Linux.SLSoC5x_64"
elif osFedora_64 .match(lines[0]): osType = "Linux.fc_64" elif osSLSoC5x .match(line): osType = "Linux.SLSoC5x"
elif osFedora .match(lines[0]): osType = "Linux.fc" elif osFedora_64 .match(line): osType = "Linux.fc_64"
elif osUbuntu1004 .match(lines[0]): osType = "Linux.Ubuntu1004" elif osFedora .match(line): osType = "Linux.fc"
elif osUbuntu1004_64 .match(lines[0]): osType = "Linux.Ubuntu1004_64" elif osUbuntu1004 .match(line): osType = "Linux.Ubuntu1004"
elif osLinux_64 .match(lines[0]): osType = "Linux.x86_64" elif osUbuntu1004_64 .match(line): osType = "Linux.Ubuntu1004_64"
elif osLinux .match(lines[0]): osType = "Linux.i386" elif osLinux_64 .match(line): osType = "Linux.x86_64"
elif osFreeBSD8x_64 .match(lines[0]): osType = "FreeBSD.8x.x86_64" elif osLinux .match(line): osType = "Linux.i386"
elif osFreeBSD8x_amd64.match(lines[0]): osType = "FreeBSD.8x.amd64" elif osFreeBSD8x_64 .match(line): osType = "FreeBSD.8x.x86_64"
elif osFreeBSD8x .match(lines[0]): osType = "FreeBSD.8x.i386" elif osFreeBSD8x_amd64.match(line): osType = "FreeBSD.8x.amd64"
elif osDarwin .match(lines[0]): osType = "Darwin" elif osFreeBSD8x .match(line): osType = "FreeBSD.8x.i386"
elif osCygwinW7_64 .match(lines[0]): osType = "Cygwin.W7_64" elif osDarwin .match(line): osType = "Darwin"
elif osCygwinW7 .match(lines[0]): osType = "Cygwin.W7" elif osCygwinW7_64 .match(line): osType = "Cygwin.W7_64"
elif osCygwinW8_64 .match(lines[0]): osType = "Cygwin.W8_64" elif osCygwinW7 .match(line): osType = "Cygwin.W7"
elif osCygwinW8 .match(lines[0]): osType = "Cygwin.W8" elif osCygwinW8_64 .match(line): osType = "Cygwin.W8_64"
elif osCygwinW10_64 .match(lines[0]): osType = "Cygwin.W10_64" elif osCygwinW8 .match(line): osType = "Cygwin.W8"
elif osCygwinW10 .match(lines[0]): osType = "Cygwin.W10" elif osCygwinW10_64 .match(line): osType = "Cygwin.W10_64"
elif osCygwinW10 .match(line): osType = "Cygwin.W10"
else: else:
uname = subprocess.Popen ( ["uname", "-sr"], stdout=subprocess.PIPE ) uname = subprocess.Popen ( ["uname", "-sr"], stdout=subprocess.PIPE )
osType = uname.stdout.readlines()[0][:-1] osType = uname.stdout.readlines()[0][:-1]
print "[WARNING] Unrecognized OS: \"%s\"." % lines[0][:-1] print( "[WARNING] Unrecognized OS: \"{}\".".format( line[:-1] ))
print " (using: \"%s\")" % osType print( " (using: \"{}\")".format( osType ))
ldLibraryPath = os.getenv('LD_LIBRARY_PATH') ldLibraryPath = os.getenv('LD_LIBRARY_PATH')
if ldLibraryPath and 'devtoolset' in ldLibraryPath: useDevtoolset = False if ldLibraryPath and 'devtoolset' in ldLibraryPath: useDevtoolset = False
return ( osType, useDevtoolset )
return (osType,useDevtoolset)
def guessShell (): def guessShell ( forcedShell ):
# This environement variable cannot be trusted as it is set once when # This environement variable cannot be trusted as it is set once when
# the user logs in. If aftewards it changes it that variable is *not* # the user logs in. If aftewards it changes it that variable is *not*
# affected :-(. # affected :-(.
#if os.environ.has_key('SHELL'): return os.environ['SHELL'] #if 'SHELL' in os.environ: return os.environ['SHELL']
psCommand = subprocess.Popen ( ['ps', '-p', str(os.getppid()) ], stdout=subprocess.PIPE )
shell = psCommand.stdout.readlines()[1][:-1].split()[3].lstrip('-')
whichCommand = subprocess.Popen ( ['which', shell ], stdout=subprocess.PIPE )
shellPath = whichCommand.stdout.readlines()[0][:-1]
isBourneShell = True isBourneShell = True
cshBins = [ '/usr/bin/tcsh' cshBins = [ u'/usr/bin/tcsh'
, '/bin/tcsh' , u'/bin/tcsh'
, '/usr/pkg/bin/tcsh' , u'/usr/pkg/bin/tcsh'
, '/usr/local/bin/tcsh' , u'/usr/local/bin/tcsh'
, '/usr/bin/csh' , u'/usr/bin/csh'
, '/bin/csh' , u'/bin/csh'
, '/usr/pkg/bin/csh' , u'/usr/pkg/bin/csh'
, '/usr/local/bin/csh' , u'/usr/local/bin/csh'
] ]
if shellPath in cshBins: isBourneShell = False if shellName is None:
#print 'GUESSED SHELL: "%s"' % shellPath psCommand = subprocess.Popen ( ['ps', '-p', str(os.getppid()) ], stdout=subprocess.PIPE )
shell = psCommand.stdout.readlines()[1].decode('utf8')[:-1].split()[3].lstrip('-')
whichCommand = subprocess.Popen ( ['which', shell ], stdout=subprocess.PIPE )
shellPath = whichCommand.stdout.readlines()[0][:-1].decode('utf8')
#print( 'GUESSED shellPath={}'.format(shellPath) )
else:
shellPath = forcedShell
#print( 'FORCED shellPath={}'.format(shellPath) )
if shellPath in cshBins:
#print( 'Matched C-Shell' )
isBourneShell = False
#print( 'isBourneShell={}\n'.format(isBourneShell) )
return shellPath, isBourneShell return shellPath, isBourneShell
if __name__ == "__main__": if __name__ == "__main__":
osType,useDevtoolset = guessOs() osType,useDevtoolset = guessOs()
buildType = "Release" buildType = "Release"
linkType = "Shared" linkType = "Shared"
rootDir = None rootDir = None
shellBin, isBourneShell = guessShell() shellName = None
parser = optparse.OptionParser () parser = optparse.OptionParser()
# Build relateds. # Build relateds.
parser.add_option ( "--query-inst-root", action="store_true" , dest="queryInstRoot" ) parser.add_option ( "--query-inst-root", action="store_true" , dest="queryInstRoot" )
parser.add_option ( "--query-isys-root", action="store_true" , dest="queryISysRoot" ) parser.add_option ( "--query-isys-root", action="store_true" , dest="queryISysRoot" )
@ -152,7 +151,8 @@ if __name__ == "__main__":
parser.add_option ( "--no-python" , action="store_true" , dest="nopython" ) parser.add_option ( "--no-python" , action="store_true" , dest="nopython" )
parser.add_option ( "--root" , action="store" , type="string", dest="rootDir" ) parser.add_option ( "--root" , action="store" , type="string", dest="rootDir" )
parser.add_option ( "--remove" , action="store_true" , dest="remove" ) parser.add_option ( "--remove" , action="store_true" , dest="remove" )
( options, args ) = parser.parse_args () parser.add_option ( "--shell" , action="store" , type="string", dest="shell" )
( options, args ) = parser.parse_args()
if options.release: buildType = "Release" if options.release: buildType = "Release"
if options.debug: buildType = "Debug" if options.debug: buildType = "Debug"
@ -160,159 +160,158 @@ if __name__ == "__main__":
if options.static: linkType = "Static" if options.static: linkType = "Static"
if options.shared: linkType = "Shared" if options.shared: linkType = "Shared"
if options.rootDir: rootDir = options.rootDir if options.rootDir: rootDir = options.rootDir
if options.shell: shellName = options.shell
shellBin, isBourneShell = guessShell( shellName )
scriptPath = os.path.abspath(os.path.dirname(sys.argv[0])) scriptPath = os.path.abspath( os.path.dirname( sys.argv[0] ))
if 'Debug.' in scriptPath: buildType = 'Debug' if 'Debug.' in scriptPath: buildType = 'Debug'
if not shellBin: if not shellBin:
print 'echo "[ERROR] coriolisEnv.py was not able to guess/find the current shell interpeter."' print( 'echo "[ERROR] coriolisEnv.py was not able to guess/find the current shell interpeter."' )
sys.exit( 1 ) sys.exit( 1 )
strippedPath = scrubPath( "PATH" ) strippedPath = scrubPath( "PATH" )
strippedLibraryPath = scrubPath( "LD_LIBRARY_PATH" ) strippedLibraryPath = scrubPath( "LD_LIBRARY_PATH" )
strippedPythonPath = scrubPath( "PYTHONPATH" ) strippedPythonPath = scrubPath( "PYTHONPATH" )
if options.remove: if options.remove:
shellScript = 'echo "Removing Coriolis environment";' shellScript = 'echo "Removing Coriolis environment";'
if osType == "Darwin": if osType == "Darwin":
ldVar = 'DYLD_LIBRARY_PATH' ldVar = 'DYLD_LIBRARY_PATH'
else:
ldVar = 'LD_LIBRARY_PATH'
if isBourneShell:
shellScript += 'export PATH={};hash -r;'.format(strippedPath)
shellScript += 'BOOTSTRAP_TOP="";CORIOLIS_TOP="";export -n BOOTSTRAP_TOP CORIOLIS_TOP;'
if strippedLibraryPath:
shellScript += 'export {}={};'.format(ldVar, strippedLibraryPath)
else: else:
shellScript += '{0}=""; export -n {0};'.format(ldVar) ldVar = 'LD_LIBRARY_PATH'
else: if isBourneShell:
shellScript += 'setenv PATH {};rehash;'.format(strippedPath) shellScript += 'export PATH={};hash -r;'.format(strippedPath)
shellScript += 'unsetenv BOOTSTRAP_TOP CORIOLIS_TOP;' shellScript += 'BOOTSTRAP_TOP="";CORIOLIS_TOP="";export -n BOOTSTRAP_TOP CORIOLIS_TOP;'
if strippedLibraryPath: if strippedLibraryPath:
shellScript += 'setenv {} {};'.format(ldVar, strippedLibraryPath) shellScript += 'export {}={};'.format(ldVar, strippedLibraryPath)
else:
shellScript += '{0}=""; export -n {0};'.format(ldVar)
else: else:
shellScript += 'unsetenv {};'.format(ldVar) shellScript += 'setenv PATH {};rehash;'.format(strippedPath)
shellScript += 'unsetenv BOOTSTRAP_TOP CORIOLIS_TOP;'
print(shellScript) if strippedLibraryPath:
sys.exit(0) shellScript += 'setenv {} {};'.format(ldVar, strippedLibraryPath)
else:
shellScript += 'unsetenv {};'.format(ldVar)
print( shellScript )
sys.exit(0)
shellScriptSh = \ shellScriptSh = \
'echo "%(MESSAGE)s";' \ 'echo "Issuing commands for Bourne shell like interpreters";' \
'echo "Switching to Coriolis 2.x (%(buildDir)s)";' \ 'echo "%(MESSAGE)s";' \
'PATH="%(PATH)s";' \ 'echo "Switching to Coriolis 2.x (%(buildDir)s)";' \
'BOOTSTRAP_TOP="%(BOOTSTRAP_TOP)s";' \ 'PATH="%(PATH)s";' \
'CORIOLIS_TOP="%(CORIOLIS_TOP)s";' \ 'BOOTSTRAP_TOP="%(BOOTSTRAP_TOP)s";' \
'export PATH BOOTSTRAP_TOP CORIOLIS_TOP STRATUS_MAPPING_NAME;' 'CORIOLIS_TOP="%(CORIOLIS_TOP)s";' \
'export PATH BOOTSTRAP_TOP CORIOLIS_TOP STRATUS_MAPPING_NAME;'
# 'STRATUS_MAPPING_NAME="%(SYSCONF_DIR)s/stratus2sxlib.xml";' \ # 'STRATUS_MAPPING_NAME="%(SYSCONF_DIR)s/stratus2sxlib.xml";' \
shellScriptCsh = \ shellScriptCsh = \
'echo "%(MESSAGE)s";' \ 'echo "Issuing commands for C-shell like interpreters";' \
'echo "Switching to Coriolis 2.x (%(buildDir)s)";' \ 'echo "%(MESSAGE)s";' \
'setenv PATH "%(PATH)s";' \ 'echo "Switching to Coriolis 2.x (%(buildDir)s)";' \
'setenv BOOTSTRAP_TOP "%(BOOTSTRAP_TOP)s";' \ 'setenv PATH "%(PATH)s";' \
'setenv CORIOLIS_TOP "%(CORIOLIS_TOP)s";' 'setenv BOOTSTRAP_TOP "%(BOOTSTRAP_TOP)s";' \
'setenv CORIOLIS_TOP "%(CORIOLIS_TOP)s";'
# 'setenv STRATUS_MAPPING_NAME "%(SYSCONF_DIR)s/stratus2sxlib.xml";' \ # 'setenv STRATUS_MAPPING_NAME "%(SYSCONF_DIR)s/stratus2sxlib.xml";' \
reDevtoolset = re.compile( r'/opt/rh/devtoolset-(?P<version>\d+)/root/etc/coriolis2.*' ) reDevtoolset = re.compile( r'/opt/rh/devtoolset-(?P<version>\d+)/root/etc/coriolis2.*' )
buildDir = buildType + "." + linkType buildDir = buildType + "." + linkType
scriptDir = os.path.dirname ( os.path.abspath(__file__) ) scriptDir = os.path.dirname ( os.path.abspath(__file__) )
#print "echo \"Script Location: %s\";" % scriptDir, #print( "echo \"Script Location: {}\";".format( scriptDir ))
if scriptDir.startswith("/etc/coriolis2"): if scriptDir.startswith("/etc/coriolis2"):
coriolisTop = "/usr" coriolisTop = "/usr"
sysconfDir = scriptDir sysconfDir = scriptDir
shellMessage = "Using system-wide Coriolis 2 (/usr)" shellMessage = "Using system-wide Coriolis 2 (/usr)"
else: else:
m = reDevtoolset.match( scriptDir ) m = reDevtoolset.match( scriptDir )
if m: if m:
coriolisTop = "/opt/rh/devtoolset-%d/root/usr" % m.group('version') coriolisTop = "/opt/rh/devtoolset-%d/root/usr" % m.group('version')
sysconfDir = scriptDir sysconfDir = scriptDir
shellMessage = "Using system-wide devtoolset-%(v)d Coriolis 2 (/opt/rh/devtoolset-%(v)d/root/usr)" \ shellMessage = "Using system-wide devtoolset-%(v)d Coriolis 2 (/opt/rh/devtoolset-%(v)d/root/usr)" \
% { 'v':m.group('version') } % { 'v':m.group('version') }
elif scriptDir.startswith(os.getenv("HOME")+"/nightly/coriolis-2.x/"): elif scriptDir.startswith(os.getenv("HOME")+"/nightly/coriolis-2.x/"):
rootDir = os.getenv("HOME") + "/nightly/coriolis-2.x" rootDir = os.getenv("HOME") + "/nightly/coriolis-2.x"
coriolisTop = "%s/%s/%s/install" % ( rootDir, osType, buildDir ) coriolisTop = "%s/%s/%s/install" % ( rootDir, osType, buildDir )
sysconfDir = scriptDir sysconfDir = scriptDir
shellMessage = "Using Nightly build Coriolis 2 (%s)" % coriolisTop shellMessage = "Using Nightly build Coriolis 2 (%s)" % coriolisTop
elif scriptDir.startswith("/users/outil/coriolis/coriolis-2.x/") \ elif scriptDir.startswith("/users/outil/coriolis/coriolis-2.x/") \
or scriptDir.startswith("/soc/coriolis2/"): or scriptDir.startswith("/soc/coriolis2/"):
coriolisTop = "/soc/coriolis2" coriolisTop = "/soc/coriolis2"
sysconfDir = coriolisTop + "/etc/coriolis2" sysconfDir = coriolisTop + "/etc/coriolis2"
shellMessage = "Using SoC network-wide Coriolis 2 (/soc/coriolis2)" shellMessage = "Using SoC network-wide Coriolis 2 (/soc/coriolis2)"
else: else:
if not rootDir: if not rootDir:
rootDir = os.getenv("HOME") + "/coriolis-2.x" scriptRoot = '/'.join( scriptDir.split('/')[:-2] )
coriolisTop = "%s/%s/%s/install" % ( rootDir, osType, buildDir ) if not os.path.exists(scriptRoot):
sysconfDir = coriolisTop + "/etc/coriolis2" rootDir = os.getenv("HOME") + "/coriolis-2.x"
shellMessage = "Using user-selected Coriolis 2 (%s)" % rootDir coriolisTop = "%s/%s/%s/install" % ( rootDir, osType, buildDir )
sysconfDir = coriolisTop + "/etc/coriolis2"
shellMessage = "Using user-selected Coriolis 2 (%s)" % rootDir
else:
rootDir = scriptRoot
coriolisTop = rootDir
sysconfDir = coriolisTop + "/etc/coriolis2"
shellMessage = "Using script location Coriolis 2 (%s)" % rootDir
if osType.startswith("Cygwin"): if osType.startswith("Cygwin"):
strippedPath = "%s/lib:%s" % ( coriolisTop, libDir, strippedPath ) strippedPath = "%s/lib:%s" % ( coriolisTop, libDir, strippedPath )
if not os.path.exists(coriolisTop): if not os.path.exists(coriolisTop):
print 'echo "[ERROR] coriolisEnv.py, top directory <%s> do not exists."' % coriolisTop print( 'echo "[ERROR] coriolisEnv.py, top directory "{}" do not exists."'.format( coriolisTop ))
sys.exit( 1 ) sys.exit( 1 )
for lib in [ 'lib64', 'lib' ]: for lib in [ 'lib64', 'lib' ]:
libDir = lib libDir = lib
absLibDir = '{0}/{1}'.format( coriolisTop, lib ) absLibDir = '{0}/{1}'.format( coriolisTop, lib )
if os.path.isdir(absLibDir): break if os.path.isdir(absLibDir): break
libDir = None libDir = None
if libDir is None: if libDir is None:
print 'echo "[ERROR] coriolisEnv.py, library directory not found."' print( 'echo "[ERROR] coriolisEnv.py, library directory not found."' )
sys.exit( 1 ) sys.exit( 1 )
strippedPath = "%s/bin:%s" % ( coriolisTop, strippedPath ) strippedPath = "%s/bin:%s" % ( coriolisTop, strippedPath )
strippedLibraryPath = "%s:%s" % ( absLibDir , strippedLibraryPath ) strippedLibraryPath = "%s:%s" % ( absLibDir , strippedLibraryPath )
if not options.nopython: if not options.nopython:
pyVersion = sys.version_info pyVersion = sys.version_info
version = "%d.%d" % (pyVersion[0],pyVersion[1]) version = "%d.%d" % (pyVersion[0],pyVersion[1])
sitePackagesDir = "sitePackageDir_has_been_not_found"
sitePackagesDir = "sitePackageDir_has_been_not_found" for pyPackageDir in [ "%s/python%s.%s/site-packages" % (absLibDir,pyVersion[0],pyVersion[1])
for pyPackageDir in [ "%s/python%s/site-packages" % (absLibDir,version) , "%s/python%s.%s/dist-packages" % (absLibDir,pyVersion[0],pyVersion[1])
, "%s/python%s/dist-packages" % (absLibDir,version) , "%s/%s.%s/site-packages" % (absLibDir,pyVersion[0],pyVersion[1])
, "%s/%s/site-packages" % (absLibDir,version) , "%s/python%s/site-packages" % (absLibDir,pyVersion[0])
]: , "%s/python%s/dist-packages" % (absLibDir,pyVersion[0])
if os.path.isdir(pyPackageDir): , "%s/%s/site-packages" % (absLibDir,pyVersion[0])
sitePackagesDir = pyPackageDir ]:
break if os.path.isdir(pyPackageDir):
sitePackagesDir = pyPackageDir
strippedPythonPath = "%s:" % (sitePackagesDir) + strippedPythonPath break
strippedPythonPath = "%s/crlcore:" % (sitePackagesDir) + strippedPythonPath strippedPythonPath = "%s:" % (sitePackagesDir) + strippedPythonPath
strippedPythonPath = "%s/cumulus:" % (sitePackagesDir) + strippedPythonPath strippedPythonPath = "%s/crlcore:" % (sitePackagesDir) + strippedPythonPath
strippedPythonPath = "%s/cumulus/plugins:" % (sitePackagesDir) + strippedPythonPath strippedPythonPath = "%s/cumulus:" % (sitePackagesDir) + strippedPythonPath
strippedPythonPath = "%s/stratus:" % (sitePackagesDir) + strippedPythonPath strippedPythonPath = "%s/cumulus/plugins:" % (sitePackagesDir) + strippedPythonPath
strippedPythonPath = "%s:" % (sysconfDir) + strippedPythonPath strippedPythonPath = "%s/stratus:" % (sitePackagesDir) + strippedPythonPath
strippedPythonPath = "%s:" % (sysconfDir) + strippedPythonPath
shellScriptSh += 'PYTHONPATH="%(PYTHONPATH)s";' \ shellScriptSh += 'PYTHONPATH="%(PYTHONPATH)s";' \
'export PYTHONPATH;' 'export PYTHONPATH;'
shellScriptCsh += 'setenv PYTHONPATH "%(PYTHONPATH)s";' shellScriptCsh += 'setenv PYTHONPATH "%(PYTHONPATH)s";'
if osType == "Darwin":
if osType == "Darwin": shellScriptSh += 'DYLD_LIBRARY_PATH="%(LD_LIBRARY_PATH)s";' \
shellScriptSh += 'DYLD_LIBRARY_PATH="%(LD_LIBRARY_PATH)s";' \ 'export DYLD_LIBRARY_PATH;'
'export DYLD_LIBRARY_PATH;' shellScriptCsh += 'setenv DYLD_LIBRARY_PATH "%(LD_LIBRARY_PATH)s";'
shellScriptCsh += 'setenv DYLD_LIBRARY_PATH "%(LD_LIBRARY_PATH)s";' else:
else: shellScriptSh += 'LD_LIBRARY_PATH="%(LD_LIBRARY_PATH)s";' \
shellScriptSh += 'LD_LIBRARY_PATH="%(LD_LIBRARY_PATH)s";' \ 'export LD_LIBRARY_PATH;'
'export LD_LIBRARY_PATH;' shellScriptCsh += 'setenv LD_LIBRARY_PATH "%(LD_LIBRARY_PATH)s";'
shellScriptCsh += 'setenv LD_LIBRARY_PATH "%(LD_LIBRARY_PATH)s";'
shellScriptSh += "hash -r;" shellScriptSh += "hash -r;"
shellScriptCsh += "rehash;" shellScriptCsh += "rehash;"
if isBourneShell: shellScript = shellScriptSh if isBourneShell: shellScript = shellScriptSh
else: shellScript = shellScriptCsh else: shellScript = shellScriptCsh
if useDevtoolset: if useDevtoolset:
shellScript += \ shellScript += \
' echo "Launching a devtoolset-8 subshell though scl (CTRL+D to exit).";' \ ' echo "Launching a devtoolset-8 subshell though scl (CTRL+D to exit).";' \
' scl enable devtoolset-8 %(SHELL)s' ' scl enable devtoolset-8 %(SHELL)s'
evalScript = shellScript % { "PATH" : strippedPath evalScript = shellScript % { "PATH" : strippedPath
, "LD_LIBRARY_PATH" : strippedLibraryPath , "LD_LIBRARY_PATH" : strippedLibraryPath
@ -325,12 +324,10 @@ if __name__ == "__main__":
, 'SHELL' : shellBin , 'SHELL' : shellBin
} }
if options.queryISysRoot: if options.queryISysRoot:
print '%s/%s' % (rootDir,osType) print( '{}/{}'.format( rootDir, osType ))
sys.exit( 0 ) sys.exit( 0 )
if options.queryInstRoot: if options.queryInstRoot:
print coriolisTop print( coriolisTop )
sys.exit( 0 ) sys.exit( 0 )
print( evalScript )
print evalScript
sys.exit( 0 ) sys.exit( 0 )

View File

@ -1,9 +1,9 @@
#!/usr/bin/env python #!/usr/bin/env python3
# #
# -*- mode:Python -*- # -*- mode:Python -*-
# #
# This file is part of the Coriolis Software. # This file is part of the Coriolis Software.
# Copyright (c) UPMC 2015-2018, All Rights Reserved # Copyright (c) Sorbonne Université 2015-2021, All Rights Reserved
# #
# +-----------------------------------------------------------------+ # +-----------------------------------------------------------------+
# | C O R I O L I S | # | C O R I O L I S |
@ -24,77 +24,73 @@
showTrace = True showTrace = True
try: try:
import sys import sys
import os.path import os.path
import shutil import shutil
import optparse import optparse
import time import time
import traceback import traceback
import distutils.sysconfig import distutils.sysconfig
import subprocess import subprocess
import socket import socket
import re import re
import bz2 import bz2
import smtplib import smtplib
from email.mime.text import MIMEText from io import IOBase
from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText
from email.mime.application import MIMEApplication from email.mime.multipart import MIMEMultipart
except ImportError, e: from email.mime.application import MIMEApplication
module = str(e).split()[-1] except ImportError as e:
module = str(e).split()[-1]
class ErrorMessage ( Exception ): class ErrorMessage ( Exception ):
def __init__ ( self, code, *arguments ): def __init__ ( self, code, *arguments ):
self._code = code self._code = code
self._errors = [ 'Malformed call to ErrorMessage()', '%s' % str(arguments) ] self._errors = [ 'Malformed call to ErrorMessage()', '{}'.format(arguments) ]
text = None text = None
if len(arguments) == 1: if len(arguments) == 1:
if isinstance(arguments[0],Exception): text = str(arguments[0]).split('\n') if isinstance(arguments[0],Exception): text = str(arguments[0]).split('\n')
else:
self._errors = arguments[0]
elif len(arguments) > 1:
text = list(arguments)
if text:
self._errors = []
while len(text[0]) == 0: del text[0]
lstrip = 0
if text[0].startswith('[ERROR]'): lstrip = 8
for line in text:
if line[0:lstrip ] == ' '*lstrip or \
line[0:lstrip-1] == '[ERROR]':
self._errors += [ line[lstrip:] ]
else: else:
self._errors += [ line.lstrip() ] self._errors = arguments[0]
elif len(arguments) > 1:
text = list(arguments)
if text:
self._errors = []
while len(text[0]) == 0: del text[0]
lstrip = 0
if text[0].startswith('[ERROR]'): lstrip = 8
for line in text:
if line[0:lstrip ] == ' '*lstrip or \
line[0:lstrip-1] == '[ERROR]':
self._errors += [ line[lstrip:] ]
else:
self._errors += [ line.lstrip() ]
return return
def __str__ ( self ): def __str__ ( self ):
if not isinstance(self._errors,list): if not isinstance(self._errors,list):
return "[ERROR] %s" % self._errors return "[ERROR] {}".format(self._errors)
formatted = "\n" formatted = "\n"
for i in range(len(self._errors)): for i in range(len(self._errors)):
if i == 0: formatted += "[ERROR] %s" % self._errors[i] if i == 0: formatted += "[ERROR] {}".format(self._errors[i])
else: formatted += " %s" % self._errors[i] else: formatted += " {}".format(self._errors[i])
if i+1 < len(self._errors): formatted += "\n" if i+1 < len(self._errors): formatted += "\n"
return formatted return formatted
def addMessage ( self, message ): def addMessage ( self, message ):
if not isinstance(self._errors,list): if not isinstance(self._errors,list):
self._errors = [ self._errors ] self._errors = [ self._errors ]
if isinstance(message,list): if isinstance(message,list):
for line in message: for line in message:
self._errors += [ line ] self._errors += [ line ]
else: else:
self._errors += [ message ] self._errors += [ message ]
return return
def terminate ( self ): def terminate ( self ):
print self print( self )
sys.exit(self._code) sys.exit(self._code)
@property @property
@ -104,14 +100,14 @@ class ErrorMessage ( Exception ):
class BadBinary ( ErrorMessage ): class BadBinary ( ErrorMessage ):
def __init__ ( self, binary ): def __init__ ( self, binary ):
ErrorMessage.__init__( self, 1, "Binary not found: <%s>." % binary ) ErrorMessage.__init__( self, 1, 'Binary not found: "{}".'.format(binary) )
return return
class BadReturnCode ( ErrorMessage ): class BadReturnCode ( ErrorMessage ):
def __init__ ( self, status ): def __init__ ( self, status ):
ErrorMessage.__init__( self, 1, "Command returned status:%d." % status ) ErrorMessage.__init__( self, 1, 'Command returned status:{}.'.format(status) )
return return
@ -120,25 +116,31 @@ class Command ( object ):
def __init__ ( self, arguments, fdLog=None ): def __init__ ( self, arguments, fdLog=None ):
self.arguments = arguments self.arguments = arguments
self.fdLog = fdLog self.fdLog = fdLog
if self.fdLog != None and not isinstance(self.fdLog,IOBase):
if self.fdLog != None and not isinstance(self.fdLog,file): print( '[WARNING] Command.__init__(): "fdLog" is neither None or a file.' )
print '[WARNING] Command.__init__(): <fdLog> is neither None or a file.'
return return
def _argumentsToStr ( self, arguments ): def _argumentsToStr ( self, arguments ):
s = '' s = ''
for argument in arguments: for argument in arguments:
if argument.find(' ') >= 0: s += ' "' + argument + '"' if argument.find(' ') >= 0: s += ' "' + argument + '"'
else: s += ' ' + argument else: s += ' ' + argument
return s return s
def log ( self, text ): def log ( self, text ):
print text[:-1] if isinstance(self.fdLog,IOBase):
if isinstance(text,bytes):
print( text[:-1].decode('utf-8') )
self.fdLog.write( text.decode('utf-8') )
elif isinstance(text,str):
print( text[:-1] )
self.fdLog.write( text )
else:
print( '[ERROR] Command.log(): "text" is neither bytes or str.' )
print( ' {}'.format(text) )
self.fdLog.flush()
sys.stdout.flush() sys.stdout.flush()
sys.stderr.flush() sys.stderr.flush()
if isinstance(self.fdLog,file):
self.fdLog.write( text )
self.fdLog.flush()
return return
def execute ( self ): def execute ( self ):
@ -149,29 +151,26 @@ class Command ( object ):
homeDir = os.environ['HOME'] homeDir = os.environ['HOME']
workDir = os.getcwd() workDir = os.getcwd()
if homeDir.startswith(homeDir): if homeDir.startswith(homeDir):
workDir = '~' + workDir[ len(homeDir) : ] workDir = '~' + workDir[ len(homeDir) : ]
user = 'root' user = 'root'
if os.environ.has_key('USER'): user = os.environ['USER'] if 'USER' in os.environ: user = os.environ['USER']
prompt = '%s@%s:%s$' % (user,conf.masterHost,workDir) prompt = '{}@{}:{}$'.format(user,conf.masterHost,workDir)
try: try:
self.log( '%s%s\n' % (prompt,self._argumentsToStr(self.arguments)) ) self.log( '{}{}\n'.format(prompt,self._argumentsToStr(self.arguments)) )
print self.arguments print( self.arguments )
child = subprocess.Popen( self.arguments, stdout=subprocess.PIPE, stderr=subprocess.STDOUT ) child = subprocess.Popen( self.arguments, stdout=subprocess.PIPE, stderr=subprocess.STDOUT )
while True:
while True: line = child.stdout.readline()
line = child.stdout.readline() if not line: break
if not line: break self.log( line )
except OSError as e:
self.log( line ) raise BadBinary( self.arguments[0] )
except OSError, e:
raise BadBinary( self.arguments[0] )
(pid,status) = os.waitpid( child.pid, 0 ) (pid,status) = os.waitpid( child.pid, 0 )
status >>= 8 status >>= 8
if status != 0: if status != 0:
raise BadReturnCode( status ) raise BadReturnCode( status )
return return
@ -186,11 +185,10 @@ class CommandArg ( object ):
def __str__ ( self ): def __str__ ( self ):
s = '' s = ''
if self.wd: s = 'cd %s && ' % self.wd if self.wd: s = 'cd {} && '.format(self.wd)
for i in range(len(self.command)): for i in range(len(self.command)):
if i: s += ' ' if i: s += ' '
s += self.command[i] s += self.command[i]
return s return s
def getArgs ( self ): def getArgs ( self ):
@ -223,7 +221,7 @@ class CoriolisCommand ( CommandArg ):
CommandArg.__init__ ( self, [ ccbBin CommandArg.__init__ ( self, [ ccbBin
, '--root='+rootDir , '--root='+rootDir
, '--project=coriolis' , '--project=coriolis'
, '--make=-j%d install' % threads , '--make=-j{} install'.format(threads)
] + otherArgs ] + otherArgs
, fdLog=fdLog ) , fdLog=fdLog )
return return
@ -258,21 +256,20 @@ class GitRepository ( object ):
def removeLocalRepo ( self ): def removeLocalRepo ( self ):
if os.path.isdir(self.localRepoDir): if os.path.isdir(self.localRepoDir):
print 'Removing Git local repository: <%s>' % self.localRepoDir print( 'Removing Git local repository: "{}"'.format(self.localRepoDir) )
shutil.rmtree( self.localRepoDir ) shutil.rmtree( self.localRepoDir )
return return
def clone ( self ): def clone ( self ):
print 'Clone/pull from:', self.url print( 'Clone/pull from:', self.url )
if not os.path.isdir(self.cloneDir): if not os.path.isdir(self.cloneDir):
os.makedirs( self.cloneDir ) os.makedirs( self.cloneDir )
if not os.path.isdir(self.localRepoDir): if not os.path.isdir(self.localRepoDir):
os.chdir( self.cloneDir ) os.chdir( self.cloneDir )
Command( [ 'git', 'clone', self.url ], self.fdLog ).execute() Command( [ 'git', 'clone', self.url ], self.fdLog ).execute()
else: else:
os.chdir( self.localRepoDir ) os.chdir( self.localRepoDir )
Command( [ 'git', 'pull' ], self.fdLog ).execute() Command( [ 'git', 'pull' ], self.fdLog ).execute()
return return
def checkout ( self, branch ): def checkout ( self, branch ):
@ -323,28 +320,26 @@ class Configuration ( object ):
self._masterHost = self._detectMasterHost() self._masterHost = self._detectMasterHost()
self._success = False self._success = False
self._rcode = 0 self._rcode = 0
self._updateSecondaries() self._updateSecondaries()
return return
def __setattr__ ( self, attribute, value ): def __setattr__ ( self, attribute, value ):
if attribute in Configuration.SecondaryNames: if attribute in Configuration.SecondaryNames:
print ErrorMessage( 1, 'Attempt to write in read-only attribute <%s> in Configuration.'%attribute ) print( ErrorMessage( 1, 'Attempt to write in read-only attribute "{}" in Configuration.' \
return .format(attribute) ))
return
if attribute == 'masterHost' or attribute == '_masterHost': if attribute == 'masterHost' or attribute == '_masterHost':
if value == 'lepka': if value == 'lepka':
print 'Never touch the Git tree when running on <lepka>.' print( 'Never touch the Git tree when running on "lepka".' )
self._rmSource = False self._rmSource = False
self._rmBuild = False self._rmBuild = False
self._doGit = False self._doGit = False
self._doSendReport = False self._doSendReport = False
if attribute[0] == '_': if attribute[0] == '_':
self.__dict__[attribute] = value self.__dict__[attribute] = value
return return
if attribute == 'homeDir': value = os.path.expanduser(value)
if attribute == 'homeDir': value = os.path.expanduser(value)
self.__dict__['_'+attribute] = value self.__dict__['_'+attribute] = value
self._updateSecondaries() self._updateSecondaries()
@ -352,15 +347,15 @@ class Configuration ( object ):
def __getattr__ ( self, attribute ): def __getattr__ ( self, attribute ):
if attribute[0] != '_': attribute = '_'+attribute if attribute[0] != '_': attribute = '_'+attribute
if not self.__dict__.has_key(attribute): if not attribute in self.__dict__:
raise ErrorMessage( 1, 'Configuration has no attribute <%s>.'%attribute ) raise ErrorMessage( 1, 'Configuration has no attribute "{}".'.format(attribute) )
return self.__dict__[attribute] return self.__dict__[attribute]
def _updateSecondaries ( self ): def _updateSecondaries ( self ):
if self._nightlyMode: if self._nightlyMode:
self._rootDir = self._homeDir + '/nightly/coriolis-2.x' self._rootDir = self._homeDir + '/nightly/coriolis-2.x'
else: else:
self._rootDir = self._homeDir + '/coriolis-2.x' self._rootDir = self._homeDir + '/coriolis-2.x'
self._srcDir = self._rootDir + '/src' self._srcDir = self._rootDir + '/src'
self._logDir = self._srcDir + '/logs' self._logDir = self._srcDir + '/logs'
self._yosysBin = self._srcDir + '/' + GitRepository.getLocalRepository(self._coriolisRepo) + '/bootstrap/yosysInstaller.sh' self._yosysBin = self._srcDir + '/' + GitRepository.getLocalRepository(self._coriolisRepo) + '/bootstrap/yosysInstaller.sh'
@ -373,27 +368,24 @@ class Configuration ( object ):
def _detectMasterHost ( self ): def _detectMasterHost ( self ):
if self._chrootMode is None: return 'unknown' if self._chrootMode is None: return 'unknown'
if self._chrootMode: return 'chrooted-host' if self._chrootMode: return 'chrooted-host'
masterHost = 'unknown' masterHost = 'unknown'
hostname = socket.gethostname() hostname = socket.gethostname()
hostAddr = socket.gethostbyname(hostname) hostAddr = socket.gethostbyname(hostname)
if hostname == 'lepka' and hostAddr == '127.0.0.1': if hostname == 'lepka' and hostAddr == '127.0.0.1':
masterHost = 'lepka' masterHost = 'lepka'
else: else:
masterHost = hostname.split('.')[0] masterHost = hostname.split('.')[0]
return masterHost return masterHost
def openLog ( self, stem ): def openLog ( self, stem ):
if not os.path.isdir(self._logDir): if not os.path.isdir(self._logDir):
os.makedirs( self._logDir ) os.makedirs( self._logDir )
index = 0 index = 0
timeTag = time.strftime( "%Y.%m.%d" ) timeTag = time.strftime( "%Y.%m.%d" )
while True: while True:
logFile = os.path.join(self._logDir,"%s-%s-%02d.log" % (stem,timeTag,index)) logFile = os.path.join(self._logDir,"{}-{}-{:02}.log".format(stem,timeTag,index))
if not os.path.isfile(logFile): if not os.path.isfile(logFile):
print "Report log: <%s>" % logFile print( 'Report log: "{}"'.format(logFile) )
break break
index += 1 index += 1
fd = open( logFile, "w" ) fd = open( logFile, "w" )
@ -403,65 +395,59 @@ class Configuration ( object ):
def closeLogs ( self ): def closeLogs ( self ):
for fd in self._fds.values(): for fd in self._fds.values():
if fd: fd.close() if fd: fd.close()
return return
def compressLogs ( self ): def compressLogs ( self ):
for log in self._logs.values(): for log in self._logs.values():
if not log: continue if not log: continue
fd = open( log, 'r' )
fd = open( log, 'r' ) bzfd = bz2.BZ2File( log+'.bz2', 'w' )
bzfd = bz2.BZ2File( log+'.bz2', 'w' ) for line in fd.readlines():
if isinstance(line,str):
for line in fd.readlines(): bzfd.write( line ) bzfd.write( line.encode('utf-8') )
elif isinstance(line,bytes):
bzfd.close() bzfd.write( line )
fd.close() bzfd.close()
fd.close()
os.unlink( log ) os.unlink( log )
return return
def getCommands ( self, target ): def getCommands ( self, target ):
commands = [] commands = []
if self.doYosys: if self.doYosys:
if not os.path.isfile( self.yosysBin ): if not os.path.isfile( self.yosysBin ):
raise ErrorMessage( 1, [ 'Cannot find <yosysInstaller.sh>, should be here:' raise ErrorMessage( 1, [ 'Cannot find <yosysInstaller.sh>, should be here:'
, ' <%s>' % self.yosysBin , ' "{}"'.format(self.yosysBin)
] ) ] )
commands.append( YosysCommand( self.yosysBin, fdLog=self.fds['yosys'] ) ) commands.append( YosysCommand( self.yosysBin, fdLog=self.fds['yosys'] ) )
if self.doAlliance: if self.doAlliance:
if not os.path.isfile( self.alcBin ): if not os.path.isfile( self.alcBin ):
raise ErrorMessage( 1, [ 'Cannot find <allianceInstaller.sh>, should be here:' raise ErrorMessage( 1, [ 'Cannot find <allianceInstaller.sh>, should be here:'
, ' <%s>' % self.alcBin , ' "{}"'.format(self.alcBin)
] ) ] )
commands.append( AllianceCommand( self.alcBin, fdLog=self.fds['alliance'] ) ) commands.append( AllianceCommand( self.alcBin, fdLog=self.fds['alliance'] ) )
if self.doCoriolis: if self.doCoriolis:
if not os.path.isfile( self.ccbBin ): if not os.path.isfile( self.ccbBin ):
raise ErrorMessage( 1, [ 'Cannot find <ccb.py>, should be here:' raise ErrorMessage( 1, [ 'Cannot find <ccb.py>, should be here:'
, ' <%s>' % self.ccbBin , ' "{}"'.format(self.ccbBin)
] ) ] )
otherArgs = []
otherArgs = [] if self.debugArg: otherArgs.append( self.debugArg )
if self.debugArg: otherArgs.append( self.debugArg ) if target == 'SL7_64':
otherArgs.append( '--project=support' )
if target == 'SL7_64': commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs , fdLog=self.fds['coriolis'] ) )
otherArgs.append( '--project=support' ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) )
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs , fdLog=self.fds['coriolis'] ) ) elif target == 'SL6_64' or target == 'SL6':
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) ) otherArgs.append( '--project=support' )
elif target == 'SL6_64' or target == 'SL6': otherArgs.append( '--devtoolset=8' )
otherArgs.append( '--project=support' ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 6, otherArgs , fdLog=self.fds['coriolis'] ) )
otherArgs.append( '--devtoolset=8' ) commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) )
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 6, otherArgs , fdLog=self.fds['coriolis'] ) ) elif target == 'Ubuntu18' or target == 'Debian9' or target == 'Debian10':
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 1, otherArgs+['--doc'], fdLog=self.fds['coriolis'] ) ) if target == 'Ubuntu18': otherArgs.append( '--qt5' )
elif target == 'Ubuntu18' or target == 'Debian9' or target == 'Debian10': commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs, fdLog=self.fds['coriolis'] ) )
if target == 'Ubuntu18': otherArgs.append( '--qt5' )
commands.append( CoriolisCommand( self.ccbBin, self.rootDir, 3, otherArgs, fdLog=self.fds['coriolis'] ) )
if self.doBenchs: if self.doBenchs:
commands.append( BenchsCommand( self.benchsDir, fdLog=self.fds['benchs'] ) ) commands.append( BenchsCommand( self.benchsDir, fdLog=self.fds['benchs'] ) )
return commands return commands
@ -469,33 +455,30 @@ class Report ( object ):
def __init__ ( self, conf ): def __init__ ( self, conf ):
self.conf = conf self.conf = conf
commaspace = ', ' commaspace = ', '
date = time.strftime( "%A %d %B %Y" ) date = time.strftime( "%A %d %B %Y" )
stateText = 'FAILED' stateText = 'FAILED'
modeText = 'SoC installation' modeText = 'SoC installation'
if self.conf.success: stateText = 'SUCCESS' if self.conf.success: stateText = 'SUCCESS'
if self.conf.nightlyMode: modeText = 'Nightly build' if self.conf.nightlyMode: modeText = 'Nightly build'
self.message = MIMEMultipart() self.message = MIMEMultipart()
self.message['Subject'] = '[%s] Coriolis %s %s' % (stateText,modeText,date) self.message['Subject'] = '[{}] Coriolis {} {}'.format(stateText,modeText,date)
self.message['From' ] = self.conf.sender self.message['From' ] = self.conf.sender
self.message['To' ] = commaspace.join( self.conf.receivers ) self.message['To' ] = commaspace.join( self.conf.receivers )
self.attachements = [] self.attachements = []
self.mainText = '\n' self.mainText = '\n'
self.mainText += 'Salut le Crevard,\n' self.mainText += 'Salut le Crevard,\n'
self.mainText += '\n' self.mainText += '\n'
if self.conf.nightlyMode: if self.conf.nightlyMode:
self.mainText += 'This is the nightly build report of Coriolis.\n' self.mainText += 'This is the nightly build report of Coriolis.\n'
else: else:
self.mainText += 'SoC installer report of Coriolis.\n' self.mainText += 'SoC installer report of Coriolis.\n'
self.mainText += '%s\n' % date self.mainText += '{}\n'.format(date)
self.mainText += '\n' self.mainText += '\n'
if self.conf.success: if self.conf.success:
self.mainText += 'Build was SUCCESSFUL\n' self.mainText += 'Build was SUCCESSFUL\n'
else: else:
self.mainText += 'Build has FAILED, please have a look to the attached log file(s).\n' self.mainText += 'Build has FAILED, please have a look to the attached log file(s).\n'
self.mainText += '\n' self.mainText += '\n'
self.mainText += 'Complete log file(s) can be found here:\n' self.mainText += 'Complete log file(s) can be found here:\n'
return return
@ -505,28 +488,27 @@ class Report ( object ):
fd = open( logFile, 'rb' ) fd = open( logFile, 'rb' )
try: try:
fd.seek( -1024*100, os.SEEK_END ) fd.seek( -1024*100, os.SEEK_END )
except IOError, e: except IOError as e:
pass pass
tailLines = '' tailLines = ''
for line in fd.readlines()[1:]: for line in fd.readlines()[1:]:
tailLines += line tailLines += line.decode( 'latin_1' )
fd.close() fd.close()
self.mainText += ' <%s>\n' % logFile self.mainText += ' "{}"\n'.format(logFile)
attachement = MIMEApplication(tailLines) attachement = MIMEApplication(tailLines)
attachement.add_header( 'Content-Disposition', 'attachment', filename=os.path.basename(logFile) ) attachement.add_header( 'Content-Disposition', 'attachment', filename=os.path.basename(logFile) )
self.attachements.append( attachement ) self.attachements.append( attachement )
return return
def send ( self ): def send ( self ):
self.message.attach( MIMEText(self.mainText) ) self.message.attach( MIMEText(self.mainText) )
for attachement in self.attachements: for attachement in self.attachements:
self.message.attach( attachement ) self.message.attach( attachement )
print "Sending mail report to:" print( "Sending mail report to:" )
for receiver in self.conf.receivers: print ' <%s>' % receiver for receiver in self.conf.receivers: print( ' <{}>'.format(receiver) )
session = smtplib.SMTP( 'localhost' ) session = smtplib.SMTP( 'localhost' )
session.sendmail( self.conf.sender, self.conf.receivers, self.message.as_string() ) session.sendmail( self.conf.sender, self.conf.receivers, self.message.as_string() )
session.quit() session.quit()
@ -577,7 +559,6 @@ try:
if conf.doAlliance: conf.openLog( 'alliance' ) if conf.doAlliance: conf.openLog( 'alliance' )
if conf.doCoriolis: conf.openLog( 'coriolis' ) if conf.doCoriolis: conf.openLog( 'coriolis' )
if conf.doBenchs: conf.openLog( 'benchs' ) if conf.doBenchs: conf.openLog( 'benchs' )
if conf.dockerMode: os.environ['USER'] = 'root' if conf.dockerMode: os.environ['USER'] = 'root'
gitSupports = [] gitSupports = []
@ -613,29 +594,28 @@ try:
for entry in os.listdir(conf.rootDir): for entry in os.listdir(conf.rootDir):
if entry.startswith('Linux.'): if entry.startswith('Linux.'):
buildDir = conf.rootDir+'/'+entry buildDir = conf.rootDir+'/'+entry
print 'Removing OS build directory: <%s>' % buildDir print( 'Removing OS build directory: "{}"'.format(buildDir) )
shutil.rmtree( buildDir ) shutil.rmtree( buildDir )
commands = conf.getCommands( options.profile ) commands = conf.getCommands( options.profile )
for command in commands: for command in commands:
if command.host: if command.host:
print 'Executing command on remote host <%s>:' % host print( 'Executing command on remote host "{}":'.format(host) )
else: else:
print 'Executing command on *local* host:' print( 'Executing command on *local* host:' )
print ' %s' % str(command) print( ' {}'.format(command) )
command.execute() command.execute()
conf.closeLogs() conf.closeLogs()
conf.success = True conf.success = True
except ErrorMessage, e: except ErrorMessage as e:
print e print( e )
conf.closeLogs() conf.closeLogs()
conf.success = False conf.success = False
if showTrace: if showTrace:
print '\nPython stack trace:' print( '\nPython stack trace:' )
traceback.print_tb( sys.exc_info()[2] ) traceback.print_tb( sys.exc_info()[2] )
conf.rcode = e.code conf.rcode = e.code

View File

@ -4,6 +4,7 @@
project(BORA) project(BORA)
option(BUILD_DOC "Build the documentation (doxygen)" OFF) option(BUILD_DOC "Build the documentation (doxygen)" OFF)
option(USE_LIBBFD "Link with BFD libraries to print stack traces" OFF)
cmake_minimum_required(VERSION 2.8.9) cmake_minimum_required(VERSION 2.8.9)
@ -14,15 +15,14 @@
setup_project_paths(CORIOLIS) setup_project_paths(CORIOLIS)
set_cmake_policies() set_cmake_policies()
setup_boost(program_options filesystem python regex) setup_boost(program_options)
setup_qt() setup_qt()
setup_qwt() setup_qwt()
find_package(Libexecinfo REQUIRED) find_package(Libexecinfo REQUIRED)
find_package(PythonLibs 2 REQUIRED) find_package(Python 3 REQUIRED COMPONENTS Interpreter Development)
find_package(PythonSitePackages REQUIRED) find_package(PythonSitePackages REQUIRED)
find_package(LEFDEF REQUIRED) find_package(LEFDEF REQUIRED)
find_package(VLSISAPD REQUIRED)
find_package(FLUTE REQUIRED) find_package(FLUTE REQUIRED)
find_package(HURRICANE REQUIRED) find_package(HURRICANE REQUIRED)
find_package(CORIOLIS REQUIRED) find_package(CORIOLIS REQUIRED)

View File

@ -1,2 +1,2 @@
install ( FILES boraInit.py DESTINATION ${PYTHON_SITE_PACKAGES}/bora ) install ( FILES boraInit.py DESTINATION ${Python_CORIOLISLIB}/bora )

View File

@ -1,29 +1,27 @@
#!/usr/bin/env python
try: try:
import sys import sys
import os.path import os.path
import helpers.io import helpers.io
from helpers.io import ErrorMessage from helpers.io import ErrorMessage
from helpers.io import WarningMessage from helpers.io import WarningMessage
import Viewer import Viewer
except Exception, e: except Exception as e:
helpers.io.catch( e ) helpers.io.catch( e )
sys.exit( 1 ) sys.exit( 1 )
def boraHook ( **kw ): def boraHook ( **kw ):
bora = None bora = None
if kw.has_key('bora'): if 'bora' in kw:
bora = kw['bora'] bora = kw['bora']
else: else:
print ErrorMessage( 3, 'boraHook(): Must be run from a BoraEngine.' ) print( ErrorMessage( 3, 'boraHook(): Must be run from a BoraEngine.' ))
return return
try: try:
userInit = os.path.join( os.getcwd(), 'coriolis2/bora.py' ) userInit = os.path.join( os.getcwd(), 'coriolis2/bora.py' )
if (os.path.exists(userInit)): if (os.path.exists(userInit)):
execfile( userInit ) exec( open(userInit).read() )
except Exception, e: except Exception as e:
helpers.io.catch( e ) helpers.io.catch( e )
return return

View File

@ -9,7 +9,7 @@
${Boost_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}
${QWT_INCLUDE_DIR} ${QWT_INCLUDE_DIR}
${QtX_INCLUDE_DIR} ${QtX_INCLUDE_DIR}
${PYTHON_INCLUDE_PATH} ${Python_INCLUDE_DIRS}
) )
set( includes bora/Constants.h set( includes bora/Constants.h
bora/ParameterRange.h bora/ParameterRange.h
@ -101,7 +101,7 @@
${QWT_LIBRARY} ${QWT_LIBRARY}
${QtX_LIBRARIES} ${QtX_LIBRARIES}
${Boost_LIBRARIES} ${Boost_LIBRARIES}
${PYTHON_LIBRARIES} -lutil ${Python_LIBRARIES} -lutil
) )
add_library( bora ${cpps} ${mocCpps} ${pyCpps} ) add_library( bora ${cpps} ${mocCpps} ${pyCpps} )

View File

@ -1,7 +1,7 @@
// -*- C++ -*- // -*- C++ -*-
// //
// This file is part of the Coriolis Software. // This file is part of the Coriolis Software.
// Copyright (c) UPMC 2016-2018, All Rights Reserved // Copyright (c) Sorbonne Université 2016-2021, All Rights Reserved
// //
// +-----------------------------------------------------------------+ // +-----------------------------------------------------------------+
// | C O R I O L I S | // | C O R I O L I S |
@ -63,12 +63,21 @@ extern "C" {
}; };
// --------------------------------------------------------------- static PyModuleDef PyBora_ModuleDef =
// Module Initialization : "initBora ()" { PyModuleDef_HEAD_INIT
, .m_name = "Bora"
, .m_doc = "Analog Place & Global Route."
, .m_size = -1
, .m_methods = PyBora_Methods
};
DL_EXPORT(void) initBora ()
// ---------------------------------------------------------------
// Module Initialization : "PyInit_Bora ()"
PyMODINIT_FUNC PyInit_Bora ( void )
{ {
cdebug.log(61) << "initBora()" << endl; cdebug.log(61) << "PyInit_Bora()" << endl;
PyParameterRange_LinkPyType(); PyParameterRange_LinkPyType();
PyStepParameterRange_LinkPyType(); PyStepParameterRange_LinkPyType();
@ -95,12 +104,11 @@ extern "C" {
PYTYPE_READY_SUB( BoraEngine , ToolEngine ); PYTYPE_READY_SUB( BoraEngine , ToolEngine );
PYTYPE_READY_SUB( GraphicBoraEngine , GraphicTool ); PYTYPE_READY_SUB( GraphicBoraEngine , GraphicTool );
PyObject* module = PyModule_Create( &PyBora_ModuleDef );
PyObject* module = Py_InitModule( "Bora", PyBora_Methods );
if (module == NULL) { if (module == NULL) {
cerr << "[ERROR]\n" cerr << "[ERROR]\n"
<< " Failed to initialize Bora module." << endl; << " Failed to initialize Bora module." << endl;
return; return NULL;
} }
Py_INCREF( &PyTypeParameterRange ); Py_INCREF( &PyTypeParameterRange );
@ -128,6 +136,8 @@ extern "C" {
PySlicingNode_postModuleInit(); PySlicingNode_postModuleInit();
PyBoraEngine_postModuleInit(); PyBoraEngine_postModuleInit();
return module;
} }

View File

@ -62,12 +62,12 @@ extern "C" {
DSlicingNode* node = NULL; DSlicingNode* node = NULL;
HTRY HTRY
if (not PyArg_ParseTuple( args,"SOO|O:DSlicingNode.create" if (not PyArg_ParseTuple( args,"OOO|O:DSlicingNode.create"
, &pyInstance , &pyInstance
, &pyCell , &pyCell
, &pyParameterRange , &pyParameterRange
, &pyRoutingGauge ) ) { , &pyRoutingGauge ) ) {
PyErr_SetString ( ConstructorError, "DSlicingNode.create(): Invalid/bad number of parameters ." ); PyErr_SetString ( ConstructorError, "DSlicingNode.create(): Invalid/bad number of parameters." );
return NULL; return NULL;
} }
if (not IsPyCell(pyCell)) { if (not IsPyCell(pyCell)) {

View File

@ -22,6 +22,7 @@
#include <QHBoxLayout> #include <QHBoxLayout>
#include <QVBoxLayout> #include <QVBoxLayout>
#include <qwt_scale_draw.h> #include <qwt_scale_draw.h>
#include <qwt_scale_map.h>
#include <qwt_scale_widget.h> #include <qwt_scale_widget.h>
#include <qwt_symbol.h> #include <qwt_symbol.h>
#include <qwt_plot_curve.h> #include <qwt_plot_curve.h>

View File

@ -17,6 +17,7 @@
#ifndef BORA_NODE_SETS_H #ifndef BORA_NODE_SETS_H
#define BORA_NODE_SETS_H #define BORA_NODE_SETS_H
#include <algorithm>
#include <cstddef> #include <cstddef>
#include <limits> #include <limits>
#include "BoxSet.h" #include "BoxSet.h"

View File

@ -3,9 +3,10 @@
set(CMAKE_LEGACY_CYGWIN_WIN32 0) set(CMAKE_LEGACY_CYGWIN_WIN32 0)
project(COLOQUINTE) project(COLOQUINTE)
set(ignoreVariables "${CMAKE_INSTALL_DIR}") set(ignoreVariables "${CMAKE_INSTALL_DIR}" "${BUILD_DOC}")
option(BUILD_DOC "Build the documentation (doxygen)" OFF) #option(BUILD_DOC "Build the documentation (doxygen)" OFF)
option(USE_LIBBFD "Link with BFD libraries to print stack traces" OFF)
cmake_minimum_required(VERSION 2.8.9) cmake_minimum_required(VERSION 2.8.9)

View File

@ -9,6 +9,7 @@
#include <cassert> #include <cassert>
#include <numeric> #include <numeric>
#include <cmath> #include <cmath>
#include <limits>
namespace coloquinte{ namespace coloquinte{

View File

@ -4,6 +4,7 @@
#include <cassert> #include <cassert>
#include <stdexcept> #include <stdexcept>
#include <cmath> #include <cmath>
#include <limits>
namespace coloquinte{ namespace coloquinte{
namespace gp{ namespace gp{

View File

@ -9,6 +9,7 @@
#include <functional> #include <functional>
#include <cmath> #include <cmath>
#include <array> #include <array>
#include <limits>
namespace coloquinte{ namespace coloquinte{
using edge_t = std::pair<index_t, index_t>; using edge_t = std::pair<index_t, index_t>;

View File

@ -19,20 +19,21 @@
set_cmake_policies() set_cmake_policies()
check_distribution() check_distribution()
setup_sysconfdir("${CMAKE_INSTALL_PREFIX}") setup_sysconfdir("${CMAKE_INSTALL_PREFIX}")
setup_boost(program_options python regex wave) setup_boost(program_options)
setup_qt() setup_qt()
cmake_policy(SET CMP0054 NEW)
if (USE_LIBBFD) if (USE_LIBBFD)
find_package(Libbfd) find_package(Libbfd)
endif() endif()
find_package(LibXml2 REQUIRED) find_package(LibXml2 REQUIRED)
find_package(PythonLibs 2 REQUIRED) find_package(Python 3 REQUIRED COMPONENTS Interpreter Development)
find_package(PythonSitePackages REQUIRED) find_package(PythonSitePackages REQUIRED)
find_package(BISON REQUIRED) find_package(BISON REQUIRED)
find_package(FLEX REQUIRED) find_package(FLEX REQUIRED)
find_package(LEFDEF) find_package(LEFDEF)
find_package(OPENACCESS) find_package(OPENACCESS)
find_package(VLSISAPD REQUIRED)
find_package(HURRICANE REQUIRED) find_package(HURRICANE REQUIRED)
find_package(Libexecinfo REQUIRED) find_package(Libexecinfo REQUIRED)
#include(UseLATEX) #include(UseLATEX)

View File

@ -54,7 +54,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -77,7 +77,7 @@ $(function() {
<div class="ttc" id="classCRL_1_1AllianceFramework_html_a036bd6fa8f837c81f60b9d424f817add"><div class="ttname"><a href="classCRL_1_1AllianceFramework.html#a036bd6fa8f837c81f60b9d424f817add">CRL::AllianceFramework::getCatalog</a></div><div class="ttdeci">Catalog * getCatalog()</div><div class="ttdef"><b>Definition:</b> AllianceFramework.h:176</div></div> <div class="ttc" id="classCRL_1_1AllianceFramework_html_a036bd6fa8f837c81f60b9d424f817add"><div class="ttname"><a href="classCRL_1_1AllianceFramework.html#a036bd6fa8f837c81f60b9d424f817add">CRL::AllianceFramework::getCatalog</a></div><div class="ttdeci">Catalog * getCatalog()</div><div class="ttdef"><b>Definition:</b> AllianceFramework.h:176</div></div>
<div class="ttc" id="classCRL_1_1AllianceFramework_html_a03ef94e043d2d25eb7a6a5f1ae176432a4a10630340ffb5b0aa9983f8b7f4cbe0"><div class="ttname"><a href="classCRL_1_1AllianceFramework.html#a03ef94e043d2d25eb7a6a5f1ae176432a4a10630340ffb5b0aa9983f8b7f4cbe0">CRL::AllianceFramework::IgnoreFeeds</a></div><div class="ttdef"><b>Definition:</b> AllianceFramework.h:49</div></div> <div class="ttc" id="classCRL_1_1AllianceFramework_html_a03ef94e043d2d25eb7a6a5f1ae176432a4a10630340ffb5b0aa9983f8b7f4cbe0"><div class="ttname"><a href="classCRL_1_1AllianceFramework.html#a03ef94e043d2d25eb7a6a5f1ae176432a4a10630340ffb5b0aa9983f8b7f4cbe0">CRL::AllianceFramework::IgnoreFeeds</a></div><div class="ttdef"><b>Definition:</b> AllianceFramework.h:49</div></div>
<div class="ttc" id="classCRL_1_1AllianceFramework_html_ae102d655820c5d0a29a0200c5e83d42c"><div class="ttname"><a href="classCRL_1_1AllianceFramework.html#ae102d655820c5d0a29a0200c5e83d42c">CRL::AllianceFramework::getRoutingGauge</a></div><div class="ttdeci">RoutingGauge * getRoutingGauge(const Name &amp;name=&quot;&quot;)</div></div> <div class="ttc" id="classCRL_1_1AllianceFramework_html_ae102d655820c5d0a29a0200c5e83d42c"><div class="ttname"><a href="classCRL_1_1AllianceFramework.html#ae102d655820c5d0a29a0200c5e83d42c">CRL::AllianceFramework::getRoutingGauge</a></div><div class="ttdeci">RoutingGauge * getRoutingGauge(const Name &amp;name=&quot;&quot;)</div></div>
<div class="ttc" id="classCRL_1_1Catalog_html"><div class="ttname"><a href="classCRL_1_1Catalog.html">CRL::Catalog</a></div><div class="ttdoc">A Registry to store Alliance Cell metadatas. </div><div class="ttdef"><b>Definition:</b> Catalog.h:56</div></div> <div class="ttc" id="classCRL_1_1Catalog_html"><div class="ttname"><a href="classCRL_1_1Catalog.html">CRL::Catalog</a></div><div class="ttdoc">A Registry to store Alliance Cell metadatas. </div><div class="ttdef"><b>Definition:</b> Catalog.h:54</div></div>
<div class="ttc" id="classCRL_1_1AllianceFramework_html_a4085f3bc96ca5e4bf2d41a4ada9658f2"><div class="ttname"><a href="classCRL_1_1AllianceFramework.html#a4085f3bc96ca5e4bf2d41a4ada9658f2">CRL::AllianceFramework::getAllianceLibrary</a></div><div class="ttdeci">AllianceLibrary * getAllianceLibrary(unsigned int index)</div></div> <div class="ttc" id="classCRL_1_1AllianceFramework_html_a4085f3bc96ca5e4bf2d41a4ada9658f2"><div class="ttname"><a href="classCRL_1_1AllianceFramework.html#a4085f3bc96ca5e4bf2d41a4ada9658f2">CRL::AllianceFramework::getAllianceLibrary</a></div><div class="ttdeci">AllianceLibrary * getAllianceLibrary(unsigned int index)</div></div>
<div class="ttc" id="classCRL_1_1AllianceFramework_html_a0ec1cd09dec34dfecfec22927b92cc25a8d9678631764327cbfe81f8184fa9e05"><div class="ttname"><a href="classCRL_1_1AllianceFramework.html#a0ec1cd09dec34dfecfec22927b92cc25a8d9678631764327cbfe81f8184fa9e05">CRL::AllianceFramework::HasCatalog</a></div><div class="ttdef"><b>Definition:</b> AllianceFramework.h:53</div></div> <div class="ttc" id="classCRL_1_1AllianceFramework_html_a0ec1cd09dec34dfecfec22927b92cc25a8d9678631764327cbfe81f8184fa9e05"><div class="ttname"><a href="classCRL_1_1AllianceFramework.html#a0ec1cd09dec34dfecfec22927b92cc25a8d9678631764327cbfe81f8184fa9e05">CRL::AllianceFramework::HasCatalog</a></div><div class="ttdef"><b>Definition:</b> AllianceFramework.h:53</div></div>
<div class="ttc" id="classCRL_1_1Environment_html"><div class="ttname"><a href="classCRL_1_1Environment.html">CRL::Environment</a></div><div class="ttdoc">Holds all the Alliance environment variables. </div><div class="ttdef"><b>Definition:</b> Environment.h:33</div></div> <div class="ttc" id="classCRL_1_1Environment_html"><div class="ttname"><a href="classCRL_1_1Environment.html">CRL::Environment</a></div><div class="ttdoc">Holds all the Alliance environment variables. </div><div class="ttdef"><b>Definition:</b> Environment.h:33</div></div>
@ -92,7 +92,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -59,7 +59,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -66,7 +66,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

File diff suppressed because one or more lines are too long

View File

@ -98,7 +98,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -60,7 +60,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -68,7 +68,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -58,7 +58,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -57,7 +57,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -64,7 +64,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -53,7 +53,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -118,7 +118,7 @@ Static Public Member Functions</h2></td></tr>
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -94,7 +94,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -905,7 +905,7 @@ Static Public Member Functions</h2></td></tr>
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -56,7 +56,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -175,7 +175,7 @@ Public Member Functions</h2></td></tr>
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -67,7 +67,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -495,7 +495,7 @@ Public Member Functions</h2></td></tr>
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -60,7 +60,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -292,7 +292,7 @@ Public Member Functions</h2></td></tr>
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -69,7 +69,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -691,7 +691,7 @@ Static Public Member Functions</h2></td></tr>
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -83,7 +83,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -781,7 +781,7 @@ Public Member Functions</h2></td></tr>
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -96,7 +96,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -1136,7 +1136,7 @@ Public Member Functions</h2></td></tr>
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -54,7 +54,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -127,7 +127,7 @@ Public Member Functions</h2></td></tr>
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -68,7 +68,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -451,7 +451,7 @@ Static Public Member Functions</h2></td></tr>
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -47,7 +47,7 @@ $(function() {
<p>This is the complete list of members for <a class="el" href="classCRL_1_1RoutingLayerGauge.html">CRL::RoutingLayerGauge</a>, including all inherited members.</p> <p>This is the complete list of members for <a class="el" href="classCRL_1_1RoutingLayerGauge.html">CRL::RoutingLayerGauge</a>, including all inherited members.</p>
<table class="directory"> <table class="directory">
<tr class="even"><td class="entry"><a class="el" href="classCRL_1_1RoutingLayerGauge.html#afe17db013bf6a933c2af4e847bfd7918">create</a>(const Layer *layer, Constant::Direction direction, Constant::LayerGaugeType type, unsigned int depth, double density, DbU::Unit offset, DbU::Unit pitch, DbU::Unit wireWidth, DbU::Unit viaWidth, DbU::Unit obsDw)</td><td class="entry"><a class="el" href="classCRL_1_1RoutingLayerGauge.html">CRL::RoutingLayerGauge</a></td><td class="entry"><span class="mlabel">static</span></td></tr> <tr class="even"><td class="entry"><a class="el" href="classCRL_1_1RoutingLayerGauge.html#afb41e7be2a6d258a691aacbe7a78154f">create</a>(const Layer *layer, Constant::Direction direction, Constant::LayerGaugeType type, unsigned int depth, double density, DbU::Unit offset, DbU::Unit pitch, DbU::Unit wireWidth, DbU::Unit pwireWidth, DbU::Unit viaWidth, DbU::Unit obsDw)</td><td class="entry"><a class="el" href="classCRL_1_1RoutingLayerGauge.html">CRL::RoutingLayerGauge</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
<tr><td class="entry"><a class="el" href="classCRL_1_1RoutingLayerGauge.html#a323c68a66f89908a1376d5464655efe3">destroy</a>()</td><td class="entry"><a class="el" href="classCRL_1_1RoutingLayerGauge.html">CRL::RoutingLayerGauge</a></td><td class="entry"><span class="mlabel">virtual</span></td></tr> <tr><td class="entry"><a class="el" href="classCRL_1_1RoutingLayerGauge.html#a323c68a66f89908a1376d5464655efe3">destroy</a>()</td><td class="entry"><a class="el" href="classCRL_1_1RoutingLayerGauge.html">CRL::RoutingLayerGauge</a></td><td class="entry"><span class="mlabel">virtual</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classCRL_1_1RoutingLayerGauge.html#ab8d5ae22c453605226b2695c2568c4f5">divide</a>(DbU::Unit dividend, long &amp;quotient, long &amp;modulo) const</td><td class="entry"><a class="el" href="classCRL_1_1RoutingLayerGauge.html">CRL::RoutingLayerGauge</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="classCRL_1_1RoutingLayerGauge.html#ab8d5ae22c453605226b2695c2568c4f5">divide</a>(DbU::Unit dividend, long &amp;quotient, long &amp;modulo) const</td><td class="entry"><a class="el" href="classCRL_1_1RoutingLayerGauge.html">CRL::RoutingLayerGauge</a></td><td class="entry"></td></tr>
<tr><td class="entry"><a class="el" href="classCRL_1_1RoutingLayerGauge.html#aa6c48e5acc6985997aa0417ef614f69d">getBlockageLayer</a>() const</td><td class="entry"><a class="el" href="classCRL_1_1RoutingLayerGauge.html">CRL::RoutingLayerGauge</a></td><td class="entry"><span class="mlabel">inline</span></td></tr> <tr><td class="entry"><a class="el" href="classCRL_1_1RoutingLayerGauge.html#aa6c48e5acc6985997aa0417ef614f69d">getBlockageLayer</a>() const</td><td class="entry"><a class="el" href="classCRL_1_1RoutingLayerGauge.html">CRL::RoutingLayerGauge</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
@ -70,7 +70,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -91,14 +91,14 @@ Public Member Functions</h2></td></tr>
</table><table class="memberdecls"> </table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr> Static Public Member Functions</h2></td></tr>
<tr class="memitem:afe17db013bf6a933c2af4e847bfd7918"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classCRL_1_1RoutingLayerGauge.html">RoutingLayerGauge</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCRL_1_1RoutingLayerGauge.html#afe17db013bf6a933c2af4e847bfd7918">create</a> (const <a class="elRef" doxygen="/dsk/l1/jpc/coriolis-2.x/src/coriolis/hurricane/doc/hurricane/html/hurricane.tag:../hurricane/" href="../hurricane/classHurricane_1_1Layer.html">Layer</a> *layer, <a class="el" href="namespaceConstant.html#ac081a99f2b64361919ed5d9f37c0f9af">Constant::Direction</a> direction, <a class="el" href="namespaceConstant.html#ab2e46a17cc373a268c5c24fa0e2067e5">Constant::LayerGaugeType</a> type, unsigned int depth, double density, <a class="elRef" doxygen="/dsk/l1/jpc/coriolis-2.x/src/coriolis/hurricane/doc/hurricane/html/hurricane.tag:../hurricane/" href="../hurricane/group__DbUGroup.html#ga4fbfa3e8c89347af76c9628ea06c4146">DbU::Unit</a> offset, <a class="elRef" doxygen="/dsk/l1/jpc/coriolis-2.x/src/coriolis/hurricane/doc/hurricane/html/hurricane.tag:../hurricane/" href="../hurricane/group__DbUGroup.html#ga4fbfa3e8c89347af76c9628ea06c4146">DbU::Unit</a> pitch, <a class="elRef" doxygen="/dsk/l1/jpc/coriolis-2.x/src/coriolis/hurricane/doc/hurricane/html/hurricane.tag:../hurricane/" href="../hurricane/group__DbUGroup.html#ga4fbfa3e8c89347af76c9628ea06c4146">DbU::Unit</a> wireWidth, <a class="elRef" doxygen="/dsk/l1/jpc/coriolis-2.x/src/coriolis/hurricane/doc/hurricane/html/hurricane.tag:../hurricane/" href="../hurricane/group__DbUGroup.html#ga4fbfa3e8c89347af76c9628ea06c4146">DbU::Unit</a> viaWidth, <a class="elRef" doxygen="/dsk/l1/jpc/coriolis-2.x/src/coriolis/hurricane/doc/hurricane/html/hurricane.tag:../hurricane/" href="../hurricane/group__DbUGroup.html#ga4fbfa3e8c89347af76c9628ea06c4146">DbU::Unit</a> obsDw)</td></tr> <tr class="memitem:afb41e7be2a6d258a691aacbe7a78154f"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classCRL_1_1RoutingLayerGauge.html">RoutingLayerGauge</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCRL_1_1RoutingLayerGauge.html#afb41e7be2a6d258a691aacbe7a78154f">create</a> (const <a class="elRef" doxygen="/dsk/l1/jpc/coriolis-2.x/src/coriolis/hurricane/doc/hurricane/html/hurricane.tag:../hurricane/" href="../hurricane/classHurricane_1_1Layer.html">Layer</a> *layer, <a class="el" href="namespaceConstant.html#ac081a99f2b64361919ed5d9f37c0f9af">Constant::Direction</a> direction, <a class="el" href="namespaceConstant.html#ab2e46a17cc373a268c5c24fa0e2067e5">Constant::LayerGaugeType</a> type, unsigned int depth, double density, <a class="elRef" doxygen="/dsk/l1/jpc/coriolis-2.x/src/coriolis/hurricane/doc/hurricane/html/hurricane.tag:../hurricane/" href="../hurricane/group__DbUGroup.html#ga4fbfa3e8c89347af76c9628ea06c4146">DbU::Unit</a> offset, <a class="elRef" doxygen="/dsk/l1/jpc/coriolis-2.x/src/coriolis/hurricane/doc/hurricane/html/hurricane.tag:../hurricane/" href="../hurricane/group__DbUGroup.html#ga4fbfa3e8c89347af76c9628ea06c4146">DbU::Unit</a> pitch, <a class="elRef" doxygen="/dsk/l1/jpc/coriolis-2.x/src/coriolis/hurricane/doc/hurricane/html/hurricane.tag:../hurricane/" href="../hurricane/group__DbUGroup.html#ga4fbfa3e8c89347af76c9628ea06c4146">DbU::Unit</a> wireWidth, <a class="elRef" doxygen="/dsk/l1/jpc/coriolis-2.x/src/coriolis/hurricane/doc/hurricane/html/hurricane.tag:../hurricane/" href="../hurricane/group__DbUGroup.html#ga4fbfa3e8c89347af76c9628ea06c4146">DbU::Unit</a> pwireWidth, <a class="elRef" doxygen="/dsk/l1/jpc/coriolis-2.x/src/coriolis/hurricane/doc/hurricane/html/hurricane.tag:../hurricane/" href="../hurricane/group__DbUGroup.html#ga4fbfa3e8c89347af76c9628ea06c4146">DbU::Unit</a> viaWidth, <a class="elRef" doxygen="/dsk/l1/jpc/coriolis-2.x/src/coriolis/hurricane/doc/hurricane/html/hurricane.tag:../hurricane/" href="../hurricane/group__DbUGroup.html#ga4fbfa3e8c89347af76c9628ea06c4146">DbU::Unit</a> obsDw)</td></tr>
<tr class="separator:afe17db013bf6a933c2af4e847bfd7918"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="separator:afb41e7be2a6d258a691aacbe7a78154f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table> </table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Gauge of a Layer for the detailed routing. </p> <div class="textblock"><p>Gauge of a Layer for the detailed routing. </p>
</div><h2 class="groupheader">Member Function Documentation</h2> </div><h2 class="groupheader">Member Function Documentation</h2>
<a id="afe17db013bf6a933c2af4e847bfd7918"></a> <a id="afb41e7be2a6d258a691aacbe7a78154f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afe17db013bf6a933c2af4e847bfd7918">&#9670;&nbsp;</a></span>create()</h2> <h2 class="memtitle"><span class="permalink"><a href="#afb41e7be2a6d258a691aacbe7a78154f">&#9670;&nbsp;</a></span>create()</h2>
<div class="memitem"> <div class="memitem">
<div class="memproto"> <div class="memproto">
@ -154,6 +154,12 @@ Static Public Member Functions</h2></td></tr>
<td class="paramtype"><a class="elRef" doxygen="/dsk/l1/jpc/coriolis-2.x/src/coriolis/hurricane/doc/hurricane/html/hurricane.tag:../hurricane/" href="../hurricane/group__DbUGroup.html#ga4fbfa3e8c89347af76c9628ea06c4146">DbU::Unit</a>&#160;</td> <td class="paramtype"><a class="elRef" doxygen="/dsk/l1/jpc/coriolis-2.x/src/coriolis/hurricane/doc/hurricane/html/hurricane.tag:../hurricane/" href="../hurricane/group__DbUGroup.html#ga4fbfa3e8c89347af76c9628ea06c4146">DbU::Unit</a>&#160;</td>
<td class="paramname"><em>wireWidth</em>, </td> <td class="paramname"><em>wireWidth</em>, </td>
</tr> </tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="elRef" doxygen="/dsk/l1/jpc/coriolis-2.x/src/coriolis/hurricane/doc/hurricane/html/hurricane.tag:../hurricane/" href="../hurricane/group__DbUGroup.html#ga4fbfa3e8c89347af76c9628ea06c4146">DbU::Unit</a>&#160;</td>
<td class="paramname"><em>pwireWidth</em>, </td>
</tr>
<tr> <tr>
<td class="paramkey"></td> <td class="paramkey"></td>
<td></td> <td></td>
@ -682,7 +688,7 @@ Static Public Member Functions</h2></td></tr>
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -64,7 +64,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -452,7 +452,7 @@ Static Public Member Functions</h2></td></tr>
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -56,7 +56,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -190,7 +190,7 @@ Public Member Functions</h2></td></tr>
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -64,7 +64,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -198,7 +198,7 @@ Static Public Member Functions</h2></td></tr>
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -73,7 +73,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -1218,8 +1218,8 @@
<type>static RoutingLayerGauge *</type> <type>static RoutingLayerGauge *</type>
<name>create</name> <name>create</name>
<anchorfile>classCRL_1_1RoutingLayerGauge.html</anchorfile> <anchorfile>classCRL_1_1RoutingLayerGauge.html</anchorfile>
<anchor>afe17db013bf6a933c2af4e847bfd7918</anchor> <anchor>afb41e7be2a6d258a691aacbe7a78154f</anchor>
<arglist>(const Layer *layer, Constant::Direction direction, Constant::LayerGaugeType type, unsigned int depth, double density, DbU::Unit offset, DbU::Unit pitch, DbU::Unit wireWidth, DbU::Unit viaWidth, DbU::Unit obsDw)</arglist> <arglist>(const Layer *layer, Constant::Direction direction, Constant::LayerGaugeType type, unsigned int depth, double density, DbU::Unit offset, DbU::Unit pitch, DbU::Unit wireWidth, DbU::Unit pwireWidth, DbU::Unit viaWidth, DbU::Unit obsDw)</arglist>
</member> </member>
</compound> </compound>
<compound kind="class"> <compound kind="class">

View File

@ -53,7 +53,7 @@ Directories</h2></td></tr>
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -49,7 +49,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -49,7 +49,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -61,7 +61,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -72,7 +72,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -54,7 +54,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -48,7 +48,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -51,7 +51,7 @@ $(function() {
<li>create() <li>create()
: <a class="el" href="classCRL_1_1AllianceFramework.html#a8cff32ced8cc163cadca885d8ed8a5fc">CRL::AllianceFramework</a> : <a class="el" href="classCRL_1_1AllianceFramework.html#a8cff32ced8cc163cadca885d8ed8a5fc">CRL::AllianceFramework</a>
, <a class="el" href="classCRL_1_1RoutingGauge.html#a7258273728f5db47e422d5914c1c36bd">CRL::RoutingGauge</a> , <a class="el" href="classCRL_1_1RoutingGauge.html#a7258273728f5db47e422d5914c1c36bd">CRL::RoutingGauge</a>
, <a class="el" href="classCRL_1_1RoutingLayerGauge.html#afe17db013bf6a933c2af4e847bfd7918">CRL::RoutingLayerGauge</a> , <a class="el" href="classCRL_1_1RoutingLayerGauge.html#afb41e7be2a6d258a691aacbe7a78154f">CRL::RoutingLayerGauge</a>
</li> </li>
<li>createCell() <li>createCell()
: <a class="el" href="classCRL_1_1AllianceFramework.html#ac4381ad0c3799d584ef3ea160846e2bb">CRL::AllianceFramework</a> : <a class="el" href="classCRL_1_1AllianceFramework.html#ac4381ad0c3799d584ef3ea160846e2bb">CRL::AllianceFramework</a>
@ -68,7 +68,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -61,7 +61,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -57,7 +57,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -55,7 +55,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -88,7 +88,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -51,7 +51,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -83,7 +83,7 @@ $(function() {
<li>create() <li>create()
: <a class="el" href="classCRL_1_1AllianceFramework.html#a8cff32ced8cc163cadca885d8ed8a5fc">CRL::AllianceFramework</a> : <a class="el" href="classCRL_1_1AllianceFramework.html#a8cff32ced8cc163cadca885d8ed8a5fc">CRL::AllianceFramework</a>
, <a class="el" href="classCRL_1_1RoutingGauge.html#a7258273728f5db47e422d5914c1c36bd">CRL::RoutingGauge</a> , <a class="el" href="classCRL_1_1RoutingGauge.html#a7258273728f5db47e422d5914c1c36bd">CRL::RoutingGauge</a>
, <a class="el" href="classCRL_1_1RoutingLayerGauge.html#afe17db013bf6a933c2af4e847bfd7918">CRL::RoutingLayerGauge</a> , <a class="el" href="classCRL_1_1RoutingLayerGauge.html#afb41e7be2a6d258a691aacbe7a78154f">CRL::RoutingLayerGauge</a>
</li> </li>
<li>createCell() <li>createCell()
: <a class="el" href="classCRL_1_1AllianceFramework.html#ac4381ad0c3799d584ef3ea160846e2bb">CRL::AllianceFramework</a> : <a class="el" href="classCRL_1_1AllianceFramework.html#ac4381ad0c3799d584ef3ea160846e2bb">CRL::AllianceFramework</a>
@ -579,7 +579,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -258,7 +258,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -54,7 +54,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -96,7 +96,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

View File

@ -63,7 +63,7 @@ $(function() {
<hr> <hr>
<table class="footer1"> <table class="footer1">
<tr> <tr>
<td class="LFooter"><small>Generated by doxygen 1.8.14 on Thu Nov 12 2020</small></td> <td class="LFooter"><small>Generated by doxygen 1.8.14 on Fri Oct 1 2021</small></td>
<td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td> <td class="RFooter"><a href='#pagetop'><small>Return to top of page</small></a></td>
</tr> </tr>
</table> </table>

Some files were not shown because too many files have changed in this diff Show More