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(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)
@ -18,10 +19,9 @@
setup_boost()
setup_qt()
find_package(PythonLibs 2 REQUIRED)
find_package(Python 3 REQUIRED COMPONENTS Interpreter Development)
find_package(PythonSitePackages REQUIRED)
find_package(FLUTE REQUIRED)
find_package(VLSISAPD REQUIRED)
find_package(HURRICANE REQUIRED)
find_package(CORIOLIS REQUIRED)
find_package(ETESIAN REQUIRED)

View File

@ -1109,12 +1109,17 @@ namespace Anabatic {
}
EtesianEngine* etesian = static_cast<EtesianEngine*>
( ToolEngine::get( getCell(), EtesianEngine::staticGetName() ));
DbU::Unit segmentMaxWL = etesian->getAntennaDiodeMaxWL() / 2;
if (not etesian->getDiodeCell()) {
cerr << Warning( "AnabaticEngine::antennaProtect(): No diode cell found, skipped." ) << endl;
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;
startMeasures();

View File

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

View File

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

View File

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

View File

@ -368,10 +368,13 @@ namespace Anabatic {
if (not finished) {
optimized = gcell->stepNetDesaturate( depth, globalNets, invalidateds );
gcell->setSatProcessed( depth );
if (optimized) {
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 "
<< Session::getRoutingGauge()->getRoutingLayer(depth)->getName() << endl;
GCellDensitySet queue ( depth, getGCells()) );
GCellDensitySet queue ( depth, getGCells() );
GCell::Set invalidateds;
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 ()"
DL_EXPORT(void) initAnabatic () {
cdebug_log(32,0) << "initAnabatic()" << endl;
PyMODINIT_FUNC PyInit_Anabatic ( void )
{
cdebug_log(32,0) << "PyInit_Anabatic()" << endl;
PyObject* module = Py_InitModule( "Anabatic", PyAnabatic_Methods );
PyObject* module = PyModule_Create( &PyAnabatic_ModuleDef );
if (module == NULL) {
cerr << "[ERROR]\n"
<< " Failed to initialize Anabatic module." << endl;
return;
return NULL;
}
PyObject* dictionnary = PyModule_GetDict(module);
@ -77,6 +92,8 @@ extern "C" {
LoadObjectConstant( dictionnary,EngineLayerAssignByTrunk ,"EngineLayerAssignByTrunk" );
LoadObjectConstant( dictionnary,EngineLayerAssignNoGlobalM2V,"EngineLayerAssignNoGlobalM2V" );
LoadObjectConstant( dictionnary,EngineNoNetLayerAssign ,"EngineNoNetLayerAssign" );
return module;
}

View File

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

View File

@ -3,14 +3,15 @@
set(CMAKE_LEGACY_CYGWIN_WIN32 0)
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)
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)
print_cmake_module_path()
@ -23,7 +24,7 @@
OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE)
install(DIRECTORY builder
DESTINATION ${PYTHON_SITE_PACKAGES} )
DESTINATION ${Python_CORIOLISLIB} )
install(FILES ccb.py
DESTINATION bin

View File

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

View File

@ -2,98 +2,88 @@
# -*- mode:Python -*-
#
# 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 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 |
# | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
# | E-mail : Jean-Paul.Chaput@lip6.fr |
# | =============================================================== |
# | Python : "./builder/AboutWidget.py" |
# +-----------------------------------------------------------------+
from PyQt4.QtCore import Qt
from PyQt4.QtGui import QPalette
from PyQt4.QtGui import QColor
from PyQt4.QtGui import QFont
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
from PyQt4.QtCore import Qt
from PyQt4.QtGui import QPalette, QColor, QFont, QWidget, \
QFrame, QLabel, QVBoxLayout, QAction, \
QKeySequence, QApplication
class AboutWidget ( QWidget ):
def __init__ ( self, parent=None ):
QWidget.__init__ ( self, parent )
self.setFixedSize( 500, 400 )
self.setStyleSheet( 'background-color: #ffffdd;' )
def __init__ ( self, parent=None ):
QWidget.__init__ ( self, parent )
self.setFixedSize( 500, 400 )
self.setStyleSheet( 'background-color: #ffffdd;' )
topLine = QFrame()
topLine.setFrameShape( QFrame.HLine )
topLine.setLineWidth ( 2 )
botLine = QFrame()
botLine.setFrameShape( QFrame.HLine )
botLine.setLineWidth ( 2 )
topLine = QFrame()
topLine.setFrameShape( QFrame.HLine )
topLine.setLineWidth ( 2 )
botLine = QFrame()
botLine.setFrameShape( QFrame.HLine )
botLine.setLineWidth ( 2 )
title = QLabel( 'CCB' )
title.setAlignment( Qt.AlignCenter )
font = title.font()
font.setPointSize( 72 )
font.setWeight ( QFont.Bold )
title.setFont( font )
title = QLabel( 'CCB' )
title.setAlignment( Qt.AlignCenter )
font = title.font()
font.setPointSize( 72 )
font.setWeight ( QFont.Bold )
title.setFont( font )
subTitle = QLabel( 'Coriolis & Chams Builder for the Dummies' )
subTitle.setAlignment( Qt.AlignCenter )
subTitle.setFont( QFont('Courier',10,QFont.Bold) )
authors = QLabel( 'Coriolis CAD System 1.0 . . . . . . . . ccb 1.0\n'
'Copyright (c) 2008-2016 . . . . . . . . . . UPMC\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) )
vLayout = QVBoxLayout()
vLayout.addStretch(10)
vLayout.addWidget( topLine )
vLayout.addWidget( title )
vLayout.addStretch(1)
vLayout.addWidget( subTitle )
vLayout.addWidget( authors )
vLayout.addStretch(1)
vLayout.addWidget( botLine )
vLayout.addStretch(10)
frame = QFrame()
frame.setFrameShape ( QFrame.Box )
frame.setFrameShadow( QFrame.Sunken )
frame.setLayout ( vLayout )
frame.setLineWidth ( 1 )
vLayout = QVBoxLayout()
vLayout.addWidget( frame )
subTitle = QLabel( 'Coriolis Toolchain Builder for the Dummies' )
subTitle.setAlignment( Qt.AlignCenter )
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) )
self.setLayout( vLayout )
self._exitAction = QAction( '&Exit', self )
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._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 )
vLayout = QVBoxLayout()
vLayout.addStretch(10)
vLayout.addWidget( topLine )
vLayout.addWidget( title )
vLayout.addStretch(1)
vLayout.addWidget( subTitle )
vLayout.addWidget( authors )
vLayout.addStretch(1)
vLayout.addWidget( botLine )
vLayout.addStretch(10)
return
frame = QFrame()
frame.setFrameShape ( QFrame.Box )
frame.setFrameShadow( QFrame.Sunken )
frame.setLayout ( vLayout )
frame.setLineWidth ( 1 )
vLayout = QVBoxLayout()
vLayout.addWidget( frame )
self.setLayout( vLayout )
self._exitAction = QAction( '&Exit', self )
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._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 -*-
#
# 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 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 |
# | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
# | E-mail : Jean-Paul.Chaput@lip6.fr |
# | =============================================================== |
# | Python : "./builder/Builder.py" |
# +-----------------------------------------------------------------+
@ -20,9 +20,9 @@ import os
import os.path
import datetime
import subprocess
from . import ErrorMessage
from Project import Project
from Configuration import Configuration
from . import ErrorMessage
from .Project import Project
from .Configuration import Configuration
class Builder:
@ -51,14 +51,11 @@ class Builder:
self._environment = os.environ
return
def __setattr__ ( self, attribute, value ):
if attribute[0] == "_":
self.__dict__[attribute] = value
return
if attribute in self._conf.getAllIds(): setattr( self._conf, attribute, value )
if attribute == "quiet": self._quiet = value
elif attribute == "rmBuild": self._rmBuild = value
elif attribute == "doBuild": self._doBuild = value
@ -84,18 +81,15 @@ class Builder:
elif attribute == "makeArguments": self._makeArguments = value.split ()
return
def __getattr__ ( self, attribute ):
if attribute[0] != "_":
if attribute == 'conf': return self._conf
if attribute in self._conf.getAllIds():
return getattr( self._conf, attribute )
if not self.__dict__.has_key(attribute):
if not attribute in self.__dict__:
raise ErrorMessage( 1, 'Builder has no attribute <%s>.'%attribute )
return self.__dict__[attribute]
def _guessGitHash ( self, project ):
self.gitHash = 'x'
os.chdir ( self.sourceDir+'/'+project.getName() )
@ -103,58 +97,48 @@ class Builder:
self.gitHash = subprocess.Popen ( command, stdout=subprocess.PIPE ).stdout.readlines()[0]
return
def _configure ( self, fileIn, fileOut ):
fdFileIn = open ( fileIn , "r" )
fdFileOut = open ( fileOut, "w" )
for line in fdFileIn.readlines():
stable = False
substituted0 = line
while not stable:
substituted1 = re.sub ( r"@revdate@" , self.revDate, substituted0 )
substituted1 = re.sub ( r"@githash@" , self.gitHash, substituted1 )
substituted1 = re.sub ( r"@coriolisTop@", "/usr" , substituted1 )
if substituted0 == substituted1: stable = True
else: substituted0 = substituted1
fdFileOut.write ( substituted0 )
fdFileIn.close ()
fdFileOut.close ()
return
def _doSpec ( self ):
self._configure ( self.specFileIn, self.specFile )
return
def _doDebChangelog ( self ):
self._configure ( self.debChangelogIn, self.debChangelog )
return
def _execute ( self, command, error ):
collections = []
if self._devtoolset:
collections.append( 'devtoolset-%d' % self._devtoolset )
print 'Using devtoolset-%(v)d (scl enable devtoolset-%(v)d ...)' % {'v':self._devtoolset}
collections.append( 'devtoolset-{}'.format(self._devtoolset) )
print( 'Using devtoolset-{0} (scl enable devtoolset-{0} ...)'.format(self._devtoolset) )
if self._llvmtoolset:
collections.append( 'llvm-toolset-%d' % self._llvmtoolset )
print 'Using llvm-toolset-%(v)d (scl enable llvm-toolset-%(v)d ...)' % {'v':self._llvmtoolset}
collections.append( 'llvm-toolset-{}'.format(self._llvmtoolset) )
print( 'Using llvm-toolset-{0} (scl enable llvm-toolset-{v} ...)'.format(self._llvmtoolset) )
if collections:
commandAsString = ''
for i in range(len(command)):
if i: commandAsString += ' '
if ' ' in command[i]: commandAsString += '"'+command[i]+'"'
else: commandAsString += command[i]
command = [ 'scl', 'enable' ]
command += collections
command.append( commandAsString )
commandAsString = ''
for i in range(len(command)):
if i: commandAsString += ' '
if ' ' in command[i]: commandAsString += '"'+command[i]+'"'
else: commandAsString += command[i]
command = [ 'scl', 'enable' ]
command += collections
command.append( commandAsString )
sys.stdout.flush ()
sys.stderr.flush ()
child = subprocess.Popen ( command, env=self._environment, stdout=None )
@ -164,28 +148,26 @@ class Builder:
ErrorMessage( status, "%s (status:%d)."%(error,status) ).terminate()
return
def _enableTool ( self, tool ):
return
def _build ( self, tool ):
toolSourceDir = os.path.join ( self.sourceDir, tool.getToolDir() )
toolBuildDir = os.path.join ( self.buildDir , tool.name )
cmakeInstallDir = os.path.join ( self.installDir, "share", "cmake", "Modules" )
# Supplied directly in the CMakeLists.txt.
#cmakeModules = os.path.join ( self.installDir, "share", "cmake", "Modules" )
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
if self._rmBuild:
print "Removing tool build directory: \"%s\"." % toolBuildDir
print( 'Removing tool build directory: "{}".'.format(toolBuildDir) )
command = [ "/bin/rm", "-rf", toolBuildDir ]
self._execute ( command, "Removing tool build directory" )
command = [ 'cmake' ]
if self.libSuffix: command += [ "-D", "LIB_SUFFIX:STRING=%s" % self.libSuffix ]
if self._ninja: command += [ "-G", "Ninja" ]
if self._macports: command += [ "-D", "WITH_MACPORTS: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._qt5: command += [ "-D", "WITH_QT5:STRING=TRUE" ]
if self._openmp: command += [ "-D", "WITH_OPENMP:STRING=TRUE" ]
command += [ "-D", "CMAKE_BUILD_TYPE:STRING=%s" % self.buildMode
#, "-D", "BUILD_SHARED_LIBS:STRING=%s" % self.enableShared
, "-D", "CMAKE_INSTALL_PREFIX:STRING=%s" % self.installDir
@ -203,13 +184,12 @@ class Builder:
#, "-D", "CMAKE_MODULE_PATH:STRING=%s" % cmakeModules
#, "-D", "Boost_DEBUG:STRING=TRUE"
, toolSourceDir ]
if not os.path.isdir(toolBuildDir):
print "Creating tool build directory: \"%s\"." % toolBuildDir
print( 'Creating tool build directory: "{}".'.format(toolBuildDir) )
os.makedirs ( toolBuildDir )
os.chdir ( toolBuildDir )
self._execute ( command, "First CMake failed" )
os.chdir ( toolBuildDir )
if self._noCache:
cmakeCache = os.path.join(toolBuildDir,"CMakeCache.txt")
@ -226,22 +206,19 @@ class Builder:
command += [ toolSourceDir ]
self._execute ( command, "Second CMake failed" )
if self._doBuild:
command = [ "make" ]
if self._ninja:
command = [ "ninja-build" ]
#command += [ "DESTDIR=%s" % self.installDir ]
command += self._makeArguments
print "Make/Ninja command:", command
print( "Make/Ninja command:", command )
sys.stdout.flush ()
self._execute ( command, "Build failed" )
return
def gitArchive ( self, projectName ):
rawArchive = self.tarballDir+'/'+projectName+'.tar'
os.chdir ( self.sourceDir+'/'+projectName )
command = [ 'git'
, 'archive'
@ -250,11 +227,10 @@ class Builder:
, 'devel'
]
self._execute ( command, "git archive of project %s" % projectName )
if not os.path.isdir ( self.archiveDir ):
os.mkdir ( self.archiveDir )
os.chdir ( self.archiveDir )
command = [ 'tar', 'xf', rawArchive ]
self._execute ( command, "unpacking raw archive %s" % rawArchive )
@ -265,7 +241,7 @@ class Builder:
command = [ "/bin/ln", "-s", "./coriolis/bootstrap/Makefile.package"
, self.archiveDir+"/Makefile" ]
self._execute ( command, "link of %s failed" % "coriolis/boostrap/Makefile.package")
command = [ "/bin/ln", "-s", "./coriolis/bootstrap/debian", self.archiveDir ]
self._execute ( command, "Copying Debian/Ubuntu package control files" )
@ -284,32 +260,27 @@ class Builder:
# , "--no-backup-if-mismatch"
# , "-p0", "-i", self.distribPatch ]
# self._execute ( command, "patch for distribution command failed" )
absSourceTarBz2 = '%s/%s' % (self.tarballDir,self.sourceTarBz2)
os.chdir ( self.tarballDir )
command = [ 'tar', 'jcf', absSourceTarBz2, os.path.basename(self.archiveDir) ]
self._execute ( command, "Creating composite archive %s" % absSourceTarBz2 )
return
def _setEnvironment ( self, systemVariable, userVariable ):
if not self._environment.has_key(systemVariable) or self._environment[systemVariable] == "":
if not self._environment.has_key(userVariable) or self._environment[userVariable] == "" :
if not systemVariable in self._environment or self._environment[systemVariable] == "":
if not userVariable in self._environment or self._environment[userVariable] == "" :
self._environment[ systemVariable ] = self.installDir
print "[WARNING] Neither <%s> nor <%s> environment variables are sets." \
% (systemVariable,userVariable)
print " Setting <%s> to <%s>." % (systemVariable,self.installDir)
print( '[WARNING] Neither "{0}" nor "{1}" environment variables are sets.' \
.format(systemVariable,userVariable) )
print( ' Setting "{0}" to "{1}".'.format(systemVariable,self.installDir) )
else:
self._environment[ systemVariable ] = self._environment[ userVariable ]
if not self._quiet:
print "Setting <%s> to <%s>." % (systemVariable,self._environment[systemVariable])
if self._environment.has_key(userVariable):
print "Transmitting <%s> as <%s>." % (userVariable,self._environment[userVariable])
print( 'Setting "{0}" to "{1}".'.format(systemVariable,self._environment[systemVariable]) )
if userVariable in self._environment:
print( 'Transmitting "{0}" as "{1}".'.format(userVariable,self._environment[userVariable]) )
return
def _commandTemplate ( self, tools, projects, command ):
if self._clang:
self._environment[ 'CC' ] = 'clang'
@ -320,87 +291,70 @@ class Builder:
if self._macports:
self._environment[ 'BOOST_INCLUDEDIR' ] = '/opt/local/include'
self._environment[ 'BOOST_LIBRARYDIR' ] = '/opt/local/lib'
# Set or guess the various projects TOP environment variables.
for project in self.projects:
topVariable = "%s_TOP" % project.getName().upper()
topUserVariable = "%s_USER_TOP" % project.getName().upper()
self._setEnvironment ( topVariable, topUserVariable )
if tools:
# Checks if the requested tools are in the various projects.
self.standalones = tools
for project in self.projects:
self.standalones = project.activate ( 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:
for projectName in projects:
project = self.getProject ( projectName )
if not project:
ErrorMessage( 1, "No project of name \"%s\"."%projectName ).terminate()
project.activateAll()
if not tools and not projects:
for project in self.projects:
project.activateAll ()
for project in self.projects:
for tool in project.getActives():
print "\nProcessing tool: \"%s\"." % tool.name
print( '\nProcessing tool: "{}".'.format(tool.name) )
getattr(self,command) ( tool )
return
def enable ( self, tools, projects ):
self._commandTemplate ( tools, projects, "_enableTool" )
return
def enabledTools ( self ):
tools = []
for project in self.projects:
tools += project.getActives()
return tools
def build ( self, tools, projects ):
self._commandTemplate ( tools, projects, "_build" )
return
def gitTarball ( self, tools, projects ):
if self.gitHash == "x":
self._guessGitHash ( self.getProject(projects[0]) )
self._doSpec ()
# self._doDebChangelog ()
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 ]
self._execute ( command, "Removing top export (tarball) directory" )
print "Creating tarball directory: \"%s\"." % self.tarballDir
print( 'Creating tarball directory: "{}".'.format(self.tarballDir) )
os.makedirs ( self.tarballDir )
self.gitArchive ( projects[0] )
return
def userTarball ( self, tools, projects ):
self.enable( tools, projects )
userSourceTarBz2 = os.path.join ( self.tarballDir
, datetime.date.today().strftime('%s-%s-%%Y%%m%%d.tar.bz2'%
(self.packageName
,self.packageVersion)) )
excludes = []
for exclude in self.packageExcludes:
excludes += [ '--exclude='+exclude ]
os.chdir ( self.sourceDir )
command = [ "/bin/tar"
, "--exclude-backups"
@ -410,40 +364,34 @@ class Builder:
+ [ "-jcvf", userSourceTarBz2 ] \
+ self.enabledTools()
self._execute ( command, "tar command failed" )
return
def doRpm ( self ):
self.gitTarball ( [], self.packageProjects )
for rpmDir in [ "SOURCES", "SPECS", "BUILD", "tmp"
, "SRPMS", "RPMS/i386", "RPMS/i686", "RPMS/x86_64" ]:
rpmFullDir = os.path.join ( self.rpmbuildDir, rpmDir )
if not os.path.isdir(rpmFullDir):
os.makedirs ( rpmFullDir )
else:
for entry in os.listdir(rpmFullDir):
path = os.path.join( rpmFullDir, entry )
if os.path.islink(path):
realpath = os.path.realpath( os.readlink(path) )
if not os.path.isfile(realpath):
print 'Remove obsolete link: <%s>.' % path
os.unlink( path )
rpmFullDir = os.path.join ( self.rpmbuildDir, rpmDir )
if not os.path.isdir(rpmFullDir):
os.makedirs ( rpmFullDir )
else:
for entry in os.listdir(rpmFullDir):
path = os.path.join( rpmFullDir, entry )
if os.path.islink(path):
realpath = os.path.realpath( os.readlink(path) )
if not os.path.isfile(realpath):
print( 'Remove obsolete link: "{}".'.format(path) )
os.unlink( path )
rpmSpecFile = os.path.join ( self.rpmbuildDir, "SPECS" , "coriolis2.spec" )
rpmSourceFile = os.path.join ( self.rpmbuildDir, "SOURCES", self.sourceTarBz2 )
sourceFile = os.path.join ( self.tarballDir , self.sourceTarBz2 )
if os.path.isfile ( rpmSpecFile ):
os.unlink ( rpmSpecFile )
os.symlink ( self.specFile, rpmSpecFile )
if not os.path.islink ( rpmSourceFile ):
os.symlink ( sourceFile, rpmSourceFile )
os.chdir ( self.rpmbuildDir )
command = [ "/usr/bin/rpmbuild"
, "--define", "_topdir %s" % self.rpmbuildDir
, "--define", "_tmppath %s" % self.tmppathDir
@ -452,18 +400,13 @@ class Builder:
if self._devtoolset:
command += [ "--define", "scl devtoolset-%d"%self._devtoolset ]
command += [ "-ba", "--clean", rpmSpecFile ]
self._execute ( command, "Rebuild rpm packages" )
return
def doDeb ( self ):
self.svnTarball ( [], self.packageProjects )
if not os.path.isdir(self.debbuildDir):
os.makedirs ( self.debbuildDir )
os.chdir ( self.debbuildDir )
sourceFile = os.path.join ( self.tarballDir , self.sourceTarBz2 )
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 )
os.chdir ( packageDir )
self._environment["CFLAGS" ] = "-O2"
self._environment["CXXFLAGS"] = "-O2"
command = [ "/usr/bin/debuild", "-us", "-uc" ]
self._execute ( command, "Rebuild Debian packages" )
return
def getProject ( self, name ): return self._conf.getProject(name)
def loadConfiguration ( self, confFile ): self._conf.load( confFile )
def showConfiguration ( self ): self._conf.show()

View File

@ -2,75 +2,72 @@
# -*- mode:Python -*-
#
# 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 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 |
# | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
# | E-mail : Jean-Paul.Chaput@lip6.fr |
# | =============================================================== |
# | Python : "./builder/BuilderGui.py" |
# +-----------------------------------------------------------------+
from PyQt4.QtGui import QTabWidget
from PyQt4.QtGui import QApplication
from PyQt4.QtGui import QMainWindow
from PyQt4.QtGui import QAction
from PyQt4.QtGui import QKeySequence
from OptionsWidget import OptionsWidget
from CompileWidget import CompileWidget
from ConfigureWidget import ConfigureWidget
from AboutWidget import AboutWidget
from PyQt4.QtGui import QTabWidget, QApplication, QMainWindow, \
QAction , QKeySequence
from .OptionsWidget import OptionsWidget
from .CompileWidget import CompileWidget
from .ConfigureWidget import ConfigureWidget
from .AboutWidget import AboutWidget
class BuilderGui ( QMainWindow ):
def __init__ ( self, confFile, parent=None ):
QMainWindow.__init__( self, parent )
self.setWindowTitle( 'Coriolis/Chams Builder' )
self._tabWidget = QTabWidget()
self._configureWidget = ConfigureWidget(confFile)
self._optionsWidget = OptionsWidget(self._configureWidget.conf)
self._compileWidget = CompileWidget()
self._aboutWidget = AboutWidget()
self._tabWidget.addTab( self._optionsWidget , 'Options' )
self._tabWidget.addTab( self._compileWidget , 'Compile' )
self._tabWidget.addTab( self._configureWidget, 'Configure' )
self.setCentralWidget( self._tabWidget )
self._compileWidget.conf = self._configureWidget
self._compileWidget.options = self._optionsWidget
self._exitAction = QAction( '&Exit', self )
self._exitAction.setStatusTip( 'Exit CCB (settings are saved)' )
self._exitAction.setShortcut ( QKeySequence('CTRL+Q') )
self._exitAction.triggered.connect( QApplication.closeAllWindows )
self._saveAction = QAction( '&Save Settings', self )
self._saveAction.setStatusTip( 'Save Settings' )
self._saveAction.setShortcut ( QKeySequence('CTRL+S') )
self._saveAction.triggered.connect( self._configureWidget.saveSettings )
self._saveAction.triggered.connect( self._optionsWidget.saveSettings )
self._saveAction.triggered.connect( self._compileWidget.saveSettings )
self._aboutAction = QAction( '&About', self )
self._aboutAction.setStatusTip( 'A Word About Who\'s Responsible for This Thing' )
self._aboutAction.setShortcut ( QKeySequence('CTRL+A') )
self._aboutAction.triggered.connect( self._aboutWidget.show )
fileMenu = self.menuBar().addMenu( 'File' )
fileMenu.addAction( self._exitAction )
fileMenu.addAction( self._saveAction )
fileMenu.addAction( self._aboutAction )
return
def closeEvent ( self, event ):
self._configureWidget.saveSettings()
self._optionsWidget .saveSettings()
self._compileWidget .saveSettings()
event.accept()
return
def __init__ ( self, confFile, parent=None ):
QMainWindow.__init__( self, parent )
self.setWindowTitle( 'Coriolis Toolchain Builder' )
self._tabWidget = QTabWidget()
self._configureWidget = ConfigureWidget(confFile)
self._optionsWidget = OptionsWidget(self._configureWidget.conf)
self._compileWidget = CompileWidget()
self._aboutWidget = AboutWidget()
self._tabWidget.addTab( self._optionsWidget , 'Options' )
self._tabWidget.addTab( self._compileWidget , 'Compile' )
self._tabWidget.addTab( self._configureWidget, 'Configure' )
self.setCentralWidget( self._tabWidget )
self._compileWidget.conf = self._configureWidget
self._compileWidget.options = self._optionsWidget
self._exitAction = QAction( '&Exit', self )
self._exitAction.setStatusTip( 'Exit CCB (settings are saved)' )
self._exitAction.setShortcut ( QKeySequence('CTRL+Q') )
self._exitAction.triggered.connect( QApplication.closeAllWindows )
self._saveAction = QAction( '&Save Settings', self )
self._saveAction.setStatusTip( 'Save Settings' )
self._saveAction.setShortcut ( QKeySequence('CTRL+S') )
self._saveAction.triggered.connect( self._configureWidget.saveSettings )
self._saveAction.triggered.connect( self._optionsWidget.saveSettings )
self._saveAction.triggered.connect( self._compileWidget.saveSettings )
self._aboutAction = QAction( '&About', self )
self._aboutAction.setStatusTip( 'A Word About Who\'s Responsible for This Thing' )
self._aboutAction.setShortcut ( QKeySequence('CTRL+A') )
self._aboutAction.triggered.connect( self._aboutWidget.show )
fileMenu = self.menuBar().addMenu( 'File' )
fileMenu.addAction( self._exitAction )
fileMenu.addAction( self._saveAction )
fileMenu.addAction( self._aboutAction )
return
def closeEvent ( self, event ):
self._configureWidget.saveSettings()
self._optionsWidget .saveSettings()
self._compileWidget .saveSettings()
event.accept()
return

View File

@ -2,11 +2,11 @@
# -*- mode:Python -*-
#
# 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 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 |
# | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
@ -17,195 +17,166 @@
import re
import subprocess
from PyQt4.QtCore import Qt
from PyQt4.QtCore import pyqtSignal
from PyQt4.QtCore import QSettings
from PyQt4.QtGui import QFont
from PyQt4.QtGui import QColor
from PyQt4.QtGui import QPalette
from PyQt4.QtGui import QTextCharFormat
from PyQt4.QtGui import QWidget
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
from PyQt4.QtCore import Qt, pyqtSignal, QSettings
from PyQt4.QtGui import QFont, QColor, QPalette, QTextCharFormat, \
QWidget, QLabel, QPushButton, QCheckBox, \
QGroupBox, QButtonGroup, QVBoxLayout, \
QHBoxLayout, QGridLayout, QScrollArea, \
QComboBox, QLineEdit, QTextEdit, \
QFileDialog, QProgressBar, QApplication
from .Highlighter import Highlighter
class CompileWidget ( QWidget ):
progress = pyqtSignal(int)
def __init__ ( self, parent=None ):
QWidget.__init__ ( self, parent )
self._options = None
self._conf = None
self._go = QPushButton( 'Go' )
self._go.setMaximumWidth( 100 )
font = self._go.font()
font.setPointSizeF( font.pointSizeF()*2.0 )
font.setWeight ( QFont.Bold )
self._go.setFont( font )
self._go.clicked.connect( self.go )
self._saveLog = QPushButton( 'Save' )
saveLogLabel = QLabel( 'Log File:' )
saveLogBrowse = QPushButton( '&Browse' )
saveLogBrowse.clicked.connect( self.browseSaveLog )
self._saveLogEdit = QLineEdit( '' )
gLayout = QGridLayout()
gLayout.addWidget( saveLogLabel , 0, 0, 1, 1, Qt.AlignRight )
gLayout.addWidget( self._saveLogEdit, 0, 1, 1, 6 )
gLayout.addWidget( saveLogBrowse , 0, 7, 1, 1 )
self._console = QTextEdit()
self._console.setLineWrapMode( QTextEdit.NoWrap )
self._console.setMinimumSize ( 800, 400 )
palette = self._console.palette()
palette.setColor( QPalette.Base, QColor.fromRgb(255,255,221) ) # ffffdd.
self._console.setPalette( palette )
font = QFont( 'Bitstream Vera Sans Mono', self._console.font().pointSize() )
self._console.setFont( font )
self._highlighter = Highlighter( self._console.document() )
self._progressBar = QProgressBar()
self._progressBar.setRange ( 0, 100 )
self._progressBar.setTextVisible( True )
hLayout = QHBoxLayout()
hLayout.addStretch()
hLayout.addWidget( self._go )
hLayout.addStretch()
hLayout.addWidget( self._saveLog )
hLayout.addStretch()
vLayout = QVBoxLayout()
vLayout.addLayout( hLayout )
vLayout.addLayout( gLayout )
vLayout.addWidget( self._progressBar )
vLayout.addWidget( self._console )
self.setLayout( vLayout )
self.progress.connect( self._progressBar.setValue )
self._saveLog.clicked.connect( self.saveLog )
self.readSettings()
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
options = property( _getOptions, _setOptions )
conf = property( _getConf , _setConf )
def browseSaveLog ( self ):
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 shellCommand ( self ):
command = [ self.conf.bootstrapDir+'/ccb.py' ]
for project in self.options.projects:
for tool in project.actives:
command += [ '--tool='+tool ]
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 ]
progress = pyqtSignal(int)
def __init__ ( self, parent=None ):
QWidget.__init__ ( self, parent )
self._options = None
self._conf = None
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
self._go = QPushButton( 'Go' )
self._go.setMaximumWidth( 100 )
font = self._go.font()
font.setPointSizeF( font.pointSizeF()*2.0 )
font.setWeight ( QFont.Bold )
self._go.setFont( font )
self._go.clicked.connect( self.go )
self._saveLog = QPushButton( 'Save' )
saveLogLabel = QLabel( 'Log File:' )
saveLogBrowse = QPushButton( '&Browse' )
saveLogBrowse.clicked.connect( self.browseSaveLog )
self._saveLogEdit = QLineEdit( '' )
gLayout = QGridLayout()
gLayout.addWidget( saveLogLabel , 0, 0, 1, 1, Qt.AlignRight )
gLayout.addWidget( self._saveLogEdit, 0, 1, 1, 6 )
gLayout.addWidget( saveLogBrowse , 0, 7, 1, 1 )
self._console = QTextEdit()
self._console.setLineWrapMode( QTextEdit.NoWrap )
self._console.setMinimumSize ( 800, 400 )
palette = self._console.palette()
palette.setColor( QPalette.Base, QColor.fromRgb(255,255,221) ) # ffffdd.
self._console.setPalette( palette )
font = QFont( 'Bitstream Vera Sans Mono', self._console.font().pointSize() )
self._console.setFont( font )
self._highlighter = Highlighter( self._console.document() )
self._progressBar = QProgressBar()
self._progressBar.setRange ( 0, 100 )
self._progressBar.setTextVisible( True )
hLayout = QHBoxLayout()
hLayout.addStretch()
hLayout.addWidget( self._go )
hLayout.addStretch()
hLayout.addWidget( self._saveLog )
hLayout.addStretch()
vLayout = QVBoxLayout()
vLayout.addLayout( hLayout )
vLayout.addLayout( gLayout )
vLayout.addWidget( self._progressBar )
vLayout.addWidget( self._console )
self.setLayout( vLayout )
self.progress.connect( self._progressBar.setValue )
self._saveLog.clicked.connect( self.saveLog )
self.readSettings()
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
options = property( _getOptions, _setOptions )
conf = property( _getConf , _setConf )
def browseSaveLog ( self ):
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 shellCommand ( self ):
command = [ self.conf.bootstrapDir+'/ccb.py' ]
for project in self.options.projects:
for tool in project.actives:
command += [ '--tool='+tool ]
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 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') )
return
def saveSettings ( self ):
settings = QSettings()
settings.setValue( 'compile/saveLog', self._saveLogEdit.text() )
return

View File

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

View File

@ -2,45 +2,32 @@
# -*- mode:Python -*-
#
# 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 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 |
# | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
# | E-mail : Jean-Paul.Chaput@lip6.fr |
# | =============================================================== |
# | Python : "./builder/ConfigureWidget.py" |
# +-----------------------------------------------------------------+
from PyQt4.QtCore import Qt
from PyQt4.QtCore import QVariant
from PyQt4.QtCore import pyqtSignal
from PyQt4.QtCore import QSettings
from PyQt4.QtGui import QFont
from PyQt4.QtGui import QWidget
from PyQt4.QtGui import QGridLayout
from PyQt4.QtGui import QHBoxLayout
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
from PyQt4.QtCore import Qt, QVariant, pyqtSignal, QSettings, \
QModelIndex, QAbstractTableModel
from PyQt4.QtGui import QFont, QWidget, QGridLayout, QHBoxLayout, \
QVBoxLayout, QLabel, QPushButton, \
QLineEdit, QAbstractItemView, QHeaderView, \
QTableView, QGroupBox, QFileDialog, \
QApplication
from .Configuration import Configuration
class ConfSettingsModel ( QAbstractTableModel ):
HeaderFont = QApplication.font()
HeaderFont = QApplication.font()
PrimaryFont = QFont('Courier',HeaderFont.pointSize()-2,QFont.Normal)
SecondaryFont = QFont('Courier',HeaderFont.pointSize()-2,QFont.Normal)
ValueFont = QFont('Courier',HeaderFont.pointSize()-2,QFont.Bold)
@ -48,7 +35,6 @@ class ConfSettingsModel ( QAbstractTableModel ):
def __init__ ( self, conf, parent=None ):
ConfSettingsModel.HeaderFont.setBold( True )
ConfSettingsModel.SecondaryFont.setItalic( True )
QAbstractTableModel.__init__( self, parent )
self._conf = conf
self._ids = self._conf.getAllIds()
@ -70,20 +56,15 @@ class ConfSettingsModel ( QAbstractTableModel ):
if row < self.rowCount():
if index.column() == 0: return self._ids[row]
elif index.column() == 1: return getattr( self._conf, self._ids[row] )
return QVariant()
return None
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.DisplayRole: return QVariant()
if role != Qt.DisplayRole: return None
if section == 0: return 'Setting'
elif section == 1: return 'Value'
return QVariant('?')
return '?'
def rowCount ( self, index=QModelIndex() ): return len(self._ids)
def columnCount ( self, index=QModelIndex() ): return 2
@ -119,79 +100,73 @@ class ConfSettingsWidget ( QWidget ):
peanoDataLayout = QGridLayout();
peanoDataLayout.addWidget( self._view, 0, 0, 1, 1 );
self.setLayout ( peanoDataLayout );
return
class ConfigureWidget ( QWidget ):
def __init__ ( self, confFile, parent=None ):
QWidget.__init__ ( self, parent )
self._confFile = confFile
self._conf = Configuration()
self._rootDir = ''
rootDirLabel = QLabel( 'Root Directory' )
rootDirBrowse = QPushButton( '&Browse' )
rootDirBrowse.clicked.connect( self.browseRootDir )
self._rootDirEdit = QLineEdit( '' )
#self._rootDirEdit.setFixedWidth( 600 )
gLayout = QGridLayout()
gLayout.addWidget( rootDirLabel , 0, 0, 1, 1 )
gLayout.addWidget( self._rootDirEdit, 0, 1, 1, 6 )
gLayout.addWidget( rootDirBrowse , 0, 7, 1, 1 )
groupDirs = QGroupBox( 'Directories' )
groupDirs.setLayout( gLayout )
gLayout = QGridLayout()
groupConf = QGroupBox( 'Configuration' )
groupConf.setLayout( gLayout )
vLayout = QVBoxLayout()
vLayout.addWidget ( groupDirs )
vLayout.addWidget ( groupConf )
#vLayout.addStretch()
self.setLayout( vLayout )
self._rootDirEdit.textChanged.connect( self.rootDirChanged )
self.readSettings()
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 )
def _getConf ( self ): return self._conf
def _getRootDir ( self ): return self._rootDir
def _getBootstrapDir ( self ): return self._getConf().bootstrapDir
conf = property( _getConf )
rootDir = property( _getRootDir )
bootstrapDir = property( _getBootstrapDir )
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
def __init__ ( self, confFile, parent=None ):
QWidget.__init__ ( self, parent )
self._confFile = confFile
self._conf = Configuration()
self._rootDir = ''
rootDirLabel = QLabel( 'Root Directory' )
rootDirBrowse = QPushButton( '&Browse' )
rootDirBrowse.clicked.connect( self.browseRootDir )
self._rootDirEdit = QLineEdit( '' )
#self._rootDirEdit.setFixedWidth( 600 )
gLayout = QGridLayout()
gLayout.addWidget( rootDirLabel , 0, 0, 1, 1 )
gLayout.addWidget( self._rootDirEdit, 0, 1, 1, 6 )
gLayout.addWidget( rootDirBrowse , 0, 7, 1, 1 )
groupDirs = QGroupBox( 'Directories' )
groupDirs.setLayout( gLayout )
gLayout = QGridLayout()
groupConf = QGroupBox( 'Configuration' )
groupConf.setLayout( gLayout )
vLayout = QVBoxLayout()
vLayout.addWidget ( groupDirs )
vLayout.addWidget ( groupConf )
#vLayout.addStretch()
self.setLayout( vLayout )
self._rootDirEdit.textChanged.connect( self.rootDirChanged )
self.readSettings()
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 )
def _getConf ( self ): return self._conf
def _getRootDir ( self ): return self._rootDir
def _getBootstrapDir ( self ): return self._getConf().bootstrapDir
conf = property( _getConf )
rootDir = property( _getRootDir )
bootstrapDir = property( _getBootstrapDir )
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') )
if not self._confFile and settings.value('conf/confFile'):
self._confFile = str( settings.value('conf/confFile') )
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 -*-
#
# 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 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 |
# | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
# | E-mail : Jean-Paul.Chaput@lip6.fr |
# | =============================================================== |
# | Python : "./builder/Highlighter.py" |
# +-----------------------------------------------------------------+
@ -17,64 +17,61 @@
import re
from PyQt4.QtCore import Qt
from PyQt4.QtGui import QFont
from PyQt4.QtGui import QColor
from PyQt4.QtGui import QTextCharFormat
from PyQt4.QtGui import QSyntaxHighlighter
from PyQt4.QtGui import QFont, QColor, QTextCharFormat, QSyntaxHighlighter
class Highlighter ( QSyntaxHighlighter ):
Normal = 0x0001
Bold = 0x0002
Italic = 0x0004
ttyBackground = QColor.fromRgb( 255, 255, 221 ) # #ffffdd
ttyBlack = QColor.fromRgb( 46, 52, 54 ) # #2e3436
ttyRed = QColor.fromRgb( 204, 0, 0 ) # #cc0000
ttyGreen = QColor.fromRgb( 78, 154, 6 ) # #4e9a06
ttyYellow = QColor.fromRgb( 196, 160, 0 ) # #c4a000
ttyBlue = QColor.fromRgb( 52, 101, 164 ) # #3465a4
ttyViolet = QColor.fromRgb( 117, 80, 123 ) # #75507b
ttyCyan = QColor.fromRgb( 6, 152, 154 ) # #06989a
ttyGrey = QColor.fromRgb( 211, 215, 207 ) # #d3d7cf
ttyLightBlack = QColor.fromRgb( 85, 87, 83 ) # #555753
ttyLightRed = QColor.fromRgb( 239, 41, 41 ) # #ef2929
ttyLightGreen = QColor.fromRgb( 138, 226, 52 ) # #8ae234
ttyLightYellow = QColor.fromRgb( 252, 233, 79 ) # #fce94f
ttyLightBlue = QColor.fromRgb( 114, 159, 207 ) # #729fcf
ttyLightViolet = QColor.fromRgb( 173, 127, 168 ) # #ad7fa8
ttyLightCyan = QColor.fromRgb( 52, 226, 226 ) # #34e2e2
ttyLightGrey = QColor.fromRgb( 238, 238, 236 ) # #eeeeec
Rules = [ [ttyLightViolet, Bold , re.compile(r'^Scanning.*'), None]
, [ttyLightRed , Bold , re.compile(r'^Linking.*'), 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]
, [ttyLightBlue , Normal , re.compile(r'^\[(?P<percent>\s*\d+)%\]\s*(?P<message>Generating.*moc_.*)'), None]
, [ttyLightBlue , Bold , re.compile(r'^Generating.*'), None]
, [ttyLightCyan , Normal , re.compile(r'^Install the project.*'), None]
, [ttyCyan , Bold , re.compile(r'^-- Install.*'), None]
, [ttyCyan , Bold|Italic, re.compile(r'^-- Up-to-date.*'), None]
]
def __init__ ( self, parent=None ):
QSyntaxHighlighter.__init__ ( self, parent )
for rule in Highlighter.Rules:
if not rule[3]:
rule[3] = QTextCharFormat()
rule[3].setForeground( rule[0] )
if rule[1] & Highlighter.Normal: rule[3].setFontWeight( QFont.Normal )
if rule[1] & Highlighter.Bold: rule[3].setFontWeight( QFont.Bold )
if rule[1] & Highlighter.Italic: rule[3].setFontItalic( True )
return
def highlightBlock ( self, line ):
for rule in Highlighter.Rules:
m = rule[2].match(line)
if m:
if m.groupdict().has_key('percent'):
self.setFormat( 7, len(line), rule[3] )
else:
self.setFormat( 0, len(line), rule[3] )
return
Normal = 0x0001
Bold = 0x0002
Italic = 0x0004
ttyBackground = QColor.fromRgb( 255, 255, 221 ) # #ffffdd
ttyBlack = QColor.fromRgb( 46, 52, 54 ) # #2e3436
ttyRed = QColor.fromRgb( 204, 0, 0 ) # #cc0000
ttyGreen = QColor.fromRgb( 78, 154, 6 ) # #4e9a06
ttyYellow = QColor.fromRgb( 196, 160, 0 ) # #c4a000
ttyBlue = QColor.fromRgb( 52, 101, 164 ) # #3465a4
ttyViolet = QColor.fromRgb( 117, 80, 123 ) # #75507b
ttyCyan = QColor.fromRgb( 6, 152, 154 ) # #06989a
ttyGrey = QColor.fromRgb( 211, 215, 207 ) # #d3d7cf
ttyLightBlack = QColor.fromRgb( 85, 87, 83 ) # #555753
ttyLightRed = QColor.fromRgb( 239, 41, 41 ) # #ef2929
ttyLightGreen = QColor.fromRgb( 138, 226, 52 ) # #8ae234
ttyLightYellow = QColor.fromRgb( 252, 233, 79 ) # #fce94f
ttyLightBlue = QColor.fromRgb( 114, 159, 207 ) # #729fcf
ttyLightViolet = QColor.fromRgb( 173, 127, 168 ) # #ad7fa8
ttyLightCyan = QColor.fromRgb( 52, 226, 226 ) # #34e2e2
ttyLightGrey = QColor.fromRgb( 238, 238, 236 ) # #eeeeec
Rules = [ [ttyLightViolet, Bold , re.compile(r'^Scanning.*'), None]
, [ttyLightRed , Bold , re.compile(r'^Linking.*'), 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]
, [ttyLightBlue , Normal , re.compile(r'^\[(?P<percent>\s*\d+)%\]\s*(?P<message>Generating.*moc_.*)'), None]
, [ttyLightBlue , Bold , re.compile(r'^Generating.*'), None]
, [ttyLightCyan , Normal , re.compile(r'^Install the project.*'), None]
, [ttyCyan , Bold , re.compile(r'^-- Install.*'), None]
, [ttyCyan , Bold|Italic, re.compile(r'^-- Up-to-date.*'), None]
]
def __init__ ( self, parent=None ):
QSyntaxHighlighter.__init__ ( self, parent )
for rule in Highlighter.Rules:
if not rule[3]:
rule[3] = QTextCharFormat()
rule[3].setForeground( rule[0] )
if rule[1] & Highlighter.Normal: rule[3].setFontWeight( QFont.Normal )
if rule[1] & Highlighter.Bold: rule[3].setFontWeight( QFont.Bold )
if rule[1] & Highlighter.Italic: rule[3].setFontItalic( True )
return
def highlightBlock ( self, line ):
for rule in Highlighter.Rules:
m = rule[2].match(line)
if m:
if 'percent' in m.groupdict():
self.setFormat( 7, len(line), rule[3] )
else:
self.setFormat( 0, len(line), rule[3] )
return

