Compare commits

...

13 Commits

Author SHA1 Message Date
Serge Rabyking 1ea1a402e6 Merge branch 'devel' into 'serge/changes'
# Conflicts:
#   Seabreeze/CMakeLists.txt
#   anabatic/CMakeLists.txt
#   anabatic/src/CMakeLists.txt
#   bootstrap/CMakeLists.txt
#   bora/CMakeLists.txt
#   crlcore/CMakeLists.txt
#   crlcore/src/cyclop/CMakeLists.txt
#   crlcore/src/pyCRL/CMakeLists.txt
#   crlcore/src/x2y/CMakeLists.txt
#   etesian/CMakeLists.txt
#   etesian/src/CMakeLists.txt
#   flute/CMakeLists.txt
#   flute/src/3.1/CMakeLists.txt
#   foehn/CMakeLists.txt
#   hurricane/CMakeLists.txt
#   hurricane/src/isobar/CMakeLists.txt
#   ispd/CMakeLists.txt
#   karakaze/CMakeLists.txt
#   katana/CMakeLists.txt
#   katana/src/CMakeLists.txt
#   oroshi/CMakeLists.txt
#   stratus1/CMakeLists.txt
#   tutorial/CMakeLists.txt
#   unicorn/CMakeLists.txt
#   unittests/CMakeLists.txt
2023-07-03 18:44:34 +00:00
Jean-Paul Chaput d9c9945897 Manage the USE_MANYLINUX options from base Coriolis. 2023-07-03 20:08:49 +02:00
Serge Rabyking 5e5ae997f5 Merge branch 'devel' into 'serge/changes'
# Conflicts:
#   bootstrap/cmake_modules/FindBootstrap.cmake
2023-06-28 15:56:29 +00:00
Serge Rabyking 626766e07c Minor fixes to python build
LEFDEF added to compilation
     some cmake variables adjusted to adjust relative paths for python package
     flute LUTs files added to python package
2023-06-11 15:47:43 +01:00
Serge Rabyking 60e7ba1d9b Make CGT script works through 'python -m coriolis' command
Added cgt script as __main__.py into coriolis python package
2023-06-06 12:51:46 +01:00
Serge Rabyking d968eb3c81 Updated package description for the python wheel 2023-05-30 23:42:26 +01:00
Serge Rabyking 26f054eafa CI build fix
Updated cmake files to have find_package with Devlopment.Module to
             make build work both locally and from cibuildwheel.
        Added set Python_LIBRARIES="-Wl,--unresolved-symbols=ignore-all"
             in case when it is not set (in manylinux) as lipython not found.
        Added RPATH to be '$ORIGIN/libs:$ORIGIN' for all shared library
             be discoverable.
2023-05-30 21:02:07 +01:00
Serge Rabyking 4a547a1ade Fixed python3 libraries be properly discoverable inside CI build 2023-05-29 04:41:30 +01:00
Serge Rabyking a5ee874a35 Changed installation of python36-devel to python3-devel 2023-05-29 04:27:15 +01:00
Serge Rabyking 9b27806b65 Try latest cibuildwheel version for CI build 2023-05-29 04:17:25 +01:00
Serge Rabyking d21e80353a Implemented python wheel build using scikit-build-core backend
Added CMakeFiles.txt that perform sequential build of coriolis components
	Fixed some cmake files bugs
	Added extra files to coriolis python wheel to make shared library preload
2023-05-29 03:59:41 +01:00
Serge Rabyking 2046a1501f Added -fPIC compile option as required for python extensions
Added config directory to be determined through platformdirs package
Added pysetup directory with setup.py script and additional code to make
   properly assembled python wheel distribution.
   To make wheel run: python3 pysetup/setup.py bdist_wheel
   When wheel installed into the system the 'coriolis' command available.
   Running coriolis from python package folder implemented
       through preloading of required *.so files in proper order
		(no need to install shared libraries in system folders).
2023-05-26 17:33:25 +01:00
Serge Rabyking 41e57a7512 Migrate python2 code to python3:
Updated all required lines which contains 'print'
    Updated all required lines which contains 'except'
2023-05-19 17:42:22 +01:00
56 changed files with 593 additions and 348 deletions

View File

@ -12,7 +12,7 @@ linux:
DOCKER_TLS_CERTDIR: ""
script:
- curl -sSL https://get.docker.com/ | sh
- python -m pip install cibuildwheel==2.11.3
- python -m pip install cibuildwheel #==2.11.3
- cibuildwheel --output-dir wheelhouse
parallel:
matrix:

125
CMakeLists.txt Normal file
View File

@ -0,0 +1,125 @@
cmake_minimum_required(VERSION 3.16)
project(coriolis)
if(NOT CMAKE_BUILD_PARALLEL_LEVEL)
cmake_host_system_information(RESULT Ncpu QUERY NUMBER_OF_LOGICAL_CORES)
math(EXPR CMAKE_BUILD_PARALLEL_LEVEL "${Ncpu}-1")
endif()
set(USE_MANYLINUX ON)
set(CORIOLIS_TMP_INSTALL_DIR ${CMAKE_BINARY_DIR}/install)
set(ENV{CORIOLIS_TOP} ${CORIOLIS_TMP_INSTALL_DIR})
function (build_coriolis_module target)
message("---------- Start building ${target} ----------")
set(build_dir ${CMAKE_BINARY_DIR}/build_${target})
file(MAKE_DIRECTORY ${build_dir} ${build_dir}/build)
file(WRITE ${build_dir}/CMakeLists.txt "
cmake_minimum_required(VERSION ${CMAKE_VERSION})
project(build_${target})
set(USE_MANYLINUX ON)
find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module)
set(POETRY TRUE) # this will prevent looking for python site-packages directory
# and next vars will not be overwritten
set(Python_CORIOLISARCH coriolis) # relative to install dir
set(Python_CORIOLISLIB coriolis) # relative to install dir
set(PYTHON_SITE_PACKAGES ..) # python packages directory (relative to coriolis python dir)
if(NOT Python_LIBRARIES)
set(Python_LIBRARIES \"-Wl,--unresolved-symbols=ignore-all\")
endif()
set(CXX_STANDARD \"-fPIC\")
if(NOT Python3_LIBRARIES)
set(Python3_LIBRARIES \"\${Python_LIBRARIES}\")
endif()
list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_CURRENT_SOURCE_DIR}/bootstrap/cmake_modules)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/${target} ${build_dir})
")
execute_process(
COMMAND ${CMAKE_COMMAND} ${build_dir}
-D CMAKE_BUILD_TYPE:STRING=Release
-D CMAKE_INSTALL_PREFIX:PATH=${CORIOLIS_TMP_INSTALL_DIR}
-D CMAKE_BUILD_RPATH_USE_ORIGIN:BOOL=TRUE
-D CMAKE_SKIP_BUILD_RPATH:BOOL=FALSE
-D CMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=FALSE
-D CMAKE_INSTALL_RPATH:STRING='$ORIGIN/libs:$ORIGIN'
-D CMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=TRUE
-G "${CMAKE_GENERATOR}"
WORKING_DIRECTORY ${build_dir}/build
RESULT_VARIABLE ${target}_setup_result
)
if(NOT ${${target}_setup_result} EQUAL 0)
message(FATAL_ERROR "Failed to setup ${target} build\n")
endif()
execute_process(COMMAND ${CMAKE_COMMAND} --build . --parallel ${CMAKE_BUILD_PARALLEL_LEVEL}
WORKING_DIRECTORY ${build_dir}/build
RESULT_VARIABLE ${target}_build_result
)
if(NOT ${${target}_build_result} EQUAL 0)
message(FATAL_ERROR "${target} build failed\n")
endif()
execute_process(COMMAND ${CMAKE_COMMAND} --install . --prefix "${CORIOLIS_TMP_INSTALL_DIR}"
WORKING_DIRECTORY ${build_dir}/build
RESULT_VARIABLE ${target}_install_result
)
if(NOT ${${target}_install_result} EQUAL 0)
message(FATAL_ERROR "Failed to installe ${target} into build environment\n")
endif()
endfunction()
build_coriolis_module(lefdef)
build_coriolis_module(coloquinte)
build_coriolis_module(hurricane)
build_coriolis_module(crlcore)
build_coriolis_module(flute)
build_coriolis_module(etesian)
build_coriolis_module(anabatic)
build_coriolis_module(katana)
build_coriolis_module(equinox)
build_coriolis_module(solstice)
build_coriolis_module(oroshi)
build_coriolis_module(bora)
build_coriolis_module(karakaze)
#build_coriolis_module(knik)
build_coriolis_module(unicorn)
build_coriolis_module(tutorial)
build_coriolis_module(cumulus)
build_coriolis_module(stratus1)
##add_subdirectory(documentation)
#add_subdirectory(unittests)
file(GLOB SHARED_LIB_FILES LIST_DIRECTORIES false "${CORIOLIS_TMP_INSTALL_DIR}/lib/*.*")
install(FILES ${SHARED_LIB_FILES} DESTINATION coriolis/libs)
function(coriolis_install_folder dstdir srcdir)
file(GLOB_RECURSE files RELATIVE "${srcdir}" "${srcdir}/*.*")
foreach(name ${files})
if(NOT IS_DIRECTORY "${srcdir}/${name}")
get_filename_component(subdir ${name} DIRECTORY)
install(FILES "${srcdir}/${name}" DESTINATION ${dstdir}/${subdir})
endif()
endforeach()
endfunction()
coriolis_install_folder(coriolis/share/flute ${CORIOLIS_TMP_INSTALL_DIR}/share/flute)
coriolis_install_folder(coriolis ${CORIOLIS_TMP_INSTALL_DIR}/coriolis)
set(CORIOLIS_EXTRAS_DIR ${CMAKE_BINARY_DIR}/extras)
file(MAKE_DIRECTORY ${CORIOLIS_EXTRAS_DIR})
# Put all extra python things into ${CORIOLIS_EXTRAS_DIR} directory
coriolis_install_folder(coriolis ${CORIOLIS_EXTRAS_DIR})
install(FILES "${CORIOLIS_TMP_INSTALL_DIR}/bin/cgt" DESTINATION coriolis RENAME __main__.py)

View File

@ -14,9 +14,9 @@
&& ${DOXYGEN_EXECUTABLE} doxyfile
&& cp -f ${doxExtras} html
)
endif()
install ( DIRECTORY html/ DESTINATION ${htmlInstallDir} )
install ( DIRECTORY latex/ DESTINATION ${latexInstallDir} )
install ( FILES asimbook.cls DESTINATION ${latexInstallDir} )
endif()

View File

@ -90,7 +90,7 @@ endif ( CHECK_DETERMINISM )
${QtX_LIBRARIES}
${Boost_LIBRARIES}
${LIBXML2_LIBRARIES}
${Python3_LIBRARIES}
${Python_LIBRARIES}
-lutil
)

View File

@ -11,8 +11,8 @@ if __name__ == "__main__":
try:
scriptPath = os.path.abspath( os.path.dirname(sys.argv[0]) )
print 'buildCoriolis.py is run from:'
print ' <%s>' % scriptPath
print('buildCoriolis.py is run from:')
print(' <%s>' % scriptPath)
parser = optparse.OptionParser ()
# Build relateds.
@ -80,11 +80,11 @@ if __name__ == "__main__":
elif options.doRpm: builder.doRpm ()
elif options.doDeb: builder.doDeb ()
else: builder.build ( tools=options.tools, projects=options.projects )
except ErrorMessage, e:
print e
except ErrorMessage as e:
print(e)
sys.exit(e.code)
#except Exception, e:
# print e
#except Exception as e:
# print(e)
# sys.exit(1)
sys.exit ( 0 )

View File

@ -39,6 +39,8 @@ if(UNIX AND NOT POETRY)
mark_as_advanced(Python_CORIOLISLIB)
mark_as_advanced(Python_SITELIB)
set(PYTHON_SITE_PACKAGES "${Python_SITELIB}")
if(FindPythonSitePackages_FOUND)
if(NOT FindPythonSitePackages_FIND_QUIETLY)
if(FindPythonSitePackages_FOUND)

View File