View File

@ -2,14 +2,14 @@
# -*- mode:Python -*-
#
# 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 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 |
# | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
# | E-mail : Jean-Paul.Chaput@lip6.fr |
# | =============================================================== |
# | Python : "./builder/OptionsWidget.py" |
# +-----------------------------------------------------------------+
@ -17,176 +17,163 @@
import re
import subprocess
from PyQt4.QtCore import Qt
from PyQt4.QtCore import pyqtSignal
from PyQt4.QtCore import QSettings
from PyQt4.QtGui import QColor
from PyQt4.QtGui import QWidget
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 builder.Project import Project
from builder.ConfigureWidget import ConfigureWidget
from builder.ProjectWidgets import ProjectWidgets
from PyQt4.QtCore import Qt, pyqtSignal, QSettings
from PyQt4.QtGui import QColor, QWidget, QPushButton, \
QCheckBox, QGroupBox, QButtonGroup, \
QVBoxLayout, QHBoxLayout, QGridLayout, \
QScrollArea, QComboBox
from .Project import Project
from .ConfigureWidget import ConfigureWidget
from .ProjectWidgets import ProjectWidgets
class OptionsWidget ( QWidget ):
progress = pyqtSignal(int)
def __init__ ( self, conf, parent=None ):
QWidget.__init__ ( self, parent )
self._conf = conf
self._projects = []
for project in self._conf.projects:
self._projects += [ ProjectWidgets(project) ]
progress = pyqtSignal(int)
def __init__ ( self, conf, parent=None ):
QWidget.__init__ ( self, parent )
self._conf = conf
self._projects = []
for project in self._conf.projects:
self._projects += [ ProjectWidgets(project) ]
gLayout = QGridLayout()
column = 0
for iproject in range(len(self._projects)):
column += self._projects[iproject].addToLayout( column, gLayout )
toolsGroup = QGroupBox( 'Projects && Tools' )
toolsGroup.setLayout( gLayout )
gLayout = QGridLayout()
column = 0
for iproject in range(len(self._projects)):
column += self._projects[iproject].addToLayout( column, gLayout )
toolsGroup = QGroupBox( 'Projects && Tools' )
toolsGroup.setLayout( gLayout )
scrollToolsGroup = QScrollArea()
scrollToolsGroup.setMinimumHeight( 350 )
#scrollToolsGroup.setVerticalScrollBarPolicy( Qt.ScrollBarAlwaysOn )
scrollToolsGroup.setWidget( toolsGroup )
self._buildMode = QComboBox()
self._buildMode.addItems( ('Release', 'Debug') )
#self._svnUpdate = QCheckBox( 'SVN Update' )
#self._svnStatus = QCheckBox( 'SVN Status' )
self._make = QCheckBox( 'Build' )
self._enableDoc = QCheckBox( 'Build Documentation' )
self._devtoolset = QCheckBox( 'Build with devtoolset 8' )
self._qt5 = QCheckBox( 'Build with Qt 5 (Qt 4 default)' )
self._noCache = QCheckBox( 'Remove previous CMake cache' )
self._rmBuild = QCheckBox( 'Cleanup Build Directory' )
self._verbose = QCheckBox( 'Display Compiler Commands' )
self._threads = QComboBox()
for j in range(16):
self._threads.addItem( '-j%d'%(j+1), j+1 )
self._commandGroup = QButtonGroup()
self._commandGroup.setExclusive( True )
#self._commandGroup.addButton( self._svnUpdate )
#self._commandGroup.addButton( self._svnStatus )
self._commandGroup.addButton( self._make )
vLayout = QVBoxLayout()
#vLayout.addWidget( self._svnUpdate )
#vLayout.addWidget( self._svnStatus )
vLayout.addWidget( self._make )
vLayout.addStretch()
commandGroup = QGroupBox( 'Command' )
commandGroup.setLayout( vLayout )
vLayout = QVBoxLayout()
vLayout.addWidget( self._buildMode )
vLayout.addWidget( self._enableDoc )
vLayout.addWidget( self._devtoolset )
vLayout.addWidget( self._qt5 )
vLayout.addWidget( self._noCache )
vLayout.addWidget( self._rmBuild )
vLayout.addStretch()
optionsGroup = QGroupBox( 'Command Options' )
optionsGroup.setLayout( vLayout )
vLayout = QVBoxLayout()
vLayout.addWidget( self._threads )
vLayout.addWidget( self._verbose )
vLayout.addStretch()
miscGroup = QGroupBox( 'Misc. Options' )
miscGroup.setLayout( vLayout )
hLayout = QHBoxLayout()
hLayout.addWidget( commandGroup )
hLayout.addWidget( optionsGroup )
hLayout.addWidget( miscGroup )
commands = QWidget()
commands.setLayout( hLayout )
vLayout = QVBoxLayout()
vLayout.addWidget( commands )
vLayout.addWidget( scrollToolsGroup )
vLayout.addStretch()
self.setLayout( vLayout )
self.readSettings()
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()
projects = property( _getProjects )
buildMode = property( _getBuildMode )
threads = property( _getThreads )
#svnUpdate = property( _getSvnUpdate )
#svnStatus = property( _getSvnStatus )
make = property( _getMake )
enableDoc = property( _getEnableDoc )
devtoolset = property( _getDevtoolset )
qt5 = property( _getQt5 )
noCache = property( _getNoCache )
rmBuild = property( _getRmBuild )
verbose = property( _getVerbose )
def readSettings ( self ):
settings = QSettings()
#self._svnUpdate .setChecked( settings.value('builder/svnUpdate').toBool() )
#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()
index = self._buildMode.findText( buildModeName )
if index >= 0: self._buildMode.setCurrentIndex( index )
threads = settings.value('builder/threads').toString()
index = self._threads.findText( threads )
if index >= 0: self._threads.setCurrentIndex( index )
for project in self._projects: project.readFromSettings()
return
def saveSettings ( self ):
settings = QSettings()
#settings.setValue('builder/svnUpdate' , self._svnUpdate .isChecked() )
#settings.setValue('builder/svnStatus' , self._svnStatus .isChecked() )
settings.setValue('builder/make' , self._make .isChecked() )
settings.setValue('builder/enableDoc' , self._enableDoc .isChecked() )
settings.setValue('builder/devtoolset', self._devtoolset.isChecked() )
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
scrollToolsGroup = QScrollArea()
scrollToolsGroup.setMinimumHeight( 350 )
#scrollToolsGroup.setVerticalScrollBarPolicy( Qt.ScrollBarAlwaysOn )
scrollToolsGroup.setWidget( toolsGroup )
self._buildMode = QComboBox()
self._buildMode.addItems( ('Release', 'Debug') )
#self._svnUpdate = QCheckBox( 'SVN Update' )
#self._svnStatus = QCheckBox( 'SVN Status' )
self._make = QCheckBox( 'Build' )
self._enableDoc = QCheckBox( 'Build Documentation' )
self._devtoolset = QCheckBox( 'Build with devtoolset 8' )
self._qt5 = QCheckBox( 'Build with Qt 5 (Qt 4 default)' )
self._noCache = QCheckBox( 'Remove previous CMake cache' )
self._rmBuild = QCheckBox( 'Cleanup Build Directory' )
self._verbose = QCheckBox( 'Display Compiler Commands' )
self._threads = QComboBox()
for j in range(16):
self._threads.addItem( '-j%d'%(j+1), j+1 )
self._commandGroup = QButtonGroup()
self._commandGroup.setExclusive( True )
#self._commandGroup.addButton( self._svnUpdate )
#self._commandGroup.addButton( self._svnStatus )
self._commandGroup.addButton( self._make )
vLayout = QVBoxLayout()
#vLayout.addWidget( self._svnUpdate )
#vLayout.addWidget( self._svnStatus )
vLayout.addWidget( self._make )
vLayout.addStretch()
commandGroup = QGroupBox( 'Command' )
commandGroup.setLayout( vLayout )
vLayout = QVBoxLayout()
vLayout.addWidget( self._buildMode )
vLayout.addWidget( self._enableDoc )
vLayout.addWidget( self._devtoolset )
vLayout.addWidget( self._qt5 )
vLayout.addWidget( self._noCache )
vLayout.addWidget( self._rmBuild )
vLayout.addStretch()
optionsGroup = QGroupBox( 'Command Options' )
optionsGroup.setLayout( vLayout )
vLayout = QVBoxLayout()
vLayout.addWidget( self._threads )
vLayout.addWidget( self._verbose )
vLayout.addStretch()
miscGroup = QGroupBox( 'Misc. Options' )
miscGroup.setLayout( vLayout )
hLayout = QHBoxLayout()
hLayout.addWidget( commandGroup )
hLayout.addWidget( optionsGroup )
hLayout.addWidget( miscGroup )
commands = QWidget()
commands.setLayout( hLayout )
vLayout = QVBoxLayout()
vLayout.addWidget( commands )
vLayout.addWidget( scrollToolsGroup )
vLayout.addStretch()
self.setLayout( vLayout )
self.readSettings()
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()
projects = property( _getProjects )
buildMode = property( _getBuildMode )
threads = property( _getThreads )
#svnUpdate = property( _getSvnUpdate )
#svnStatus = property( _getSvnStatus )
make = property( _getMake )
enableDoc = property( _getEnableDoc )
devtoolset = property( _getDevtoolset )
qt5 = property( _getQt5 )
noCache = property( _getNoCache )
rmBuild = property( _getRmBuild )
verbose = property( _getVerbose )
def readSettings ( self ):
settings = QSettings()
#self._svnUpdate .setChecked( bool(settings.value('builder/svnUpdate' )) )
#self._svnStatus .setChecked( bool(settings.value('builder/svnStatus' )) )
self._make .setChecked( bool(settings.value('builder/make' )) )
self._enableDoc .setChecked( bool(settings.value('builder/enableDoc' )) )
self._devtoolset .setChecked( bool(settings.value('builder/devtoolset')) )
self._qt5 .setChecked( bool(settings.value('builder/qt5' )) )
self._noCache .setChecked( bool(settings.value('builder/noCache' )) )
self._rmBuild .setChecked( bool(settings.value('builder/rmBuild' )) )
self._verbose .setChecked( bool(settings.value('builder/verbose' )) )
buildModeName = settings.value('builder/buildMode')
index = self._buildMode.findText( buildModeName )
if index >= 0: self._buildMode.setCurrentIndex( index )
threads = settings.value('builder/threads')
index = self._threads.findText( threads )
if index >= 0: self._threads.setCurrentIndex( index )
for project in self._projects: project.readFromSettings()
return
def saveSettings ( self ):
settings = QSettings()
#settings.setValue('builder/svnUpdate' , self._svnUpdate .isChecked() )
#settings.setValue('builder/svnStatus' , self._svnStatus .isChecked() )
settings.setValue('builder/make' , self._make .isChecked() )
settings.setValue('builder/enableDoc' , self._enableDoc .isChecked() )
settings.setValue('builder/devtoolset', self._devtoolset.isChecked() )
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 -*-
#
# 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 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 |
# | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
# | E-mail : Jean-Paul.Chaput@lip6.fr |
# | =============================================================== |
# | Python : "./builder/Project.py" |
# +-----------------------------------------------------------------+

View File

@ -2,93 +2,83 @@
# -*- mode:Python -*-
#
# 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 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 |
# | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
# | E-mail : Jean-Paul.Chaput@lip6.fr |
# | =============================================================== |
# | Python : "./builder/ProjectWidget.py" |
# +-----------------------------------------------------------------+
import string
from PyQt4.QtCore import Qt
from PyQt4.QtCore import QObject
from PyQt4.QtCore import QSettings
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
from PyQt4.QtCore import Qt, QObject, QSettings
from PyQt4.QtGui import QSizePolicy, QFrame, QPushButton, QCheckBox, \
QLabel
class ProjectWidgets ( QObject ):
def __init__ ( self, project ):
self._project = project
self._projectButton = QLabel( string.capwords(self._project.getName()) )
self._projectButton.setStyleSheet( 'font-weight: bold;' )
self._projectButton.setFrameShape( QFrame.Box )
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
def _getProjectButton ( self ): return self._projectButton
def _getToolsCheckBoxes ( self ): return self._toolsCheckBoxes
def _getActives ( self ):
actives = []
for toolCb in self._toolsCheckBoxes:
if toolCb.isChecked(): actives += [ str(toolCb.text()) ]
return actives
projectButton = property( _getProjectButton )
toolsCheckBoxes = property( _getToolsCheckBoxes )
actives = property( _getActives )
def addToLayout( self, column, layout ):
toolsNb = len(self._toolsCheckBoxes)
if toolsNb <= 10:
layout.addWidget( self._projectButton, 0, column, Qt.AlignLeft )
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
#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
def __init__ ( self, project ):
self._project = project
self._projectButton = QLabel( string.capwords(self._project.getName()) )
self._projectButton.setStyleSheet( 'font-weight: bold;' )
self._projectButton.setFrameShape( QFrame.Box )
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
def _getProjectButton ( self ): return self._projectButton
def _getToolsCheckBoxes ( self ): return self._toolsCheckBoxes
def _getActives ( self ):
actives = []
for toolCb in self._toolsCheckBoxes:
if toolCb.isChecked(): actives += [ str(toolCb.text()) ]
return actives
projectButton = property( _getProjectButton )
toolsCheckBoxes = property( _getToolsCheckBoxes )
actives = property( _getActives )
def addToLayout( self, column, layout ):
toolsNb = len(self._toolsCheckBoxes)
if toolsNb <= 10:
layout.addWidget( self._projectButton, 0, column, Qt.AlignLeft )
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
#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( bool(settings.value(toolId)) )
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 -*-
#
# 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 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 |
# | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
# | E-mail : Jean-Paul.Chaput@lip6.fr |
# | =============================================================== |
# | Python : "./builder/__init__.py" |
# +-----------------------------------------------------------------+
@ -21,8 +21,7 @@ class ErrorMessage ( Exception ):
def __init__ ( self, code, *arguments ):
self._code = code
self._errors = [ 'Malformed call to ErrorMessage()'
, '%s' % str(arguments) ]
self._errors = [ 'Malformed call to ErrorMessage()', '{}'.format(arguments) ]
text = None
if len(arguments) == 1:
@ -31,7 +30,6 @@ class ErrorMessage ( Exception ):
self._errors = arguments[0]
elif len(arguments) > 1:
text = list(arguments)
if text:
self._errors = []
while len(text[0]) == 0: del text[0]
@ -50,11 +48,10 @@ class ErrorMessage ( Exception ):
def __str__ ( self ):
if not isinstance(self._errors,list):
return "[ERROR] %s" % self._errors
formatted = "\n"
for i in range(len(self._errors)):
if i == 0: formatted += "[ERROR] %s" % self._errors[i]
else: formatted += " %s" % self._errors[i]
if i == 0: formatted += "[ERROR] {}".format(self._errors[i] )
else: formatted += " {}".format(self._errors[i] )
if i+1 < len(self._errors): formatted += "\n"
return formatted
@ -69,7 +66,7 @@ class ErrorMessage ( Exception ):
return
def terminate ( self ):
print self
print( self )
sys.exit(self._code)
def _getCode ( self ): return self._code