@ -39,7 +39,7 @@ try:
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from email.mime.application import MIMEApplication
except ImportError, e:
except ImportError as e:
module = str(e).split()[-1]
@ -94,7 +94,7 @@ class ErrorMessage ( Exception ):
return
def terminate ( self ):
print self
print(self)
sys.exit(self._code)
@property
@ -122,7 +122,7 @@ class Command ( object ):
self.fdLog = fdLog
if self.fdLog != None and not isinstance(self.fdLog,file):
print '[WARNING] Command.__init__(): <fdLog> is neither None or a file.'
print('[WARNING] Command.__init__(): <fdLog> is neither None or a file.')
return
def _argumentsToStr ( self, arguments ):
@ -133,7 +133,7 @@ class Command ( object ):
return s
def log ( self, text ):
print text[:-1]
print(text[:-1])
sys.stdout.flush()
sys.stderr.flush()
if isinstance(self.fdLog,file):
@ -151,12 +151,12 @@ class Command ( object ):
if homeDir.startswith(homeDir):
workDir = '~' + workDir[ len(homeDir) : ]
user = 'root'
if os.environ.has_key('USER'): user = os.environ['USER']
if 'USER' in os.environ: user = os.environ['USER']
prompt = '%s@%s:%s$' % (user,conf.masterHost,workDir)
try:
self.log( '%s%s\n' % (prompt,self._argumentsToStr(self.arguments)) )
print self.arguments
print(self.arguments)
child = subprocess.Popen( self.arguments, stdout=subprocess.PIPE, stderr=subprocess.STDOUT )
while True:
@ -164,7 +164,7 @@ class Command ( object ):
if not line: break
self.log( line )
except OSError, e:
except OSError as e:
raise BadBinary( self.arguments[0] )
(pid,status) = os.waitpid( child.pid, 0 )
@ -258,12 +258,12 @@ class GitRepository ( object ):
def removeLocalRepo ( self ):
if os.path.isdir(self.localRepoDir):
print 'Removing Git local repository: <%s>' % self.localRepoDir
print('Removing Git local repository: <%s>' % 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 )
@ -329,12 +329,12 @@ class Configuration ( object ):
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 <%s> in Configuration.'%attribute ))
return
if attribute == 'masterHost' or attribute == '_masterHost':
if value == 'lepka':
print 'Never touch the Git tree when running on <lepka>.'
print('Never touch the Git tree when running on <lepka>.')
self._rmSource = False
self._rmBuild = False
self._doGit = False
@ -393,7 +393,7 @@ class Configuration ( object ):
while True:
logFile = os.path.join(self._logDir,"%s-%s-%02d.log" % (stem,timeTag,index))
if not os.path.isfile(logFile):
print "Report log: <%s>" % logFile
print("Report log: <%s>" % logFile)
break
index += 1
fd = open( logFile, "w" )
@ -506,7 +506,7 @@ class Report ( object ):
fd = open( logFile, 'rb' )
try:
fd.seek( -1024*100, os.SEEK_END )
except IOError, e:
except IOError as e:
pass
tailLines = ''
for line in fd.readlines()[1:]:
@ -525,8 +525,8 @@ class Report ( object ):
for attachement in self.attachements:
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(' <%s>' % receiver)
session = smtplib.SMTP( 'localhost' )
session.sendmail( self.conf.sender, self.conf.receivers, self.message.as_string() )
session.quit()
@ -613,29 +613,29 @@ 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: <%s>' % 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 <%s>:' % host)
else:
print 'Executing command on *local* host:'
print ' %s' % str(command)
print('Executing command on *local* host:')
print(' %s' % str(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

@ -39,7 +39,7 @@ try:
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from email.mime.application import MIMEApplication
except ImportError, e:
except ImportError as e:
module = str(e).split()[-1]
@ -94,7 +94,7 @@ class ErrorMessage ( Exception ):
return
def terminate ( self ):
print self
print(self)
sys.exit(self._code)
@property
@ -122,7 +122,7 @@ class Command ( object ):
self.fdLog = fdLog
if self.fdLog != None and not isinstance(self.fdLog,file):
print '[WARNING] Command.__init__(): <fdLog> is neither None or a file.'
print('[WARNING] Command.__init__(): <fdLog> is neither None or a file.')
return
def _argumentsToStr ( self, arguments ):
@ -133,7 +133,7 @@ class Command ( object ):
return s
def log ( self, text ):
print text[:-1]
print(text[:-1])
sys.stdout.flush()
sys.stderr.flush()
if isinstance(self.fdLog,file):
@ -151,12 +151,12 @@ class Command ( object ):
if homeDir.startswith(homeDir):
workDir = '~' + workDir[ len(homeDir) : ]
user = 'root'
if os.environ.has_key('USER'): user = os.environ['USER']
if 'USER' in os.environ: user = os.environ['USER']
prompt = '%s@%s:%s$' % (user,conf.masterHost,workDir)
try:
self.log( '%s%s\n' % (prompt,self._argumentsToStr(self.arguments)) )
print self.arguments
print(self.arguments)
child = subprocess.Popen( self.arguments, stdout=subprocess.PIPE, stderr=subprocess.STDOUT )
while True:
@ -164,7 +164,7 @@ class Command ( object ):
if not line: break
self.log( line )
except OSError, e:
except OSError as e:
raise BadBinary( self.arguments[0] )
(pid,status) = os.waitpid( child.pid, 0 )
@ -251,12 +251,12 @@ class GitRepository ( object ):
def removeLocalRepo ( self ):
if os.path.isdir(self.localRepoDir):
print 'Removing Git local repository: <%s>' % self.localRepoDir
print('Removing Git local repository: <%s>' % 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 )
@ -321,12 +321,12 @@ class Configuration ( object ):
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 <%s> in Configuration.'%attribute ))
return
if attribute == 'masterHost' or attribute == '_masterHost':
if value == 'lepka':
print 'Never touch the Git tree when running on <lepka>.'
print('Never touch the Git tree when running on <lepka>.')
self._rmSource = False
self._rmBuild = False
self._doGit = False
@ -384,7 +384,7 @@ class Configuration ( object ):
while True:
logFile = os.path.join(self._logDir,"%s-%s-%02d.log" % (stem,timeTag,index))
if not os.path.isfile(logFile):
print "Report log: <%s>" % logFile
print("Report log: <%s>" % logFile)
break
index += 1
fd = open( logFile, "w" )
@ -490,7 +490,7 @@ class Report ( object ):
fd = open( logFile, 'rb' )
try:
fd.seek( -1024*100, os.SEEK_END )
except IOError, e:
except IOError as e:
pass
tailLines = ''
for line in fd.readlines()[1:]:
@ -509,8 +509,8 @@ class Report ( object ):
for attachement in self.attachements:
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(' <%s>' % receiver)
session = smtplib.SMTP( 'localhost' )
session.sendmail( self.conf.sender, self.conf.receivers, self.message.as_string() )
session.quit()
@ -594,29 +594,29 @@ 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: <%s>' % 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 <%s>:' % host)
else:
print 'Executing command on *local* host:'
print ' %s' % str(command)
print('Executing command on *local* host:')
print(' %s' % str(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

@ -39,7 +39,7 @@ try:
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from email.mime.application import MIMEApplication
except ImportError, e:
except ImportError as e:
module = str(e).split()[-1]
@ -94,7 +94,7 @@ class ErrorMessage ( Exception ):
return
def terminate ( self ):
print self
print(self)
sys.exit(self._code)
@property
@ -122,7 +122,7 @@ class Command ( object ):
self.fdLog = fdLog
if self.fdLog != None and not isinstance(self.fdLog,file):
print '[WARNING] Command.__init__(): <fdLog> is neither None or a file.'
print('[WARNING] Command.__init__(): <fdLog> is neither None or a file.')
return
def _argumentsToStr ( self, arguments ):
@ -133,7 +133,7 @@ class Command ( object ):
return s
def log ( self, text ):
print text[:-1]
print(text[:-1])
sys.stdout.flush()
sys.stderr.flush()
if isinstance(self.fdLog,file):
@ -151,12 +151,12 @@ class Command ( object ):
if homeDir.startswith(homeDir):
workDir = '~' + workDir[ len(homeDir) : ]
user = 'root'
if os.environ.has_key('USER'): user = os.environ['USER']
if 'USER' in os.environ: user = os.environ['USER']
prompt = '%s@%s:%s$' % (user,conf.masterHost,workDir)
try:
self.log( '%s%s\n' % (prompt,self._argumentsToStr(self.arguments)) )
print self.arguments
print(self.arguments)
child = subprocess.Popen( self.arguments, stdout=subprocess.PIPE, stderr=subprocess.STDOUT )
while True:
@ -164,7 +164,7 @@ class Command ( object ):
if not line: break
self.log( line )
except OSError, e:
except OSError as e:
raise BadBinary( self.arguments[0] )
(pid,status) = os.waitpid( child.pid, 0 )
@ -258,12 +258,12 @@ class GitRepository ( object ):
def removeLocalRepo ( self ):
if os.path.isdir(self.localRepoDir):
print 'Removing Git local repository: <%s>' % self.localRepoDir
print('Removing Git local repository: <%s>' % 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 )
@ -329,12 +329,12 @@ class Configuration ( object ):
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 <%s> in Configuration.'%attribute ))
return
if attribute == 'masterHost' or attribute == '_masterHost':
if value == 'lepka':
print 'Never touch the Git tree when running on <lepka>.'
print('Never touch the Git tree when running on <lepka>.')
self._rmSource = False
self._rmBuild = False
self._doGit = False
@ -393,7 +393,7 @@ class Configuration ( object ):
while True:
logFile = os.path.join(self._logDir,"%s-%s-%02d.log" % (stem,timeTag,index))
if not os.path.isfile(logFile):
print "Report log: <%s>" % logFile
print("Report log: <%s>" % logFile)
break
index += 1
fd = open( logFile, "w" )
@ -506,7 +506,7 @@ class Report ( object ):
fd = open( logFile, 'rb' )
try:
fd.seek( -1024*100, os.SEEK_END )
except IOError, e:
except IOError as e:
pass
tailLines = ''
for line in fd.readlines()[1:]:
@ -525,8 +525,8 @@ class Report ( object ):
for attachement in self.attachements:
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(' <%s>' % receiver)
session = smtplib.SMTP( 'localhost' )
session.sendmail( self.conf.sender, self.conf.receivers, self.message.as_string() )
session.quit()
@ -613,29 +613,29 @@ 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: <%s>' % 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 <%s>:' % host)
else:
print 'Executing command on *local* host:'
print ' %s' % str(command)
print('Executing command on *local* host:')
print(' %s' % str(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

@ -57,8 +57,8 @@ def guessOs ():
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: \"%s\"." % lines[0][:-1])
#print(" (using: \"%s\")" % osType)
return (osType,libDir)
@ -118,10 +118,10 @@ export PATH LD_LIBRARY_PATH PYTHONPATH BOOTSTRAP_TOP CORIOLIS_TOP MANGROVE_TOP;
hash -r
"""
print shellScript % { "PATH" : strippedPath
print(shellScript % { "PATH" : strippedPath
, "LD_LIBRARY_PATH" : strippedLibraryPath
, "PYTHONPATH" : strippedPythonPath
, "CORIOLIS_TOP" : sysCoriolisTop
, "MANGROVE_TOP" : mangroveTop
, "buildDir" : buildDir
}
})

View File

@ -57,7 +57,7 @@ class Refactor:
m = refactorPattern.match( line )
if m:
print "o:\"%s\" r:\"%s\"" % ( m.group("orig"), m.group("replace") )
print("o:\"%s\" r:\"%s\"" % ( m.group("orig"), m.group("replace") ))
self._addRefactor( m.group("orig"), m.group("replace") )
fd.close ()
return
@ -92,7 +92,7 @@ if __name__ == '__main__' :
allFiles += rfiles
for file in allFiles:
print file
print(file)
refactor.doFileRefactor( file )
sys.exit( 0 )

View File

@ -12,7 +12,7 @@ soPathName = sys.argv[1]
soFileName = os.path.basename( soPathName )
profName = soFileName + '.profile'
if not os.path.isfile(profName):
print '[ERROR] No profile datas <%s>.' % profName
print('[ERROR] No profile datas <%s>.' % profName)
sys.exit( 1 )
sprof = subprocess.Popen ( ['sprof'
@ -30,8 +30,8 @@ for line in sprof.stdout.readlines():
, stdout=subprocess.PIPE )
symbol = cppfilt.stdout.readlines()[0][:-1]
print m.group('head'), symbol
print(m.group('head'), symbol)
else:
print line[:-1]
print(line[:-1])
sys.exit( 0 )

View File

@ -13,8 +13,8 @@
&& ${DOXYGEN_EXECUTABLE} doxyfile
&& cp -f ${doxExtras} html
)
endif()
install ( DIRECTORY html/ DESTINATION ${htmlInstallDir} )
install ( DIRECTORY latex/ DESTINATION ${latexInstallDir} )
install ( FILES socbook.cls DESTINATION ${latexInstallDir} )
endif()

View File

@ -282,8 +282,10 @@ def staticInitialization ( quiet=True ):
elif coriolisTop:
sysConfDir = os.path.join(coriolisTop,'etc/coriolis2')
else:
raise ErrorMessage( 1, [ 'Cannot locate the directoty holding the configuration files.'
, 'The path is something ending by <.../etc/coriolis2>.'] )
import platformdirs
sysConfDir = os.path.join(platformdirs.user_config_dir(), 'coriolis2')
#raise ErrorMessage( 1, [ 'Cannot locate the directoty holding the configuration files.'
# , 'The path is something ending by <.../etc/coriolis2>.'] )
if not quiet: print( ' - "{}"'.format( sysConfDir ))
initTechno( quiet )
return
@ -308,8 +310,10 @@ def setSysConfDir ( quiet=False ):
elif coriolisTop:
sysConfDir = os.path.join(coriolisTop,'etc/coriolis2')
else:
raise ErrorMessage( 1, [ 'Cannot locate the directoty holding the configuration files.'
, 'The path is something ending by <.../etc/coriolis2>.'] )
import platformdirs
sysConfDir = os.path.join(platformdirs.user_config_dir(), 'coriolis2')
#raise ErrorMessage( 1, [ 'Cannot locate the directoty holding the configuration files.'
# , 'The path is something ending by <.../etc/coriolis2>.'] )
if not quiet: print( ' - "{}"'.format( sysConfDir ))
sys.path.append( sysConfDir )
return

View File

@ -36,7 +36,7 @@
add_definitions ( -DCORIOLIS_TOP="${CORIOLIS_TOP}"
-DSYS_CONF_DIR="${SYS_CONF_DIR}"
-DPYTHON_SITE_PACKAGES="${Python_SITELIB}"
-DPYTHON_SITE_PACKAGES="${PYTHON_SITE_PACKAGES}"
)
set ( includes crlcore/Utilities.h

View File

@ -31,7 +31,7 @@
${OA_LIBRARIES}
${QtX_LIBRARIES}
${Boost_LIBRARIES}
${Python_LIBRARIES}
${Python_LIBRARIES}
-lutil
${LIBXML2_LIBRARIES}
${BZIP2_LIBRARIES}

View File

@ -96,7 +96,7 @@
${HURRICANE_LIBRARIES}
${LEFDEF_LIBRARIES}
${QtX_LIBRARIES}
${Python3_LIBRARIES}
${Python_LIBRARIES}
-lutil
)

View File

@ -21,7 +21,7 @@
${OA_LIBRARIES}
${QtX_LIBRARIES}
${Boost_LIBRARIES}
${Python_LIBRARIES}
${Python_LIBRARIES}
-lutil
${LIBXML2_LIBRARIES}
${BZIP2_LIBRARIES}

View File

@ -15,7 +15,7 @@
set_cmake_policies()
setup_sysconfdir("${CMAKE_INSTALL_PREFIX}")
find_package(Python 3 REQUIRED COMPONENTS Interpreter Development)
find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module )
find_package(PythonSitePackages REQUIRED)
find_package(HURRICANE REQUIRED)
find_package(CORIOLIS REQUIRED)

View File

@ -16,7 +16,7 @@ try:
import Viewer
import CRL
import plugins.rsave
except Exception, e:
except Exception as e:
catch( e )
sys.exit(2)

View File

@ -34,7 +34,7 @@ try:
import helpers
from helpers import trace
from helpers.io import ErrorMessage
except ImportError, e:
except ImportError as e:
serror = str(e)
if serror.startswith('No module named'):
module = serror.split()[-1]
@ -46,7 +46,7 @@ except ImportError, e:
print( ' Under RHEL 6, you must be under devtoolset-2.' )
print( ' (scl enable devtoolset-2 bash)' )
sys.exit(1)
except Exception, e:
except Exception as e:
print( '[ERROR] A strange exception occurred while loading the basic Coriolis/Python' )
print( ' modules. Something may be wrong at Python/C API level.\n' )
print( ' {}'.format(e) )
@ -120,7 +120,7 @@ def px2mpx ( editor, pxCell ):
if pxCell == None:
raise ErrorMessage( 3, 'px2mpx.px2mpx(): Mandatory pxCell argument is None.' )
mpxCell = None
print '\nProcessing', pxCell
print('\nProcessing', pxCell)
UpdateSession.open()
try:
@ -163,7 +163,7 @@ def px2mpx ( editor, pxCell ):
layer = component.getLayer()
dupComponent = None
print ' Processing', component
print(' Processing', component)
if isinstance(component,Contact):
dupComponent = Contact.create( mpxNet
@ -183,21 +183,21 @@ def px2mpx ( editor, pxCell ):
if component.getSourceX() > component.getTargetX(): component.invert()
if isinstance(layer,RegularLayer):
if layer.getBasicLayer().getMaterial().getCode() == BasicLayer.Material.blockage:
print ' Blockage BB:%s vs. AB:%s' % (bb, ab)
print(' Blockage BB:%s vs. AB:%s' % (bb, ab))
if layer.getName()[-1] == '2' or layer.getName()[-1] == '4':
state = 0
if bb.getXMin() <= ab.getXMin(): state |= Left
if bb.getXMax() >= ab.getXMax(): state |= Right
if not (state&Left):
print ' Shrink left.'
print(' Shrink left.')
dLLeft = dL - DbU.fromLambda( 1.5 )
if not(state&Right):
print ' Shrink right.'
print(' Shrink right.')
dLRight = dL - DbU.fromLambda( 1.5 )
if layer.getName()[-1] == '4' and state == AllSpan:
print ' Skipping component.'
print(' Skipping component.')
skipComponent = True
width = mW
@ -213,9 +213,9 @@ def px2mpx ( editor, pxCell ):
, component.getDxSource()*2 - dLLeft
, component.getDxTarget()*2 + dLRight
)
print ' Copy:', dupComponent
print(' Copy:', dupComponent)
else:
print ' Horizontal component too small *or* skipped, not converted'
print(' Horizontal component too small *or* skipped, not converted')
elif isinstance(component,Vertical):
dL, dW, mW = getDeltas( component.getLayer() )
@ -245,7 +245,7 @@ def px2mpx ( editor, pxCell ):
if layer.getName()[-1] == '5':
if state == AllSpan:
print ' Skipping component.'
print(' Skipping component.')
skipComponent = True
else:
dLTop = DbU.fromLambda(120.0) - component.getDyTarget()*2
@ -263,20 +263,20 @@ def px2mpx ( editor, pxCell ):
, component.getDyTarget()*2 + dLTop
)
else:
print ' Vertical component too small *or* skipped, not converted'
print(' Vertical component too small *or* skipped, not converted')
else:
print '[WARNING] Unchanged component:', component
print('[WARNING] Unchanged component:', component)
if dupComponent and NetExternalComponents.isExternal( component ):
NetExternalComponents.setExternal( dupComponent )
if editor: editor.fit()
except ErrorMessage, e:
print e; errorCode = e.code
except Exception, e:
print '\n\n', e; errorCode = 1
except ErrorMessage as e:
print(e); errorCode = e.code
except Exception as e:
print('\n\n', e); errorCode = 1
traceback.print_tb(sys.exc_info()[2])
UpdateSession.close()
@ -297,7 +297,7 @@ def scriptMain ( **kw ):
editor = None
if kw.has_key('editor') and kw['editor']:
editor = kw['editor']
print ' o Editor detected, running in graphic mode.'
print(' o Editor detected, running in graphic mode.')
if pxCell == None: pxCell = editor.getCell()
if pxCell:
@ -306,7 +306,7 @@ def scriptMain ( **kw ):
pxlibDir = '/dsk/l1/jpc/alliance/Linux.slsoc6x/install/cells/pxlib'
if os.path.isdir(pxlibDir):
print ' o <%s> found.' % pxlibDir
print(' o <%s> found.' % pxlibDir)
for viewFile in os.listdir( pxlibDir ):
if viewFile == 'padreal.ap':
pxCell = framework.getCell( viewFile[:-3], CRL.Catalog.State.Views )
@ -323,7 +323,7 @@ def scriptMain ( **kw ):
mpxCell = px2mpx( editor, pxCell )
framework.saveCell( mpxCell, CRL.Catalog.State.Physical )
else:
print '[WARNING] <%s> not found.' % pxlibDir
print('[WARNING] <%s> not found.' % pxlibDir)
return 0

View File

@ -107,7 +107,7 @@ if __name__ == '__main__':
rcode = yosys.run( options.design, top=options.top )
except Exception, e:
except Exception as e:
catch( e )
sys.exit(2)

View File

@ -209,10 +209,10 @@ class Environment ( object ):
libPath, mode = libraryEntry
self.mbkEnv['MBK_CATA_LIB'].add( libPath, mode )
except Exception, e:
except Exception as e:
e = ErrorMessage( e )
e.addMessage( 'In %s:<Alliance> at index %d.' % (allianceFile,entryNo) )
print e
print(e)
self.mbkEnv[ 'LD_LIBRARY_PATH' ] = self.mbkEnv[ 'ALLIANCE_TOP' ] + '/lib'
return
@ -226,7 +226,7 @@ class Environment ( object ):
env = os.environ
for key in self.mbkEnv.keys():
if not self.mbkEnv[key]:
print WarningMessage( 'Environment variable <%s> is not set.' % key )
print(WarningMessage( 'Environment variable <%s> is not set.' % key ))
continue
env[ key ] = str(self.mbkEnv[ key ])
return env
@ -314,7 +314,7 @@ class ReportLog ( object ):
while True:
self._reportFile = "./%s-%s-%02d.log" % (self._reportBase,timeTag,index)
if not os.path.isfile(self._reportFile):
print "Report log: <%s>" % self._reportFile
print("Report log: <%s>" % self._reportFile)
break
index += 1
return
@ -353,31 +353,31 @@ def staticInitialization ():
symbol = 'allianceConfig'
if not os.path.isfile(confFile):
print '[ERROR] Missing mandatory Coriolis2 system file:'
print ' <%s>' % confFile
print('[ERROR] Missing mandatory Coriolis2 system file:')
print(' <%s>' % confFile)
sys.exit( 1 )
try:
print ' o Running configuration hook: Alliance.staticInitialization().'
print ' - Loading \"%s\".' % helpers.truncPath(confFile)
print(' o Running configuration hook: Alliance.staticInitialization().')
print(' - Loading \"%s\".' % helpers.truncPath(confFile))
exec( open(confFile).read() ) #, moduleGlobals )
except Exception, e:
print '[ERROR] An exception occured while loading the configuration file:'
print ' <%s>\n' % (confFile)
print ' You should check for simple python errors in this file.'
print ' Error was:'
print ' %s\n' % e
except Exception as e:
print('[ERROR] An exception occured while loading the configuration file:')
print(' <%s>\n' % (confFile))
print(' You should check for simple python errors in this file.')
print(' Error was:')
print(' %s\n' % e)
sys.exit( 1 )
if moduleGlobals.has_key(symbol):
env.load( moduleGlobals[symbol], confFile )
del moduleGlobals[symbol]
else:
print '[ERROR] Mandatory symbol <%s> is missing in system configuration file:' % symbol
print ' <%s>' % confFile
print('[ERROR] Mandatory symbol <%s> is missing in system configuration file:' % symbol)
print(' <%s>' % confFile)
sys.exit( 1 )
print
print()
return
@ -453,7 +453,7 @@ class Node ( EnvironmentWrapper ):
if self._dependencies == []:
raise ErrorMessage( 1, 'Node.setDefaultTargetName(): node is neither used nor have dependencies.' )
self.setTarget( self.getDependency(0)._targetName+'_'+self.toolName.lower() )
print WarningMessage( 'Node.setDefaultTargetName(): Node is not affected, using: <%s>' % self.targetName )
print(WarningMessage( 'Node.setDefaultTargetName(): Node is not affected, using: <%s>' % self.targetName ))
return
def addDependency ( self, dependency ):
@ -492,21 +492,21 @@ class Node ( EnvironmentWrapper ):
error = ErrorMessage( 1, 'File <%s> of node <%s> has not been created.'
% (self.fileName,self._targetName) )
if errorMessage:
print
for line in errorMessage: print line
print()
for line in errorMessage: print(line)
if hardStop:
raise error
else:
print error
print(error)
return
def isUptodate ( self ):
depsMTime = 0
#print ' Target: %-30s %d' % (self.fileName, self.mtime)
#print(' Target: %-30s %d' % (self.fileName, self.mtime))
for dependency in self.getDependencies():
dependency.checkFile()
depsMTime = max( depsMTime, dependency.mtime )
#print ' | Dep: %-31s %d' % (dependency.fileName, dependency.mtime)
#print(' | Dep: %-31s %d' % (dependency.fileName, dependency.mtime))
return depsMTime <= self.mtime
def setActive ( self ):
@ -522,7 +522,7 @@ class Node ( EnvironmentWrapper ):
if not isinstance(self,Source) \
and not isinstance(self,Probe) \
and not isinstance(self,Rule):
print 'Clean | %-30s| rm %s' % ( "<%s>"%self.ruleName, self.fileName )
print('Clean | %-30s| rm %s' % ( "<%s>"%self.ruleName, self.fileName ))
report.open()
report.write( 'Clean <%s>: (%s)\n' % (self.ruleName, self.fileName) )
@ -622,7 +622,7 @@ class Command ( Node ):
if self.isActive() and (not self.isUptodate() or flags & ForceRun):
if flags & ShowCommand:
print "Executing | %-30s%s" % (ruleName,Command.indent(command,42))
print("Executing | %-30s%s" % (ruleName,Command.indent(command,42)))
child = subprocess.Popen( command
, env=self.env.toSystemEnv()
, stdout=subprocess.PIPE
@ -639,7 +639,7 @@ class Command ( Node ):
if not line: break
if flags & ShowLog:
print "%s" % (line[:-1])
print("%s" % (line[:-1]))
sys.stdout.flush()
elif flags & ShowDots:
dots.dot()
@ -661,8 +661,8 @@ class Command ( Node ):
(pid,status) = os.waitpid(child.pid, 0)
status >>= 8
if status != 0:
print
for line in errorLines: print line
print()
for line in errorLines: print(line)
raise ErrorMessage( 1, "%s returned status:%d." % (self.toolName,status) )
if checkFile:
self.checkFile( hardStop=True, errorMessage=errorLines )
@ -670,7 +670,7 @@ class Command ( Node ):
if self.isActive(): action = 'Up to date'
else: action = 'Inactive'
if flags & ShowCommand:
print "%-10s| %-30s%s" % (action,ruleName,Command.indent(command,42))
print("%-10s| %-30s%s" % (action,ruleName,Command.indent(command,42)))
report.open()
report.write( '%s command:\n' % action )
@ -1443,23 +1443,23 @@ class Tools ( object ):
if node: node.setActive()
if commandFlags & ShowCommand and not (commandFlags & ShowLog):
print "==========+===============================+============================================"
print " ACTION | TARGET/RULE | COMMAND"
print "==========+===============================+============================================"
print("==========+===============================+============================================")
print(" ACTION | TARGET/RULE | COMMAND")
print("==========+===============================+============================================")
if doClean:
Node.allClean()
if commandFlags & ShowCommand and not (commandFlags & ShowLog):
print "----------+-------------------------------+--------------------------------------------"
print("----------+-------------------------------+--------------------------------------------")
for node in tool._staticOrder:
#for dep in node.getDependencies():
# print dep.name
# print dep.fileName
# print(dep.name)
# print(dep.fileName)
if not isinstance(node,Source) and not isinstance(node,Rule):
if node._run(): break
if commandFlags & ShowCommand and not (commandFlags & ShowLog):
print "----------+-------------------------------+--------------------------------------------"
print("----------+-------------------------------+--------------------------------------------")
return

View File

@ -219,8 +219,8 @@ def pyAlimVerticalRail ( cell, xcoord ) :
else :
raise ErrorMessage(2,"AlimVerticalRail : Strawberry.")
# print "Placement of vertical rail"
# print "Reference ", reference
# print("Placement of vertical rail")
# print("Reference ", reference)
power_cell = CRL.AllianceFramework.get().getCell ( "powmid_x0", CRL.Catalog.State.Views )
@ -1977,16 +1977,16 @@ def affichePad ( cell ) :
global pad_north, pad_south, pad_east, pad_west
print( "Pads in the north are :" )
for pad in pad_north : print cell.getInstance ( pad.getName() ).getMasterCell().getName()
for pad in pad_north : print(cell.getInstance ( pad.getName() ).getMasterCell().getName())
print( "Pads in the south are :" )
for pad in pad_south : print cell.getInstance ( pad.getName() ).getMasterCell().getName()
for pad in pad_south : print(cell.getInstance ( pad.getName() ).getMasterCell().getName())
print( "Pads in the east are :" )
for pad in pad_east : print cell.getInstance ( pad.getName() ).getMasterCell().getName()
for pad in pad_east : print(cell.getInstance ( pad.getName() ).getMasterCell().getName())
print( "Pads in the west are :" )
for pad in pad_west : print cell.getInstance ( pad.getName() ).getMasterCell().getName()
for pad in pad_west : print(cell.getInstance ( pad.getName() ).getMasterCell().getName())
############
def searchVddVss ( cell, *args ) :
@ -2108,7 +2108,7 @@ def createGrid ( my_tuple ) :
#_Xmax = None
#_Ymax = None
coreBox = cell.getInstance('core').getAbutmentBox()
#print coreBox
#print(coreBox)
_Xmin = coreBox.getXMin()
_Ymin = coreBox.getYMin()
_Xmax = coreBox.getXMax()
@ -2350,7 +2350,7 @@ def getNetInstances ( cell, net, transformation) :
_x = ins_transformation.getX ( segment.getSourceX(), segment.getSourceY() )
_y = ins_transformation.getY ( segment.getSourceX(), segment.getSourceY() )
#print ins, ":", segment, ",", nbSeg, ",", _x, ",", _y
#print(ins, ":", segment, ",", nbSeg, ",", _x, ",", _y)
nbSeg += 1
ck_contact_list_to_create.append ( (_x, _y) )
@ -2363,9 +2363,9 @@ def getNetInstances ( cell, net, transformation) :
Ymin = newbox.getYMin()
Xmax = newbox.getXMax()
Ymax = newbox.getYMax()
#print " placer contact in ", _x, " ", _y , " in the net ", plug.getMasterNet().getName() ,
#print " of instance ", plug.getInstance().getName() , " in ", Xmin , " ", Ymin ,
#print " of model ", plug.getInstance().getMasterCell().getName(), "\n"
#print(" placer contact in ", _x, " ", _y , " in the net ", plug.getMasterNet().getName())
#print(" of instance ", plug.getInstance().getName() , " in ", Xmin , " ", Ymin)
#print(" of model ", plug.getInstance().getMasterCell().getName(), "\n")
# Positionner la grille
if ( Xmin < _Xmin ) or ( _Xmin == None ) : _Xmin = Xmin

View File

@ -333,8 +333,8 @@ class Side ( object ):
# , height
# ) )
# if not connecteds:
# print WarningMessage( 'Cannot find a suitable connector for <%s> on pad <%s>'
# % (net.getName(),pad.getName()) )
# print(WarningMessage( 'Cannot find a suitable connector for <%s> on pad <%s>'
# % (net.getName(),pad.getName()) ))
#
# trace( 550, '-' )
# return
@ -348,7 +348,7 @@ class Side ( object ):
# and masterCell.getName() != self._corona.pvddeckName \
# and masterCell.getName() != self._corona.pvsseckName:
# continue
# #print 'Power pad:', pad
# #print('Power pad:', pad)
# self._createPowerContacts( pad, self._corona.vddi )
# self._createPowerContacts( pad, self._corona.vssi )
# if self._corona.useClockTree:
@ -1281,7 +1281,7 @@ class Corona ( object ):
# if not net:
# net = self.cell.getNet( masterNet.getName() )
# if not net:
# print ErrorMessage( 1, 'Missing global net <%s> at chip level.' % masterNet.getName() )
# print(ErrorMessage( 1, 'Missing global net <%s> at chip level.' % masterNet.getName() ))
# continue
#
# for component in masterNet.getExternalComponents():
@ -1297,17 +1297,17 @@ class Corona ( object ):
# self._powerRails.sort( key=itemgetter(2) )
#
# #for rail in self._powerRails:
# # print 'Pad rail %s @%d width:%d layer:%s' % ( str(rail[0].getName())
# # print('Pad rail %s @%d width:%d layer:%s' % ( str(rail[0].getName())
# # , DbU.toLambda(rail[2])
# # , DbU.toLambda(rail[3])
# # , str(rail[1].getName())
# # )
# # ))
# return
#
# def _guessPadHvLayers ( self ):
# if not self.powerPad:
# print ErrorMessage( 1, 'There must be at least one pad of model "%s" to guess the pad power terminals.' \
# % self.pvddick )
# print(ErrorMessage( 1, 'There must be at least one pad of model "%s" to guess the pad power terminals.' \
# % self.pvddick ))
# return False
#
# availableDepths = set()
@ -1316,7 +1316,7 @@ class Corona ( object ):
# if component.getBoundingBox().getYMin() <= masterCell.getAbutmentBox().getYMin():
# availableDepths.add( self.routingGauge.getLayerDepth(component.getLayer()) )
#
# #print 'available depth:', availableDepths
# #print('available depth:', availableDepths)
#
# self._horizontalPadDepth = 0
# self._verticalPadDepth = 0
@ -1328,8 +1328,8 @@ class Corona ( object ):
# if self.routingGauge.getLayerGauge(depth).getDirection() == RoutingLayerGauge.Vertical:
# self._verticalPadDepth = depth
#
# #print 'h:', self._horizontalPadDepth
# #print 'v:', self._verticalPadDepth
# #print('h:', self._horizontalPadDepth)
# #print('v:', self._verticalPadDepth)
# return

View File

@ -587,9 +587,9 @@ def computeAbutmentBox ( cell, spaceMargin, aspectRatio, cellGauge ):
# if math.trunc(columns) != columns: columns = math.trunc(columns) + 1
# else: columns = math.trunc(columns)
#
# print ' o Creating abutment box (margin:%.1f%%, aspect ratio:%.1f%%, g-length:%.1fl)' \
# % (spaceMargin*100.0,aspectRatio*100.0,(cellLength//sliceHeight))
# print ' - GCell grid: [%dx%d]' % (columns,rows)
# print(' o Creating abutment box (margin:%.1f%%, aspect ratio:%.1f%%, g-length:%.1fl)' \
# % (spaceMargin*100.0,aspectRatio*100.0,(cellLength//sliceHeight)))
# print(' - GCell grid: [%dx%d]' % (columns,rows))
UpdateSession.open()
etesian = Etesian.EtesianEngine.create( cell )

View File

@ -19,7 +19,7 @@
setup_boost(program_options)
setup_qt()
find_package(Python 3 REQUIRED COMPONENTS Interpreter Development)
find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module )
find_package(PythonSitePackages REQUIRED)
find_package(FLUTE REQUIRED)
find_package(HURRICANE REQUIRED)

View File

@ -14,8 +14,8 @@
&& ${DOXYGEN_EXECUTABLE} doxyfile
&& cp -f ${doxExtras} html
)
endif()
install ( DIRECTORY html/ DESTINATION ${htmlInstallDir} )
install ( DIRECTORY latex/ DESTINATION ${latexInstallDir} )
install ( FILES asimbook.cls DESTINATION ${latexInstallDir} )
endif()

View File

@ -19,7 +19,7 @@
setup_boost(program_options)
setup_qt()
find_package(Python 3 REQUIRED COMPONENTS Interpreter Development)
find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module )
find_package(PythonSitePackages REQUIRED)
find_package(FLUTE REQUIRED)
find_package(LEFDEF REQUIRED)

View File

@ -14,10 +14,10 @@
&& ${DOXYGEN_EXECUTABLE} doxyfile
&& cp -f ${doxExtras} html
)
endif()
install ( DIRECTORY html/ DESTINATION ${htmlInstallDir} )
install ( FILES ${doxExtras} DESTINATION ${htmlInstallDir} )
install ( DIRECTORY latex/ DESTINATION ${latexInstallDir} )
install ( FILES asimbook.cls DESTINATION ${latexInstallDir} )
endif()

View File

@ -15,7 +15,7 @@
setup_boost(program_options)
setup_qt()
find_package(Python 3 REQUIRED COMPONENTS Interpreter Development)
find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module )
find_package(PythonSitePackages REQUIRED)
find_package(HURRICANE REQUIRED)
find_package(CORIOLIS REQUIRED)

View File

@ -14,7 +14,7 @@
set_cmake_policies()
setup_boost()
find_package(Python 3 REQUIRED COMPONENTS Interpreter Development)
find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module )
find_package(PythonSitePackages REQUIRED)
find_package(HURRICANE REQUIRED)
find_package(CORIOLIS REQUIRED)

View File

@ -14,7 +14,7 @@
setup_boost(program_options)
setup_qt()
find_package(Python 3 REQUIRED COMPONENTS Interpreter Development)
find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module )
find_package(PythonSitePackages REQUIRED)
find_package(HURRICANE REQUIRED)
find_package(CORIOLIS REQUIRED)

View File

@ -18,7 +18,7 @@
setup_boost(program_options python)
find_package(LibXml2 REQUIRED)
find_package(Python 3 REQUIRED COMPONENTS Interpreter Development)
find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module )
find_package(PythonSitePackages REQUIRED)
find_package(BISON REQUIRED)
find_package(FLEX REQUIRED)

View File

@ -2,7 +2,7 @@
if(BUILD_DOC AND DOXYGEN_FOUND)
add_custom_target( doc ALL
cd ${VLSISAPD_SOURCE_DIR}/doc && ${DOXYGEN_EXECUTABLE} doxyfile )
endif()
install( DIRECTORY html/ DESTINATION share/doc/coriolis2/en/html/doc/vlsisapd )
install( DIRECTORY latex/ DESTINATION share/doc/coriolis2/en/latex/vlsisapd )
endif()

View File

@ -3,20 +3,20 @@ from decimal import Decimal
techno = Techno.readFromFile("./example.dtr.xml")
print "+-----------------------------+"
print "| technology: "+techno.get) + " |"
print "| units: "+techno.getUnit() +" |"
print "| version: "+techno.getVersion()+" |"
print "+-----------------------------+\n\n"
print("+-----------------------------+")
print("| technology: "+techno.get) + " |")
print("| units: "+techno.getUnit() +" |")
print("| version: "+techno.getVersion()+" |")
print("+-----------------------------+\n\n")
print "transistorMinL = %s"%techno.getValue("transistorMinL")
print "transistorMinW = %s"%Decimal(techno.getValueAsString("transistorMinW"))
print "minWidth of metal1 = %s"%techno.getValue("minWidth", "metal1")
print "minSpacing of metal1 = %s"%techno.getValue("minWidth", "metal1")
print "minSpacing of active vs poly = %s"%techno.getValue("minSpacing", "active", "poly")
print "minExtension active over poly = %s"%techno.getValue("minExtension", "poly", "active")
print "minArea of metal1 = %s"%techno.getValue("minArea", "metal1")
print("transistorMinL = %s"%techno.getValue("transistorMinL"))
print("transistorMinW = %s"%Decimal(techno.getValueAsString("transistorMinW")))
print("minWidth of metal1 = %s"%techno.getValue("minWidth", "metal1"))
print("minSpacing of metal1 = %s"%techno.getValue("minWidth", "metal1"))
print("minSpacing of active vs poly = %s"%techno.getValue("minSpacing", "active", "poly"))
print("minExtension active over poly = %s"%techno.getValue("minExtension", "poly", "active"))
print("minArea of metal1 = %s"%techno.getValue("minArea", "metal1"))
# an example of why it is important to use Decimal in python:
print techno.getValue("minArea", "metal1")*3-0.3 # returns 5.55111512313e-17
print Decimal(techno.getValueAsString("minArea", "metal1"))*3-Decimal('0.3') # returns 0.000
print(techno.getValue("minArea", "metal1")*3-0.3) # returns 5.55111512313e-17
print(Decimal(techno.getValueAsString("minArea", "metal1"))*3-Decimal('0.3')) # returns 0.000

View File

@ -4,20 +4,20 @@ library = Library.readFromFile("./testParse.lib")
if ( library ) :
# print of the library
print library
print(library)
# print of one attribute in particular of a cell
print "Area of inv_x1 :", library.getCell("inv_x1").getAttribute("area").valueAsString()
print "Timing intrinsic_rise of nq of inv_x1 :", library.getCell("inv_x1").getPin("nq").getTiming("i").getAttribute("intrinsic_rise").valueAsString()
print("Area of inv_x1 :", library.getCell("inv_x1").getAttribute("area").valueAsString())
print("Timing intrinsic_rise of nq of inv_x1 :", library.getCell("inv_x1").getPin("nq").getTiming("i").getAttribute("intrinsic_rise").valueAsString())
# print of all the attributes of a cell
print "Attributes of no2_x1 :"
print("Attributes of no2_x1 :")
for attr in library.getCell("no2_x1").getAttributes() :
print " name=", attr.key, \
", type=", attr.value.typeToString(), \
", value=", attr.value.valueAsString()
print(" name=", attr.key,
", type=", attr.value.typeToString(),
", value=", attr.value.valueAsString())
# print of all the timings of a pin
print "Timing's attributes of pin nq of no2_x1 :"
print("Timing's attributes of pin nq of no2_x1 :")
for timing in library.getCell("no2_x1").getPin("nq").getTimings() :
print timing
print(timing)
else :
raise ( "library is NULL" )

View File

@ -3,104 +3,104 @@ import sys
from SPICE import *
def printContents(circuit):
print "+", circuit.title
print("+", circuit.title)
if len(circuit.getIncludes()):
print "| + includes"
print("| + includes")
for include in circuit.getIncludes():
print "| |", include
print("| |", include)
if len(circuit.getLibraries()):
print "| + libraries"
print("| + libraries")
for (lib, typ) in circuit.getLibraries():
print "| |", lib, typ
print("| |", lib, typ)
if len(circuit.getParameters()):
print "| + parameters"
print("| + parameters")
for (name, value) in circuit.getParameters().items():
print "| | %s=%s"%(name, value)
print("| | %s=%s"%(name, value))
if len(circuit.getOptions()):
print "| + options"
print("| + options")
for (name, value) in circuit.getOptions().items():
print "| | %s=%s"%(name, value)
print("| | %s=%s"%(name, value))
if len(circuit.getSources()):
print "| + sources"
print("| + sources")
for source in circuit.getSources():
print "| |", source.getName(), source.getPositive(), source.getNegative(), source.getValue()
print("| |", source.getName(), source.getPositive(), source.getNegative(), source.getValue())
if len(circuit.getSubckts()):
print "| + subckts"
print("| + subckts")
for sub in circuit.getSubckts():
print "| | +", sub.getName(),
print("| | +", sub.getName())
for interf in sub.getInterfaces():
print interf,
print(interf)
if len(sub.getParameters()):
print "param:",
print("param:")
for (name, value) in sub.getParameters().items():
print "%s=%s"%(name,value),
print
print("%s=%s"%(name,value))
print()
for inst in sub.getInstances():
print "| | | +", inst.getName(),
print("| | | +", inst.getName())
if isinstance(inst, Mosfet):
print inst.getDrain(), inst.getGrid(), inst.getSource(), inst.getBulk(), inst.getModel(),
print(inst.getDrain(), inst.getGrid(), inst.getSource(), inst.getBulk(), inst.getModel())
i = 0
for (name, value) in inst.getParameters().items():
if i%6 == 0:
print
print "| | | | +",
print "%s=%s"%(name, value),
print()
print("| | | | +")
print("%s=%s"%(name, value))
i += 1
elif isinstance(inst, Resistor):
print inst.getFirst(), inst.getSecond(), inst.getValue(),
print(inst.getFirst(), inst.getSecond(), inst.getValue())
elif isinstance(inst, Capacitor):
print inst.getPositive(), inst.getNegative(), inst.getValue(),
print(inst.getPositive(), inst.getNegative(), inst.getValue())
else:
for conn in inst.getConnectors():
print conn,
print inst.getModel(),
print(conn)
print(inst.getModel())
i = 0
for (name, value) in inst.getParameters().items():
if i%6 == 0:
print
print "| | | | +",
print "%s=%s"%(name, value),
print()
print("| | | | +")
print("%s=%s"%(name, value))
i += 1
print
print()
if len(circuit.getInstances()):
print "| + instances"
print("| + instances")
for inst in circuit.getInstances():
print "| | | +", inst.getName(),
print("| | | +", inst.getName())
if isinstance(inst, Mosfet):
print inst.getDrain(), inst.getGrid(), inst.getSource(), inst.getBulk(), inst.getModel(),
print(inst.getDrain(), inst.getGrid(), inst.getSource(), inst.getBulk(), inst.getModel())
i = 0
for (name, value) in inst.getParameters().items():
if i%6 == 0:
print
print "| | | | +",
print "%s=%s"%(name, value),
print()
print("| | | | +")
print("%s=%s"%(name, value))
i += 1
elif isinstance(inst, Resistor):
print inst.getFirst(), inst.getSecond(), inst.getValue(),
print(inst.getFirst(), inst.getSecond(), inst.getValue())
elif isinstance(inst, Capacitor):
print inst.getPositive(), inst.getNegative(), inst.getValue(),
print(inst.getPositive(), inst.getNegative(), inst.getValue())
else:
for conn in inst.getConnectors():
print conn,
print inst.getModel(),
print(conn)
print(inst.getModel())
i = 0
for (name, value) in inst.getParameters().items():
if i%6 == 0:
print
print "| | | | +",
print "%s=%s"%(name, value),
print()
print("| | | | +")
print("%s=%s"%(name, value))
i += 1
print
print()
def usage():
print "usage:", sys.argv[0], "[filename]"
print("usage:", sys.argv[0], "[filename]")
sys.exit(48)
def main():

View File

@ -23,23 +23,23 @@ try:
import plugins.ClockTreePlugin
import plugins.ChipPlace
import plugins.RSavePlugin
except ImportError, e:
except ImportError as e:
serror = str(e)
if serror.startswith('No module named'):
module = serror.split()[-1]
print '[ERROR] The <%s> python module or symbol cannot be loaded.' % module
print ' Please check the integrity of the <coriolis> package.'
print('[ERROR] The <%s> python module or symbol cannot be loaded.' % module)
print(' Please check the integrity of the <coriolis> package.')
sys.exit(1)
if str(e).find('cannot open shared object file'):
library = serror.split(':')[0]
print '[ERROR] The <%s> shared library cannot be loaded.' % library
print ' Under RHEL 6, you must be under devtoolset-2.'
print ' (scl enable devtoolset-2 bash)'
print('[ERROR] The <%s> shared library cannot be loaded.' % library)
print(' Under RHEL 6, you must be under devtoolset-2.')
print(' (scl enable devtoolset-2 bash)')
sys.exit(1)
except Exception, e:
print '[ERROR] A strange exception occurred while loading the basic Coriolis/Python'
print ' modules. Something may be wrong at Python/C API level.\n'
print ' %s' % e
except Exception as e:
print('[ERROR] A strange exception occurred while loading the basic Coriolis/Python')
print(' modules. Something may be wrong at Python/C API level.\n')
print(' %s' % e)
sys.exit(2)
@ -97,8 +97,8 @@ def scriptMain ( **kw ):
plugins.RSavePlugin.scriptMain( **kw )
except Exception, e:
print helpers.io.catch( e )
except Exception as e:
print(helpers.io.catch( e ))
return success
@ -129,23 +129,23 @@ if __name__ == '__main__':
try:
module = __import__( options.script, globals(), locals() )
if not module.__dict__.has_key('scriptMain'):
print '[ERROR] Script module <%s> do not contains a ScripMain() function.' % options.script
print('[ERROR] Script module <%s> do not contains a ScripMain() function.' % options.script)
sys.exit(1)
cell = module.__dict__['scriptMain']( **kw )
kw['cell'] = cell
except ImportError, e:
except ImportError as e:
module = str(e).split()[-1]
print '[ERROR] The <%s> script cannot be loaded.' % module
print ' Please check your design hierarchy.'
print('[ERROR] The <%s> script cannot be loaded.' % module)
print(' Please check your design hierarchy.')
sys.exit(1)
except Exception, e:
print '[ERROR] A strange exception occurred while loading the Python'
print ' script <%s>. Please check that module for error:\n' % options.script
except Exception as e:
print('[ERROR] A strange exception occurred while loading the Python')
print(' script <%s>. Please check that module for error:\n' % options.script)
traceback.print_tb(sys.exc_info()[2])
print ' %s' % e
print(' %s' % e)
sys.exit(2)
elif options.cell:
kw['cell'] = framework.getCell( options.cell, CRL.Catalog.State.Views )

View File

@ -58,7 +58,7 @@
${QtX_LIBRARIES}
${Boost_LIBRARIES}
${LIBXML2_LIBRARIES}
${Python3_LIBRARIES}
${Python_LIBRARIES}
-lutil
${LIBEXECINFO_LIBRARIES}
)

View File

@ -33,7 +33,7 @@
${HURRICANE_PYTHON_LIBRARIES}
${HURRICANE_LIBRARIES}
${UTILITIES_LIBRARY}
${Python3_LIBRARIES}
${Python_LIBRARIES}
-lutil
)

View File

@ -13,8 +13,8 @@
&& ${DOXYGEN_EXECUTABLE} doxyfile
&& cp -f ${doxExtras} html
)
endif()
install ( DIRECTORY html/ DESTINATION ${htmlInstallDir} )
install ( DIRECTORY latex/ DESTINATION ${latexInstallDir} )
install ( FILES asimbook.cls DESTINATION ${latexInstallDir} )
endif()

View File

@ -13,8 +13,8 @@
&& ${DOXYGEN_EXECUTABLE} doxyfile
&& cp -f ${doxExtras} html
)
endif()
install ( DIRECTORY html/ DESTINATION ${htmlInstallDir} )
install ( DIRECTORY latex/ DESTINATION ${latexInstallDir} )
install ( FILES asimbook.cls DESTINATION ${latexInstallDir} )
endif()

View File

@ -13,8 +13,8 @@
&& ${DOXYGEN_EXECUTABLE} doxyfile
&& cp -f ${doxExtras} html
)
endif()
install ( DIRECTORY html/ DESTINATION ${htmlInstallDir} )
install ( DIRECTORY latex/ DESTINATION ${latexInstallDir} )
install ( FILES asimbook.cls DESTINATION ${latexInstallDir} )
endif()

View File

@ -167,7 +167,7 @@
)
set( depLibs hurricane
${Python3_LIBRARIES}
${Python_LIBRARIES}
${Boost_LIBRARIES}
)

View File

@ -109,7 +109,7 @@
${QtX_LIBRARIES}
${Boost_LIBRARIES}
${LIBXML2_LIBRARIES}
${Python3_LIBRARIES}
${Python_LIBRARIES}
-lutil
${LIBEXECINFO_LIBRARIES}
)

View File

@ -13,8 +13,8 @@
&& ${DOXYGEN_EXECUTABLE} doxyfile
&& cp -f ${doxExtras} html
)
endif()
install ( DIRECTORY html/ DESTINATION ${htmlInstallDir} )
install ( DIRECTORY latex/ DESTINATION ${latexInstallDir} )
install ( FILES asimbook.cls DESTINATION ${latexInstallDir} )
endif()

View File

@ -98,8 +98,8 @@ class VerticalRoutingTracks ( CapacitorStack ):
self.setRules ()
vRoutingTracksLayer = DataBase.getDB().getTechnology().getLayer("metal3" )
#print 'self.capacitorInstance.doMatrix:', self.capacitorInstance.doMatrix
#print 'self.capacitorsNumber:', self.capacitorsNumber
#print('self.capacitorInstance.doMatrix:', self.capacitorInstance.doMatrix)
#print('self.capacitorsNumber:', self.capacitorsNumber)
if self.capacitorInstance.doMatrix == True and self.capacitorsNumber > 1 :
self.minimizeVRTs()

View File

@ -52,16 +52,16 @@ def checkCoherency ( device, bbMode ):
columns = pmatrix.getColumns()
for row in range(rows):
#print ' [',
#print(' [')
for column in range(columns):
capaIndex = pmatrix.getValue(row,column)
#print '%2d' % capaIndex,
#print('%2d' % capaIndex)
if capaIndex >= capacities.getCount():
valid = False
message += ' element [%d,%d] == %d is out of range, must be in [0..%d]\n' \
% (row,column,capaIndex,capacities.getCount()-1)
#print ']'
#print(']')
if not valid: return (False, message)

View File

@ -1,44 +1,158 @@
[tool.poetry]
name = "Coriolis"
version = "0.0.0"
#[tool.poetry]
#name = "Coriolis"
#version = "0.0.0"
#description = "Place and Route for semiconductors"
#authors = ["Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>"]
#readme = "README.rst"
##build = "builder.py"
##packages = [
## { include = "Coriolis"}
##]
#[tool.poetry-dynamic-versioning]
#enable = true
##dirty = true
#vcs = "git"
##style = "pep440"
#metadata = "true"
##pattern = '''
## (?x)
## ^coriolis-((?P<epoch>\d+)!)?(?P<base>\d+(\.\d+)*)
## ([-._]?((?P<stage>[a-zA-Z]+)[-._]?(?P<revision>\d+)?))?
## (\+(?P<tagged_metadata>.+))?$
##'''
#[tool.poetry.dependencies]
#python = "^3.8"
#find-libpython = "^0.3.0"
#[tool.poetry.dev-dependencies]
#cmake = ">=3"
#ninja = "^1.11.1"
#[tool.poetry.scripts]
#blif2vst = 'Coriolis:blif2vst'
#tutorial = 'Coriolis:tutorial'
#unittests = 'Coriolis:unittests'
#yosys_coriolis = 'Coriolis:yosys_coriolis'
[project]
name = "coriolis"
version = "2.4.2"
#dynamic = ["version"]
description = "Place and Route for semiconductors"
authors = ["Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>"]
readme = "README.rst"
build = "builder.py"
packages = [
{ include = "Coriolis"}
authors = [
{ name = "Rémy ESCASSUT & Christian" },
{ name = "Christophe ALEXANDRE" },
{ name = "Sophie BELLOEIL" },
{ name = "Damien DUPUIS" },
{ name = "Jean-Paul CHAPUT", email="Jean-Paul.Chaput@lip6.fr" }
]
[tool.poetry-dynamic-versioning]
enable = true
dirty = true
vcs = "git"
style = "pep440"
metadata = "true"
pattern = '''
(?x)
^coriolis-((?P<epoch>\d+)!)?(?P<base>\d+(\.\d+)*)
([-._]?((?P<stage>[a-zA-Z]+)[-._]?(?P<revision>\d+)?))?
(\+(?P<tagged_metadata>.+))?$
'''
[tool.poetry.dependencies]
python = "^3.8"
find-libpython = "^0.3.0"
[tool.poetry.dev-dependencies]
cmake = ">=3"
ninja = "^1.11.1"
[tool.poetry.scripts]
blif2vst = 'Coriolis:blif2vst'
tutorial = 'Coriolis:tutorial'
unittests = 'Coriolis:unittests'
yosys_coriolis = 'Coriolis:yosys_coriolis'
readme = "README.rst"
long_description = """Coriolis provides several tools to perform the layout of VLSI circuits.
Its main components are the Hurricane database, the Etesian placer and
the Katana router, but other tools can use the Hurricane database and
the parsers provided.
"""
[build-system]
requires = ["poetry-core", "setuptools", "cmake", "ninja", "patchelf", "poetry-dynamic-versioning"]
build-backend = "poetry_dynamic_versioning.backend"
#requires = ["scikit-build-core","poetry-core", "cmake", "ninja", "patchelf", "poetry-dynamic-versioning"]
requires = ["scikit-build-core", "cmake", "ninja", "hatch-vcs"]
build-backend = "scikit_build_core.build"
[tool.hatch.version]
source = "vcs"
[tool.scikit-build.metadata]
# List dynamic metadata fields and hook locations in this table
#version.provider = "hatch_vcs"
[tool.scikit-build]
# The PEP 517 build hooks will add ninja and/or cmake if the versions on the
# system are not at least these versions. Disabled by an empty string.
cmake.minimum-version = "3.16"
ninja.minimum-version = "1.5"
# Fallback on gmake/make if available and ninja is missing (Unix). Will only
# fallback on platforms without a known ninja wheel.
ninja.make-fallback = true
# Extra args for CMake. Pip, unlike build, does not support lists, so semicolon
# can be used to separate. Setting this in config or envvar will override the
# entire list. See also cmake.define.
cmake.args = []
# This activates verbose builds
cmake.verbose = false
# This controls the CMake build type
cmake.build-type = "Release"
# Display logs at or above this level.
logging.level = "WARNING"
# Include and exclude patterns, in gitignore syntax. Include overrides exclude.
# Wheels include packages included in the sdist; CMake has the final say.
sdist.include = []
sdist.exclude = []
# Make reproducible SDists (Python 3.9+ and UNIX recommended). Respects
# SOURCE_DATE_EPOCH when true (the default).
sdist.reproducible = true
# The root-level packages to include. Special default: if not given, the package
# is auto-discovered if it's name matches the main name.
wheel.packages = ["coriolis"]
# Setting py-api to "cp37" would build ABI3 wheels for Python 3.7+. If CPython
# is less than this value, or on PyPy, this will be ignored. Setting the api to
# "py3" or "py2.py3" would build wheels that don't depend on Python (ctypes,
# etc).
wheel.py-api = ""
# Setting this to true will expand tags (universal2 will add Intel and Apple
# Silicon tags, for pip <21.0.1 compatibility).
wheel.expand-macos-universal-tags = false
# This allows you to change the install dir, such as to the package name. The
# original dir is still at SKBUILD_PLATLIB_DIR (also SKBUILD_DATA_DIR, etc. are
# available)
wheel.install-dir = "."
# The licence file(s) to include in the wheel metadata directory.
wheel.license-files = ["LICEN[CS]E*", "COPYING*", "NOTICE*", "AUTHORS*"]
# This will backport an internal copy of FindPython if CMake is less than this
# value. Set to 0 or the empty string to disable. The default will be kept in
# sync with the version of FindPython stored in scikit-build-core.
backport.find-python = ""
# This is the only editable mode currently
editable.mode = "redirect"
# Enable auto rebuilds on import (experimental)
editable.rebuild = false
# Display output on stderr while rebuilding on import
editable.verbose = true
# Enable experimental features if any are available
experimental = true #false
# Strictly validate config options
strict-config = true
# This provides some backward compatibility if set. Defaults to the latest
# scikit-build-core version.
minimum-version = "0.2" # current version
# Build directory (empty will use a temporary directory). {cache_tag} and
# {wheel_tag} are available to provide a unique directory per interpreter.
build-dir = ""
[tool.scikit-build.cmake.define]
# Put CMake defines in this table.
[tool.cibuildwheel.linux]
skip = ["cp36-*", "cp37-*", "pp*"]
@ -52,7 +166,7 @@ before-all = '''
boost-devel \
boost-python boost-filesystem \
boost-regex boost-wave \
python36-devel libxml2-devel \
python3-devel libxml2-devel \
qwt-devel
'''
build-verbosity=2

View File

@ -13,7 +13,6 @@
man_stratus.tex
see_also.tex
)
endif()
set ( htmlInstallDir share/doc/coriolis2/en/html/doc/ )
set ( latexInstallDir share/doc/coriolis2/en/latex/stratus_developper )
@ -25,3 +24,4 @@
${LATEX_OUTPUT_PATH}/stratus_developper.dvi
${LATEX_OUTPUT_PATH}/stratus_developper.pdf DESTINATION ${latexInstallDir} )
install ( DIRECTORY ${LATEX_OUTPUT_PATH}/stratus_developper DESTINATION ${htmlInstallDir} )
endif()

View File

@ -44,7 +44,6 @@
man_dpgenxnor2.tex
man_dpgenxor2.tex
)
endif()
set ( htmlInstallDir share/doc/coriolis2/en/html/doc/ )
set ( latexInstallDir share/doc/coriolis2/en/latex/dpgen )
@ -57,3 +56,4 @@
${LATEX_OUTPUT_PATH}/dpgen.dvi
${LATEX_OUTPUT_PATH}/dpgen.pdf DESTINATION ${latexInstallDir} )
install ( DIRECTORY ${LATEX_OUTPUT_PATH}/dpgen DESTINATION ${htmlInstallDir} )
endif()

View File

@ -7,7 +7,6 @@
CACHE STRING "Custom arguments passeds to latex2html" FORCE )
add_latex_document ( patterns.tex )
endif()
set ( htmlInstallDir share/doc/coriolis2/en/html/doc/ )
set ( latexInstallDir share/doc/coriolis2/en/latex/patterns )
@ -19,3 +18,4 @@
${LATEX_OUTPUT_PATH}/patterns.dvi
${LATEX_OUTPUT_PATH}/patterns.pdf DESTINATION ${latexInstallDir} )
install ( DIRECTORY ${LATEX_OUTPUT_PATH}/patterns DESTINATION ${htmlInstallDir} )
endif()

View File

@ -46,7 +46,6 @@
man_stratus.tex
see_also.tex
IMAGE_DIRS images )
endif()
set ( htmlInstallDir share/doc/coriolis2/en/html/doc/ )
set ( latexInstallDir share/doc/coriolis2/en/latex/stratus/ )
@ -58,3 +57,4 @@
${LATEX_OUTPUT_PATH}/stratus.dvi
${LATEX_OUTPUT_PATH}/stratus.pdf DESTINATION ${latexInstallDir} )
install ( DIRECTORY ${LATEX_OUTPUT_PATH}/stratus DESTINATION ${htmlInstallDir} )
endif()

View File

@ -13,8 +13,8 @@
&& ${DOXYGEN_EXECUTABLE} doxyfile
&& cp -f ${doxExtras} html
)
endif()
install ( DIRECTORY html/ DESTINATION ${htmlInstallDir} )
install ( DIRECTORY latex/ DESTINATION ${latexInstallDir} )
install ( FILES socbook.cls DESTINATION ${latexInstallDir} )
endif()

View File

@ -52,7 +52,7 @@ class Pathes ( object ):
def __init__ ( self, name ):
self.name = name
self.components = []
if os.environ.has_key(name):
if name in os.environ:
self.components = os.environ[name].split(':')
return
@ -72,9 +72,9 @@ class Pathes ( object ):
return
def show ( self ):
print ' %s:' % self.name
print(' %s:' % self.name)
for component in self.components:
print ' %s' % component
print(' %s' % component)
return
@ -86,38 +86,38 @@ if arch == 'x86_64' and os.path.exists('/usr/lib64'): libDir = '/lib64'
pythonSitePackages = os.path.join( *(distutils.sysconfig.get_python_lib(1).split('/')[-3:]) )
print ' ========================================'
print ' OS:\n %s' % osType
print(' ========================================')
print(' OS:\n %s' % osType)
scriptBinPath = os.path.abspath(os.path.dirname(sys.argv[0]))
print ' Script location:\n %s' % scriptBinPath
print(' Script location:\n %s' % scriptBinPath)
if scriptBinPath == '/usr/bin':
location = Location.BaseSystem
coriolisTop = '/usr'
print ' Using standard system installation scheme.'
print(' Using standard system installation scheme.')
elif scriptBinPath == '/soc/coriolis2/bin':
location = Location.Devtoolset2
coriolisTop = '/soc/coriolis2'
print ' Using RHEL6 installation scheme.'
print(' Using RHEL6 installation scheme.')
ldLibraryPath = os.getenv('LD_LIBRARY_PATH')
if not 'devtoolset' in ldLibraryPath:
print '[ERROR] You must enable the devtoolset-2 before running Coriolis:'
print ' > scl enable devtoolset-2 bash'
print('[ERROR] You must enable the devtoolset-2 before running Coriolis:')
print(' > scl enable devtoolset-2 bash')
sys.exit( 1 )
else:
location = Location.UserDefined
coriolisTop = truncPath( scriptBinPath, 0, -1 )
print ' Using User installation scheme.'
print(' Using User installation scheme.')
if location & Location.SetCoriolisTop:
os.environ['CORIOLIS_TOP'] = coriolisTop
print ' CORIOLIS_TOP:\n %s' % coriolisTop
print(' CORIOLIS_TOP:\n %s' % coriolisTop)
if location & Location.BaseSysconfDir:
sysConfDir = truncPath( coriolisTop, 0, -1 ) + '/etc/coriolis2'
else:
sysConfDir = coriolisTop + '/etc/coriolis2'
print ' Configuration directory:\n %s' % sysConfDir
print(' Configuration directory:\n %s' % sysConfDir)
os.environ['STRATUS_MAPPING_NAME'] = sysConfDir+'/stratus2sxlib.xml'
@ -153,14 +153,14 @@ if len(sys.argv) > 1 and sys.argv[1].startswith('--run='):
argvStart = 1
slaveScript = sys.argv[1][6:]
print ' Script:\n %s' % slaveScript
print ' ========================================'
print(' Script:\n %s' % slaveScript)
print(' ========================================')
try:
os.execvp( slaveScript, sys.argv[argvStart:] )
except Exception, e:
print '[ERROR] An exception occured while lauching <%s>\n' % slaveScript
print e
except Exception as e:
print('[ERROR] An exception occured while lauching <%s>\n' % slaveScript)
print(e)
sys.exit( 3 )
sys.exit( 0 )