View File

@ -1,17 +1,17 @@
#!/usr/bin/env python
#!/usr/bin/env python3
#
# -*- mode:Python -*-
#
# 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 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 |
# | Damien Dupuis |
# | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
# | E-mail : Jean-Paul.Chaput@lip6.fr |
# | =============================================================== |
# | Python : "./ccb.py" |
# +-----------------------------------------------------------------+
@ -19,37 +19,36 @@
showTrace = True
try:
import sys
import os.path
import optparse
import traceback
import distutils.sysconfig
import subprocess
import re
except ImportError, e:
module = str(e).split()[-1]
print '[ERROR] The <%s> python module or symbol cannot be loaded.' % module
print ' Please check your standard Python installation, it may have problems.'
quit()
import sys
import os.path
import optparse
import traceback
import distutils.sysconfig
import subprocess
import re
except ImportError as e:
module = str(e).split()[-1]
print( '[ERROR] The "{}" python module or symbol cannot be loaded.'.format(module) )
print( ' Please check your standard Python installation, it may have problems.' )
quit()
def safeImport ( moduleName, symbol=None ):
try:
module = __import__( moduleName, globals(), locals(), symbol )
except ImportError, e:
print '[ERROR] The <%s> python module or symbol cannot be loaded.' % moduleName
print ' Please check the integrity of the <coriolis/boostrap> package.'
if showTrace: traceback.print_tb(sys.exc_info()[2])
sys.exit(1)
except Exception, e:
print '[ERROR] An exception occured while importing module <%s>. Is is a bug,' % moduleName
print ' you may want to report it...'
print ' %s' % e
if showTrace: traceback.print_tb(sys.exc_info()[2])
sys.exit(2)
if symbol: return module.__dict__[symbol]
return module
try:
module = __import__( moduleName, globals(), locals(), symbol )
except ImportError as e:
print( '[ERROR] The "{}" python module or symbol cannot be loaded.'.format(moduleName) )
print( ' Please check the integrity of the "coriolis/boostrap" package.' )
if showTrace: traceback.print_tb(sys.exc_info()[2])
sys.exit(1)
except Exception as e:
print( '[ERROR] An exception occured while importing module "{}". Is is a bug,'.format(moduleName) )
print( ' you may want to report it...' )
print( ' {}'.format(e) )
if showTrace: traceback.print_tb(sys.exc_info()[2])
sys.exit(2)
if symbol: return module.__dict__[symbol]
return module
def checkCMake ():
@ -57,8 +56,8 @@ def checkCMake ():
(pid,status) = os.waitpid ( child.pid, 0 )
status >>= 8
if status != 0:
print '[ERROR] The <cmake> program has not been found, please install it.'
sys.exit(1)
print( '[ERROR] The "cmake" program has not been found, please install it.' )
sys.exit(1)
def guessOs ():
@ -85,62 +84,60 @@ def guessOs ():
uname = subprocess.Popen ( ["uname", "-srm"], stdout=subprocess.PIPE )
lines = uname.stdout.readlines()
if osSlsoc7x_64.match(lines[0]):
line = lines[0].decode( 'ascii' )
if osSlsoc7x_64.match(line):
osType = "Linux.el7_64"
libDir = "lib64"
elif osSlsoc6x_64.match(lines[0]):
elif osSlsoc6x_64.match(line):
osType = "Linux.slsoc6x_64"
libDir = "lib64"
elif osSlsoc6x.match(lines[0]):
elif osSlsoc6x.match(line):
osType = "Linux.slsoc6x"
elif osSLSoC5x_64.match(lines[0]):
elif osSLSoC5x_64.match(line):
osType = "Linux.SLSoC5x_64"
libDir = "lib64"
elif osSLSoC5x .match(lines[0]):
elif osSLSoC5x .match(line):
osType = "Linux.SLSoC5x"
elif osFedora_64.match(lines[0]):
elif osFedora_64.match(line):
osType = "Linux.fc_64"
libDir = "lib64"
elif osFedora .match(lines[0]):
elif osFedora .match(line):
osType = "Linux.fc"
elif osLinux_64.match(lines[0]):
elif osLinux_64.match(line):
osType = "Linux.x86_64"
libDir = "lib64"
elif osLinux .match(lines[0]):
elif osLinux .match(line):
osType = "Linux.i386"
elif osDarwin.match(lines[0]):
elif osDarwin.match(line):
osType = "Darwin"
elif osFreeBSD8x_amd64.match(lines[0]):
elif osFreeBSD8x_amd64.match(line):
osType = "FreeBSD.8x.amd64"
libDir = "lib64"
elif osFreeBSD8x_64.match(lines[0]):
elif osFreeBSD8x_64.match(line):
osType = "FreeBSD.8x.x86_64"
libDir = "lib64"
elif osFreeBSD8x.match(lines[0]):
elif osFreeBSD8x.match(line):
osType = "FreeBSD.8x.i386"
elif osCygwinW7_64.match(lines[0]):
elif osCygwinW7_64.match(line):
osType = "Cygwin.W7_64"
libDir = "lib64"
elif osCygwinW7.match(lines[0]):
elif osCygwinW7.match(line):
osType = "Cygwin.W7"
elif osCygwinW8_64.match(lines[0]):
elif osCygwinW8_64.match(line):
osType = "Cygwin.W8_64"
libDir = "lib64"
elif osCygwinW8.match(lines[0]):
elif osCygwinW8.match(line):
osType = "Cygwin.W8"
elif osCygwinW10_64.match(lines[0]):
elif osCygwinW10_64.match(line):
osType = "Cygwin.W10_64"
libDir = "lib64"
elif osCygwinW10.match(lines[0]):
elif osCygwinW10.match(line):
osType = "Cygwin.W10"
else:
uname = subprocess.Popen ( ["uname", "-sr"], stdout=subprocess.PIPE )
osType = uname.stdout.readlines()[0][:-1]
print "[WARNING] Unrecognized OS: \"%s\"." % lines[0][:-1]
print " (using: \"%s\")" % osType
print( '[WARNING] Unrecognized OS: "{}".'.format(lines[0][:-1]) )
print( ' (using: "{}")'.format(osType) )
return osType, libDir
@ -151,10 +148,9 @@ def guessPythonSitePackage ():
def autoLocate ():
osType, libDir = guessOs()
print 'Building for target: <%s>' % osType
print 'Making an educated guess to locate myself:'
sitePackage = guessPythonSitePackage()
print( 'Building for target: "{}"'.format(osType) )
print( 'Making an educated guess to locate myself:' )
sitePackage = guessPythonSitePackage()
builderDir = None
locations = [ os.path.abspath(os.path.dirname(sys.argv[0]))
, 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
, '/users/outil/coriolis/coriolis-2.x/'+osType+'/Release.Shared/install/'+libDir+'/'+sitePackage
]
for location in locations:
print ' <%s>' % location,
print( ' "{}" '.format(location), end='' )
if os.path.isfile(location + '/builder/__init__.py'):
if not builderDir:
builderDir = location
print '(Found*)'
print( '(Found*)' )
else:
print '(Found)'
print( '(Found)' )
else:
print '(No)'
print( '(No)' )
if not builderDir:
print '[ERROR] Failed to locate the builder modules in any of the normal pathes.'
print ' Please check your Coriolis/Bootsrap installation.'
print( '[ERROR] Failed to locate the builder modules in any of the normal pathes.' )
print( ' Please check your Coriolis/Bootsrap installation.' )
if showTrace: traceback.print_tb(sys.exc_info()[2])
sys.exit(1)
sys.path.insert( 0, builderDir )
return
@ -193,125 +185,117 @@ autoLocate()
checkCMake()
parser = optparse.OptionParser ()
parser.add_option ( "-g", "--gui" , action="store_true" , dest="gui" , help="Lauch the graphical interface." )
# Build relateds.
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 ( "-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 ( "-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 ( "--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 ( "--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-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 ( "--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 ( "--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 ( "--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 ( "--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 ( "--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 ( "-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 ( "-g", "--gui" , action="store_true" , dest="gui" , help="Lauch the graphical interface." )
# Build relateds.
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 ( "-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 ( "-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 ( "--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 ( "--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-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 ( "--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 ( "--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 ( "--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 ( "--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 ( "--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 ( "-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.
# 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-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-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-checkout" , action="store_true" , dest="svnCheckout" , help="Checkout the latest SVN version *or* the one given by svn-tag." )
#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-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-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." )
# 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 ( "--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 ( "--deb" , action="store_true" , dest="doDeb" , help="Regenerate Debian/Ubuntu packages." )
# 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 ( "-u", "--check-deter" , action="store_true" , dest="checkDeterminism", help="Enable Katabatic/Kite determinism checking (*very* slow)." )
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 ( "--rpm" , action="store_true" , dest="doRpm" , help="Regenerate RPM packages." )
parser.add_option ( "--deb" , action="store_true" , dest="doDeb" , help="Regenerate Debian/Ubuntu packages." )
# 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 ( "-u", "--check-deter" , action="store_true" , dest="checkDeterminism", help="Enable Katabatic/Kite determinism checking (*very* slow)." )
(options, args) = parser.parse_args ()
if options.gui:
ErrorMessage = safeImport( 'builder' , 'ErrorMessage' )
QApplication = safeImport( 'PyQt4.QtGui' , 'QApplication' )
BuilderGui = safeImport( 'builder.BuilderGui', 'BuilderGui' )
try:
app = QApplication( sys.argv )
app.setOrganizationName ( 'UPMC' )
app.setOrganizationDomain( 'lip6.fr' )
app.setApplicationName ( 'CoriolisBuilder' )
gui = BuilderGui( options.conf )
gui.show()
rcode = app.exec_()
sys.exit( rcode )
except ErrorMessage, e:
print e
if showTrace: traceback.print_tb(sys.exc_info()[2])
sys.exit(2)
except Exception, e:
print '[ERROR] An exception occured while running the Qt application.'
print ' %s' % e
if showTrace: traceback.print_tb(sys.exc_info()[2])
sys.exit(2)
ErrorMessage = safeImport( 'builder' , 'ErrorMessage' )
QApplication = safeImport( 'PyQt4.QtGui' , 'QApplication' )
BuilderGui = safeImport( 'builder.BuilderGui', 'BuilderGui' )
try:
app = QApplication( sys.argv )
app.setOrganizationName ( 'UPMC' )
app.setOrganizationDomain( 'lip6.fr' )
app.setApplicationName ( 'CoriolisBuilder' )
gui = BuilderGui( options.conf )
gui.show()
rcode = app.exec_()
sys.exit( rcode )
except ErrorMessage as e:
print( e )
if showTrace: traceback.print_tb(sys.exc_info()[2])
sys.exit(2)
except Exception as e:
print( '[ERROR] An exception occured while running the Qt application.' )
print( ' {}'.format(e) )
if showTrace: traceback.print_tb(sys.exc_info()[2])
sys.exit(2)
else:
ErrorMessage = safeImport( 'builder' , 'ErrorMessage' )
Builder = safeImport( 'builder.Builder', 'Builder' )
try:
builder = Builder()
builder.loadConfiguration( options.conf )
if options.showConf:
builder.showConfiguration ()
sys.exit(0)
if options.quiet: builder.quiet = True
if options.release: builder.buildMode = "Release"
if options.debug: builder.buildMode = "Debug"
if options.static: builder.enableShared = "OFF"
if options.doc: builder.enableDoc = "ON"
if options.checkDb: builder.checkDatabase = "ON"
if options.checkDeterminism: builder.checkDeterminism = "ON"
if options.verboseMakefile: builder.verboseMakefile = "ON"
if options.rootDir: builder.rootDir = options.rootDir
if options.noBuild: builder.doBuild = False
if options.noCache: builder.noCache = True
if options.rmBuild: builder.rmBuild = True
if options.ninja: builder.ninja = True
if options.clang or options.llvmtoolset: builder.clang = True
if options.macports: builder.macports = True
if options.devtoolset: builder.devtoolset = options.devtoolset
if options.llvmtoolset: builder.llvmtoolset = options.llvmtoolset
if options.bfd: builder.bfd = "ON"
if options.qt5: builder.qt5 = True
if options.openmp: builder.openmp = True
if options.makeArguments: builder.makeArguments = options.makeArguments
#if options.svnMethod: builder.svnMethod = options.svnMethod
#if options.svnTag: builder.svnTag = options.svnTag
#if options.svnStatus: builder.svnStatus ( tools=options.tools, projects=options.projects )
#elif options.svnUpdate: builder.svnUpdate ( tools=options.tools, projects=options.projects )
#elif options.svnDiff: builder.svnDiff ( tools=options.tools, projects=options.projects )
#elif options.svnCheckout: builder.svnCheckout ( tools=options.tools, projects=options.projects )
if options.userTarball: builder.userTarball ( tools=options.tools, projects=options.projects )
elif options.tarball: builder.svnTarball ( tools=options.tools, projects=options.projects )
elif options.doRpm: builder.doRpm ()
elif options.doDeb: builder.doDeb ()
else: builder.build ( tools=options.tools, projects=options.projects )
except ErrorMessage, e:
print e
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)
ErrorMessage = safeImport( 'builder' , 'ErrorMessage' )
Builder = safeImport( 'builder.Builder', 'Builder' )
try:
builder = Builder()
builder.loadConfiguration( options.conf )
if options.showConf:
builder.showConfiguration ()
sys.exit(0)
if options.quiet: builder.quiet = True
if options.release: builder.buildMode = "Release"
if options.debug: builder.buildMode = "Debug"
if options.static: builder.enableShared = "OFF"
if options.doc: builder.enableDoc = "ON"
if options.checkDb: builder.checkDatabase = "ON"
if options.checkDeterminism: builder.checkDeterminism = "ON"
if options.verboseMakefile: builder.verboseMakefile = "ON"
if options.rootDir: builder.rootDir = options.rootDir
if options.noBuild: builder.doBuild = False
if options.noCache: builder.noCache = True
if options.rmBuild: builder.rmBuild = True
if options.ninja: builder.ninja = True
if options.clang or options.llvmtoolset: builder.clang = True
if options.macports: builder.macports = True
if options.devtoolset: builder.devtoolset = options.devtoolset
if options.llvmtoolset: builder.llvmtoolset = options.llvmtoolset
if options.bfd: builder.bfd = "ON"
if options.qt5: builder.qt5 = True
if options.openmp: builder.openmp = True
if options.makeArguments: builder.makeArguments = options.makeArguments
#if options.svnMethod: builder.svnMethod = options.svnMethod
#if options.svnTag: builder.svnTag = options.svnTag
#if options.svnStatus: builder.svnStatus ( tools=options.tools, projects=options.projects )
#elif options.svnUpdate: builder.svnUpdate ( tools=options.tools, projects=options.projects )
#elif options.svnDiff: builder.svnDiff ( tools=options.tools, projects=options.projects )
#elif options.svnCheckout: builder.svnCheckout ( tools=options.tools, projects=options.projects )
if options.userTarball: builder.userTarball ( tools=options.tools, projects=options.projects )
elif options.tarball: builder.svnTarball ( tools=options.tools, projects=options.projects )
elif options.doRpm: builder.doRpm ()
elif options.doDeb: builder.doDeb ()
else: builder.build ( tools=options.tools, projects=options.projects )
except ErrorMessage as e:
print( e )
if showTrace: traceback.print_tb(sys.exc_info()[2])
sys.exit(e.code)
except KeyboardInterrupt as e:
print( '\n[ERROR] Interrupted by user\'s request (CTRL+C)' )
sys.exit(1)
sys.exit(0)

View File

@ -7,12 +7,12 @@
if(COMMAND CMAKE_POLICY)
cmake_policy(SET CMP0003 NEW)
cmake_policy(SET CMP0005 NEW)
if(NOT (CMAKE_VERSION VERSION_LESS 2.8.0))
cmake_policy(SET CMP0014 OLD)
endif()
if(NOT (CMAKE_VERSION VERSION_LESS 2.8.12))
cmake_policy(SET CMP0022 OLD)
endif()
#if(NOT (CMAKE_VERSION VERSION_LESS 2.8.0))
# cmake_policy(SET CMP0014 OLD)
#endif()
#if(NOT (CMAKE_VERSION VERSION_LESS 2.8.12))
# cmake_policy(SET CMP0022 OLD)
#endif()
endif(COMMAND CMAKE_POLICY)
endmacro(set_cmake_policies)
@ -85,12 +85,12 @@
set(ADDTIONAL_FLAGS "")
set(CXX_STANDARD "c++11")
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 ${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_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_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 -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_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)
@ -410,8 +410,30 @@
)
target_link_libraries( ${pytarget} ${pyDeplibs} )
install( TARGETS ${pytarget} DESTINATION ${PYTHON_SITE_PACKAGES} )
install( TARGETS ${pytarget} DESTINATION ${Python_CORIOLISARCH} )
if( NOT ("${pyIncludes}" STREQUAL "None") )
install( FILES ${pyIncludes} DESTINATION ${inc_install_dir} )
endif()
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(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.
set(SCRIPT "import os.path,distutils.sysconfig")
set(SCRIPT "${SCRIPT}; pathes = distutils.sysconfig.get_python_lib().split('/')")
set(SCRIPT "${SCRIPT}; print os.path.join(pathes[-2],pathes[-1])")
set(SCRIPT "${SCRIPT}; pathes = distutils.sysconfig.get_python_lib('platstdlib').split('/')")
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
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
)
@ -17,14 +30,17 @@ if(UNIX)
set(FindPythonSitePackages_FOUND FALSE)
endif(RETURN_CODE EQUAL 0)
set(PYTHON_SITE_PACKAGES "lib${LIB_SUFFIX}/${PYTHON_SITE_PACKAGES}"
CACHE STRING "Python site packages directory." FORCE)
mark_as_advanced(PYTHON_SITE_PACKAGES)
set(Python_CORIOLISARCH "lib${LIB_SUFFIX}/${Python_CORIOLISARCH}"
CACHE STRING "Python platform dependent install directory." FORCE)
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(NOT FindPythonSitePackages_FIND_QUIETLY)
if(FindPythonSitePackages_FOUND)
message(STATUS "Found FindPythonSitePackages : ${PYTHON_SITE_PACKAGES}")
message(STATUS "Found FindPythonSitePackages : ${Python_CORIOLISARCH}")
endif(FindPythonSitePackages_FOUND)
endif(NOT FindPythonSitePackages_FIND_QUIETLY)
else(FindPythonSitePackages_FOUND)

View File

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

View File

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

View File

@ -4,6 +4,7 @@
project(BORA)
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)
@ -14,15 +15,14 @@
setup_project_paths(CORIOLIS)
set_cmake_policies()
setup_boost(program_options filesystem python regex)
setup_boost(program_options)
setup_qt()
setup_qwt()
find_package(Libexecinfo REQUIRED)
find_package(PythonLibs 2 REQUIRED)
find_package(Python 3 REQUIRED COMPONENTS Interpreter Development)
find_package(PythonSitePackages REQUIRED)
find_package(LEFDEF REQUIRED)
find_package(VLSISAPD REQUIRED)
find_package(FLUTE REQUIRED)
find_package(HURRICANE 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:
import sys
import os.path
import helpers.io
from helpers.io import ErrorMessage
from helpers.io import WarningMessage
import Viewer
except Exception, e:
helpers.io.catch( e )
sys.exit( 1 )
import sys
import os.path
import helpers.io
from helpers.io import ErrorMessage
from helpers.io import WarningMessage
import Viewer
except Exception as e:
helpers.io.catch( e )
sys.exit( 1 )
def boraHook ( **kw ):
bora = None
if kw.has_key('bora'):
bora = kw['bora']
if 'bora' in kw:
bora = kw['bora']
else:
print ErrorMessage( 3, 'boraHook(): Must be run from a BoraEngine.' )
return
print( ErrorMessage( 3, 'boraHook(): Must be run from a BoraEngine.' ))
return
try:
userInit = os.path.join( os.getcwd(), 'coriolis2/bora.py' )
if (os.path.exists(userInit)):
execfile( userInit )
except Exception, e:
helpers.io.catch( e )
userInit = os.path.join( os.getcwd(), 'coriolis2/bora.py' )
if (os.path.exists(userInit)):
exec( open(userInit).read() )
except Exception as e:
helpers.io.catch( e )
return

View File

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

View File

@ -1,7 +1,7 @@
// -*- C++ -*-
//
// 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 |
@ -63,12 +63,21 @@ extern "C" {
};
// ---------------------------------------------------------------
// Module Initialization : "initBora ()"
static PyModuleDef PyBora_ModuleDef =
{ 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();
PyStepParameterRange_LinkPyType();
@ -95,12 +104,11 @@ extern "C" {
PYTYPE_READY_SUB( BoraEngine , ToolEngine );
PYTYPE_READY_SUB( GraphicBoraEngine , GraphicTool );
PyObject* module = Py_InitModule( "Bora", PyBora_Methods );
PyObject* module = PyModule_Create( &PyBora_ModuleDef );
if (module == NULL) {
cerr << "[ERROR]\n"
<< " Failed to initialize Bora module." << endl;
return;
return NULL;
}
Py_INCREF( &PyTypeParameterRange );
@ -128,6 +136,8 @@ extern "C" {
PySlicingNode_postModuleInit();
PyBoraEngine_postModuleInit();
return module;
}

View File

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

View File

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

View File

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

View File

@ -3,9 +3,10 @@
set(CMAKE_LEGACY_CYGWIN_WIN32 0)
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)

View File

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

View File

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

View File

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

View File

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

View File

@ -54,7 +54,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</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_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_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_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>
@ -92,7 +92,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -59,7 +59,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -66,7 +66,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

File diff suppressed because one or more lines are too long

View File

@ -98,7 +98,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -60,7 +60,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</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>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -58,7 +58,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -57,7 +57,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -64,7 +64,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -53,7 +53,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -118,7 +118,7 @@ Static Public Member Functions</h2></td></tr>
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -94,7 +94,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -905,7 +905,7 @@ Static Public Member Functions</h2></td></tr>
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -56,7 +56,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -175,7 +175,7 @@ Public Member Functions</h2></td></tr>
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -67,7 +67,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -495,7 +495,7 @@ Public Member Functions</h2></td></tr>
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -60,7 +60,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -292,7 +292,7 @@ Public Member Functions</h2></td></tr>
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -69,7 +69,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -691,7 +691,7 @@ Static Public Member Functions</h2></td></tr>
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -83,7 +83,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -781,7 +781,7 @@ Public Member Functions</h2></td></tr>
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -96,7 +96,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -1136,7 +1136,7 @@ Public Member Functions</h2></td></tr>
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -54,7 +54,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -127,7 +127,7 @@ Public Member Functions</h2></td></tr>
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -68,7 +68,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -451,7 +451,7 @@ Static Public Member Functions</h2></td></tr>
<hr>
<table class="footer1">
<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>
</tr>
</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>
<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 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>
@ -70,7 +70,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -91,14 +91,14 @@ Public Member Functions</h2></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
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="separator:afe17db013bf6a933c2af4e847bfd7918"><td class="memSeparator" colspan="2">&#160;</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:afb41e7be2a6d258a691aacbe7a78154f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<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><h2 class="groupheader">Member Function Documentation</h2>
<a id="afe17db013bf6a933c2af4e847bfd7918"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afe17db013bf6a933c2af4e847bfd7918">&#9670;&nbsp;</a></span>create()</h2>
<a id="afb41e7be2a6d258a691aacbe7a78154f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afb41e7be2a6d258a691aacbe7a78154f">&#9670;&nbsp;</a></span>create()</h2>
<div class="memitem">
<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="paramname"><em>wireWidth</em>, </td>
</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>
<td class="paramkey"></td>
<td></td>
@ -682,7 +688,7 @@ Static Public Member Functions</h2></td></tr>
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -64,7 +64,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -452,7 +452,7 @@ Static Public Member Functions</h2></td></tr>
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -56,7 +56,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -190,7 +190,7 @@ Public Member Functions</h2></td></tr>
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -64,7 +64,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -198,7 +198,7 @@ Static Public Member Functions</h2></td></tr>
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -73,7 +73,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -1218,8 +1218,8 @@
<type>static RoutingLayerGauge *</type>
<name>create</name>
<anchorfile>classCRL_1_1RoutingLayerGauge.html</anchorfile>
<anchor>afe17db013bf6a933c2af4e847bfd7918</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>
<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 pwireWidth, DbU::Unit viaWidth, DbU::Unit obsDw)</arglist>
</member>
</compound>
<compound kind="class">

View File

@ -53,7 +53,7 @@ Directories</h2></td></tr>
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -49,7 +49,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -49,7 +49,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -61,7 +61,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -72,7 +72,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -54,7 +54,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -48,7 +48,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -51,7 +51,7 @@ $(function() {
<li>create()
: <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_1RoutingLayerGauge.html#afe17db013bf6a933c2af4e847bfd7918">CRL::RoutingLayerGauge</a>
, <a class="el" href="classCRL_1_1RoutingLayerGauge.html#afb41e7be2a6d258a691aacbe7a78154f">CRL::RoutingLayerGauge</a>
</li>
<li>createCell()
: <a class="el" href="classCRL_1_1AllianceFramework.html#ac4381ad0c3799d584ef3ea160846e2bb">CRL::AllianceFramework</a>
@ -68,7 +68,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -61,7 +61,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -57,7 +57,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -55,7 +55,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -88,7 +88,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -51,7 +51,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -83,7 +83,7 @@ $(function() {
<li>create()
: <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_1RoutingLayerGauge.html#afe17db013bf6a933c2af4e847bfd7918">CRL::RoutingLayerGauge</a>
, <a class="el" href="classCRL_1_1RoutingLayerGauge.html#afb41e7be2a6d258a691aacbe7a78154f">CRL::RoutingLayerGauge</a>
</li>
<li>createCell()
: <a class="el" href="classCRL_1_1AllianceFramework.html#ac4381ad0c3799d584ef3ea160846e2bb">CRL::AllianceFramework</a>
@ -579,7 +579,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -258,7 +258,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -54,7 +54,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -96,7 +96,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

View File

@ -63,7 +63,7 @@ $(function() {
<hr>
<table class="footer1">
<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>
</tr>
</table>

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