Control: tags -1 + patch
Dear maintainer,
The attached patches port the build system to Python 3. The package seems to
build OK using them but I don't know enough about this package to test them
further and there are no autopkgtest tests to verify that the package is OK.
regards
Stuart
--
Stuart Prescott http://www.nanonanonano.net/ stu...@nanonanonano.net
Debian Developer http://www.debian.org/ stu...@debian.org
GPG fingerprint 90E2 D2C1 AD14 6A1B 7EBB 891D BBC1 7EBB 1396 F2F7
>From 67b33f9471a4df23d69d093a1f230b4fab8f8f93 Mon Sep 17 00:00:00 2001
From: Stuart Prescott <stu...@debian.org>
Date: Sat, 1 Feb 2020 01:14:04 +1100
Subject: [PATCH 1/3] Update dependencies to use Python 3
---
debian/control | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/debian/control b/debian/control
index 26d7580..5d9dc92 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: science
Priority: optional
Maintainer: Debian Science Maintainers <debian-science-maintain...@lists.alioth.debian.org>
Uploaders: Gilles Filippini <p...@debian.org>
-Build-Depends: debhelper (>= 9~), python, dh-python, libmedc-dev, libhdf5-mpi-dev, libmetis-dev, libscotch-dev,
+Build-Depends: debhelper (>= 9~), python3, dh-python, libmedc-dev, libhdf5-mpi-dev, libmetis-dev, libscotch-dev,
code-saturne-bin (>= 4.0.0) [!s390x], code-saturne-include (>= 4.0.0) [!s390x]
Standards-Version: 4.3.0
Homepage: https://www.edf.fr/en/the-edf-group/world-s-largest-power-company/activities/research-and-development/scientific-communities/simulation-softwares?logiciel=10818
@@ -12,7 +12,7 @@ Vcs-Git: https://salsa.debian.org/science-team/syrthes.git
Package: syrthes
Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, gcc, make
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${python3:Depends}, gcc, make
Recommends: syrthes-tools
Suggests: syrthes-gui, syrthes-tests, code-saturne
Description: Transient thermal simulations in complex solid geometries
@@ -35,7 +35,7 @@ Description: Transient thermal simulations in complex solid geometries - tools
Package: syrthes-tests
Architecture: all
-Depends: ${misc:Depends}, ${python:Depends}, python
+Depends: ${misc:Depends}, ${python3:Depends}, python3
Recommends: syrthes (>= 4.1.1~)
Description: Test cases for SYRTHES
SYRTHES is a general purpose thermal software developed at EDF R&D which
--
2.20.1
>From e80e93223da154ef5232f40639c88a1d745eb969 Mon Sep 17 00:00:00 2001
From: Stuart Prescott <stu...@debian.org>
Date: Sat, 1 Feb 2020 01:14:56 +1100
Subject: [PATCH 3/3] Use dh_python3 in build
---
debian/rules | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/debian/rules b/debian/rules
index 0319b14..3b0add7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -33,7 +33,7 @@ ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
endif
%:
- dh $@ --with python2
+ dh $@ --with python3
override_dh_auto_configure:
sed -i.orig src/syrthes-install/setup.ini \
@@ -74,5 +74,5 @@ override_dh_auto_install:
# Remove extra license file
rm arch/Debian/syrthes-gui/22x22/license
-override_dh_python2:
- dh_python2 -N syrthes-tests
+override_dh_python3:
+ dh_python3 -N syrthes-tests --shebang=/usr/bin/python3
--
2.20.1
>From f5f49a24a99edb2b0113eea3a9597d1d15508e65 Mon Sep 17 00:00:00 2001
From: Stuart Prescott <stu...@debian.org>
Date: Sat, 1 Feb 2020 01:14:38 +1100
Subject: [PATCH 2/3] Add patches to build with Python 3
---
debian/patches/python3-conf.patch | 243 +++++
debian/patches/python3.patch | 1667 +++++++++++++++++++++++++++++
debian/patches/series | 2 +
debian/patches/setup.patch | 14 +-
4 files changed, 1919 insertions(+), 7 deletions(-)
create mode 100644 debian/patches/python3-conf.patch
create mode 100644 debian/patches/python3.patch
diff --git a/debian/patches/python3-conf.patch b/debian/patches/python3-conf.patch
new file mode 100644
index 0000000..71a2f6a
--- /dev/null
+++ b/debian/patches/python3-conf.patch
@@ -0,0 +1,243 @@
+--- a/src/syrthes-install/config_env.py
++++ b/src/syrthes-install/config_env.py
+@@ -78,8 +78,8 @@
+ #
+ # syrthes.profile file update
+ #
+- print "!!! ",self.installPath+'/syrthes.profile_'+self.arch
+- profileFile = file(self.installPath+'/syrthes.profile_'+self.arch, mode='w')
++ print("!!! ",self.installPath+'/syrthes.profile_'+self.arch)
++ profileFile = open(self.installPath+'/syrthes.profile_'+self.arch, mode='w')
+
+ profileFile.write("""#!/bin/bash
+ #-----------------------------------------------------------------------
+@@ -121,8 +121,8 @@
+ """)
+
+ #profileFile.write("DEST_LIB="+self.installPath+'/../arch/'+self.arch+'lib'+"\n")
+- print "SYRTHES4_HOME="+self.syrthesDir+"/arch/"+self.arch
+- print "NOM_ARCH="+self.arch
++ print("SYRTHES4_HOME="+self.syrthesDir+"/arch/"+self.arch)
++ print("NOM_ARCH="+self.arch)
+ profileFile.write("SYRTHES4_HOME="+self.syrthesDir+"/arch/"+self.arch+"\n")
+ profileFile.write("NOM_ARCH="+self.arch+"\n")
+
+@@ -132,8 +132,8 @@
+ # LD_LIBRARY_PATH
+ #-----------------------------------------------------------
+ """)
+- for key in self.dicolib.keys():
+- if self.dicolib[key].has_key('PATH'):
++ for key in list(self.dicolib.keys()):
++ if 'PATH' in self.dicolib[key]:
+ line='LD_LIBRARY_PATH='+self.dicolib[key]['PATH']+'/lib:$LD_LIBRARY_PATH'
+ profileFile.write("#"+key+"\n")
+ profileFile.write(line)
+--- a/src/syrthes-install/config_makeFileIN.py
++++ b/src/syrthes-install/config_makeFileIN.py
+@@ -76,7 +76,7 @@
+ #
+ # Makefile.in file update
+ #
+- makefileinFile = file('Makefile.in', mode='w')
++ makefileinFile = open('Makefile.in', mode='w')
+
+ makefileinFile.write("""SHELL = /bin/sh
+ # ******************************************************
+@@ -109,37 +109,37 @@
+ PART_SCOTCH=no
+
+ """)
+- if self.dicolib['med'].has_key('PATH'):
++ if 'PATH' in self.dicolib['med']:
+ makefileinFile.write("MED=yes\n")
+ else :
+ makefileinFile.write("MED=no\n")
+
+- if self.dicolib['mpi'].has_key('PATH'):
++ if 'PATH' in self.dicolib['mpi']:
+ makefileinFile.write("MPI=yes\n")
+ else :
+ makefileinFile.write("MPI=no\n")
+
+- if self.dicolib['metis'].has_key('PATH'):
++ if 'PATH' in self.dicolib['metis']:
+ makefileinFile.write("PART_METIS=yes\n")
+ else :
+ makefileinFile.write("PART_METIS=no\n")
+
+- if self.dicolib['scotch'].has_key('PATH'):
++ if 'PATH' in self.dicolib['scotch']:
+ makefileinFile.write("PART_SCOTCH=yes\n")
+ else :
+ makefileinFile.write("PART_SCOTCH=no\n")
+
+- if self.dicospeci['specific_inc'].has_key('PATH'):
++ if 'PATH' in self.dicospeci['specific_inc']:
+ makefileinFile.write("INC += "+self.dicospeci['specific_inc']['PATH']+"\n")
+ else :
+ makefileinFile.write("INC=\n")
+
+- if self.dicospeci['specific_lib'].has_key('PATH'):
++ if 'PATH' in self.dicospeci['specific_lib']:
+ makefileinFile.write("LIB += "+self.dicospeci['specific_lib']['PATH']+"\n")
+ else :
+ makefileinFile.write("LIB=\n")
+
+- if self.dicospeci['specific_debug'].has_key('PATH'):
++ if 'PATH' in self.dicospeci['specific_debug']:
+ makefileinFile.write("DEBUG=yes\n")
+ makefileinFile.write("COPTIM= "+self.dicospeci['specific_debug']['PATH']+"\n")
+ else:
+@@ -175,7 +175,7 @@
+ endif
+
+ """)
+- if self.dicospeci['specific_option'].has_key('PATH'):
++ if 'PATH' in self.dicospeci['specific_option']:
+ makefileinFile.write("CFLAG += "+self.dicospeci['specific_option']['PATH']+"\n")
+
+ makefileinFile.write("""
+@@ -241,27 +241,27 @@
+ makefileinFile.write("endif\n"+"\n")
+
+ ## Library
+- if self.dicolib['metis'].has_key('PATH'):
++ if 'PATH' in self.dicolib['metis']:
+ makefileinFile.write("DIR_METIS="+self.dicolib['metis']['PATH']+"\n")
+
+- if self.dicolib['scotch'].has_key('PATH'):
++ if 'PATH' in self.dicolib['scotch']:
+ makefileinFile.write("DIR_SCOTCH="+self.dicolib['scotch']['PATH']+"\n")
+
+- if self.dicolib['med'].has_key('PATH'):
++ if 'PATH' in self.dicolib['med']:
+ makefileinFile.write("DIR_MED="+self.dicolib['med']['PATH']+"\n")
+
+- if self.dicolib['hdf5'].has_key('PATH'):
+- makefileinFile.write("DIR_HDF5="+self.dicolib['hdf5']['PATH']+"\n")
+-
+- makefileinFile.write("\nifeq ($(CFD),yes)\n")
+- if self.dicolib['ple'].has_key('PATH'):
+- makefileinFile.write(" DIR_PLE="+self.dicolib['ple']['PATH']+"\n")
+- makefileinFile.write("endif\n")
++ if 'PATH' in self.dicolib['hdf5']:
++ makefileinFile.write("DIR_HDF5="+self.dicolib['hdf5']['PATH']+"\n")
++
++ makefileinFile.write("\nifeq ($(CFD),yes)\n")
++ if 'PATH' in self.dicolib['ple']:
++ makefileinFile.write(" DIR_PLE="+self.dicolib['ple']['PATH']+"\n")
++ makefileinFile.write("endif\n")
+
+ makefileinFile.write("\nifeq ($(BLAS),yes)\n")
+- if self.dicolib['blas'].has_key('PATH'):
+- makefileinFile.write(" DIR_BLAS="+self.dicolib['blas']['PATH']+"\n")
+- makefileinFile.write("endif\n"+"\n")
++ if 'PATH' in self.dicolib['blas']:
++ makefileinFile.write(" DIR_BLAS="+self.dicolib['blas']['PATH']+"\n")
++ makefileinFile.write("endif\n"+"\n")
+
+
+ makefileinFile.write("""
+@@ -326,12 +326,12 @@
+
+ # If metis or scotch are used
+ # ---------------------------
+- if self.dicolib['metis'].has_key('PATH'):
++ if 'PATH' in self.dicolib['metis']:
+
+ makefileinFile.write("LIBMETIS=-L $(DIR_METIS)/lib -lmetis\n")
+ makefileinFile.write("INC_METIS=-I$(DIR_METIS)/include\n")
+
+- if self.dicolib['scotch'].has_key('PATH'):
++ if 'PATH' in self.dicolib['scotch']:
+
+ makefileinFile.write("LIBSCOTCH=-L $(DIR_SCOTCH)/lib -lscotch -L $(DIR_SCOTCH)/lib -lscotcherr\n")
+ makefileinFile.write("INC_SCOTCH=-I$(DIR_SCOTCH)/include\n")
+@@ -345,7 +345,7 @@
+ #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+
+- makefileinFile = file('Makefile2.in', mode='w')
++ makefileinFile = open('Makefile2.in', mode='w')
+
+ makefileinFile.write("""SHELL = /bin/sh
+ # ******************************************************
+@@ -377,37 +377,37 @@
+ PART_METIS=no
+ PART_SCOTCH=no
+ """)
+- if self.dicolib['med'].has_key('PATH'):
++ if 'PATH' in self.dicolib['med']:
+ makefileinFile.write("MED=yes\n")
+ else :
+ makefileinFile.write("MED=no\n")
+
+- if self.dicolib['mpi'].has_key('PATH'):
++ if 'PATH' in self.dicolib['mpi']:
+ makefileinFile.write("MPI=yes\n")
+ else :
+ makefileinFile.write("MPI=no\n")
+
+- if self.dicolib['metis'].has_key('PATH'):
++ if 'PATH' in self.dicolib['metis']:
+ makefileinFile.write("PART_METIS=yes\n")
+ else :
+ makefileinFile.write("PART_METIS=no\n")
+
+- if self.dicolib['scotch'].has_key('PATH'):
++ if 'PATH' in self.dicolib['scotch']:
+ makefileinFile.write("PART_SCOTCH=yes\n")
+ else :
+ makefileinFile.write("PART_SCOTCH=no\n")
+
+- if self.dicospeci['specific_inc'].has_key('PATH'):
++ if 'PATH' in self.dicospeci['specific_inc']:
+ makefileinFile.write("INC += -I"+self.dicospeci['specific_inc']['PATH']+"\n")
+ else :
+ makefileinFile.write("INC=\n")
+
+- if self.dicospeci['specific_lib'].has_key('PATH'):
++ if 'PATH' in self.dicospeci['specific_lib']:
+ makefileinFile.write("LIB += -L"+self.dicospeci['specific_lib']['PATH']+"\n")
+ else :
+ makefileinFile.write("LIB=\n")
+
+- if self.dicospeci['specific_debug'].has_key('PATH'):
++ if 'PATH' in self.dicospeci['specific_debug']:
+ makefileinFile.write("DEBUG=yes\n")
+ makefileinFile.write("COPTIM= "+self.dicospeci['specific_debug']['PATH']+"\n")
+ else:
+@@ -443,7 +443,7 @@
+
+
+ """)
+- if self.dicospeci['specific_option'].has_key('PATH'):
++ if 'PATH' in self.dicospeci['specific_option']:
+ makefileinFile.write("CFLAG += "+self.dicospeci['specific_option']['PATH']+"\n")
+
+ makefileinFile.write("""
+@@ -499,18 +499,18 @@
+ ## Compiler CC whith out mpi
+ makefileinFile.write("ifeq ($(MPI),no)\n")
+ makefileinFile.write(" CC="+self.comp+"\n")
+- makefileinFile.write("endif\n"+"\n")
++ makefileinFile.write("endif\n"+"\n")
+
+ ## Library
+- makefileinFile.write("\nifeq ($(CFD),yes)\n")
+- if self.dicolib['ple'].has_key('PATH'):
++ makefileinFile.write("\nifeq ($(CFD),yes)\n")
++ if 'PATH' in self.dicolib['ple']:
+ makefileinFile.write(" DIR_PLE="+self.dicolib['ple']['PATH']+"\n")
+ makefileinFile.write("endif\n")
+
+ makefileinFile.write("\nifeq ($(BLAS),yes)\n")
+- if self.dicolib['blas'].has_key('PATH'):
++ if 'PATH' in self.dicolib['blas']:
+ makefileinFile.write(" DIR_BLAS="+self.dicolib['blas']['PATH']+"\n")
+- makefileinFile.write("endif\n"+"\n")
++ makefileinFile.write("endif\n"+"\n")
+
+
+ makefileinFile.write("""
diff --git a/debian/patches/python3.patch b/debian/patches/python3.patch
new file mode 100644
index 0000000..869f76b
--- /dev/null
+++ b/debian/patches/python3.patch
@@ -0,0 +1,1667 @@
+--- a/src/syrthes-install/syrthes_install.py
++++ b/src/syrthes-install/syrthes_install.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ #-----------------------------------------------------------------------
+ #
+@@ -107,76 +107,76 @@
+
+ # builds the Lib for SYRTHES
+ self.installFunctions={'blas' : self.installBLAS,
+- 'hdf5' : self.installHDF,
+- 'med' : self.installMED,
+- 'mpi' : self.installMPI,
+- 'metis' : self.installMETIS,
+- 'scotch' : self.installSCOTCH,
+- 'ple' : self.installple,
+- 'profile' : self.installprofile,
+- 'syrthesseq' : self.installsyrthesseq,
+- 'syrthesconvert': self.installconvert,
+- 'syrthesensight': self.installensight,
+- 'syrthesmed' : self.installmed,
+- 'syrthesppfunc' : self.installppfunc,
+- 'syrthesmpi' : self.installsyrthesmpi,
+- 'syrthespp' : self.installpp,
+- 'syrthespost' : self.installpost,
+- 'syrthescfd' : self.installsyrthescfd}
+- # builds the SYRTHES Lib
++ 'hdf5' : self.installHDF,
++ 'med' : self.installMED,
++ 'mpi' : self.installMPI,
++ 'metis' : self.installMETIS,
++ 'scotch' : self.installSCOTCH,
++ 'ple' : self.installple,
++ 'profile' : self.installprofile,
++ 'syrthesseq' : self.installsyrthesseq,
++ 'syrthesconvert': self.installconvert,
++ 'syrthesensight': self.installensight,
++ 'syrthesmed' : self.installmed,
++ 'syrthesppfunc' : self.installppfunc,
++ 'syrthesmpi' : self.installsyrthesmpi,
++ 'syrthespp' : self.installpp,
++ 'syrthespost' : self.installpost,
++ 'syrthescfd' : self.installsyrthescfd}
++ # builds the SYRTHES Lib
+
+ # Locate syrthes-install dir-name, extern-libraries/src and extern-libraries/opt
+ self.installPath = os.path.dirname(os.getcwd())+'/'
+- self.syrthesDir = os.path.dirname(os.path.dirname(os.getcwd()))
++ self.syrthesDir = os.path.dirname(os.path.dirname(os.getcwd()))
+ self.destPath = self.syrthesDir+'/arch/'
+
+ self.libSourceDir=self.syrthesDir+'/extern-libraries/src'
+ self.libDestOpt=self.syrthesDir+'/extern-libraries/opt'
+ self.build = self.syrthesDir+'/build'
+-
+- print ('Creating Destination Directories ')
++
++ print ('Creating Destination Directories ')
+
+ if os.path.isdir(self.build):
+ shutil.rmtree(self.build)
+- shutil.os.mkdir(self.build )
++ shutil.os.mkdir(self.build )
+
+ # Creating 'arch' Directories
+ if (not os.path.isdir(self.destPath)):
+- shutil.os.mkdir(self.destPath)
+-
+- self.readSetup()
+-
+- print '------------------------------'
+- for lib in ['blas','hdf5','med','mpi','metis','scotch']:
+- if self.dicolib[lib]['USE'].upper()=='YES':
+- if self.dicolib[lib].has_key('PATH'):
+- print 'You have chosen to use your own '+lib+' extern libraries'
+- elif os.path.isdir(self.libDestOpt) :
+- print 'Extern libraries directory is already existing, continue.'
+- else:
+- shutil.os.mkdir(self.libDestOpt )
+-
+-
+- print "-------------------------------------------"
+- print "-- Creating destination directory structure:"
+- print "-- arch - %s - bin\n -- %s - include\n -- %s - lib\n -- %s - share"%(self.arch, ' '*len(self.arch),' '*len(self.arch),' '*len(self.arch))
+- print "-------------------------------------------"
++ shutil.os.mkdir(self.destPath)
++
++ self.readSetup()
++
++ print('------------------------------')
++ for lib in ['blas','hdf5','med','mpi','metis','scotch']:
++ if self.dicolib[lib]['USE'].upper()=='YES':
++ if 'PATH' in self.dicolib[lib]:
++ print('You have chosen to use your own '+lib+' extern libraries')
++ elif os.path.isdir(self.libDestOpt) :
++ print('Extern libraries directory is already existing, continue.')
++ else:
++ shutil.os.mkdir(self.libDestOpt )
++
++
++ print("-------------------------------------------")
++ print("-- Creating destination directory structure:")
++ print("-- arch - %s - bin\n -- %s - include\n -- %s - lib\n -- %s - share"%(self.arch, ' '*len(self.arch),' '*len(self.arch),' '*len(self.arch)))
++ print("-------------------------------------------")
+
+ # Parallele compilation with make -jN
+- if self.dicospeci['specific_makej'].has_key('PATH'):
++ if 'PATH' in self.dicospeci['specific_makej']:
+ self.makeopt=self.dicospeci['specific_makej']['PATH']
+- print " "
+- print "-------------------------------------------"
+- print "-- Parallele compilation with make"+self.makeopt
+- print "-------------------------------------------"
+- print " "
++ print(" ")
++ print("-------------------------------------------")
++ print("-- Parallele compilation with make"+self.makeopt)
++ print("-------------------------------------------")
++ print(" ")
+ else:
+ self.makeopt=" "
+
+ archPath = self.destPath+self.arch
+ if os.path.isdir(archPath) :
+- shutil.rmtree(archPath)
+-
++ shutil.rmtree(archPath)
++
+ os.system('mkdir %s'%archPath )
+ os.chdir(archPath)
+ os.system('mkdir bin include lib share')
+@@ -185,25 +185,25 @@
+
+ # Begin installing libraries
+ # Install libraries when self.dicolib[libraryName]['INSTALL'].upper()=='YES'
+- self.install = {}
+- listToInstall = self.listLib + self.listSat
+-
+- for library in listToInstall:
+- if (self.dicolib[library].has_key('INSTALL') and self.dicolib[library]['INSTALL'].upper()=='YES'):
+- apply(self.installFunctions[library])
++ self.install = {}
++ listToInstall = self.listLib + self.listSat
++
++ for library in listToInstall:
++ if ('INSTALL' in self.dicolib[library] and self.dicolib[library]['INSTALL'].upper()=='YES'):
++ self.installFunctions[library]()
+ else:
+- print '- %syou ve chosen not to install "%s" %s'%(bellecouleur.BLEU,library,bellecouleur.NORMAL)
++ print('- %syou ve chosen not to install "%s" %s'%(bellecouleur.BLEU,library,bellecouleur.NORMAL))
+
+ # creating profile file syrthes.profile and Makefile, before installing syrthes...
+ self.installprofile()
+-
++
+ # installing syrthes executable...
+ for library in self.listSYR :
+- if (self.dicolib[library].has_key('INSTALL') and self.dicolib[library]['INSTALL'].upper()=='YES'):
+- apply(self.installFunctions[library])
++ if ('INSTALL' in self.dicolib[library] and self.dicolib[library]['INSTALL'].upper()=='YES'):
++ self.installFunctions[library]()
+ else:
+- print '- %syou ve chosen not to install "%s" %s'%(bellecouleur.BLEU,library,bellecouleur.NORMAL)
+-
++ print('- %syou ve chosen not to install "%s" %s'%(bellecouleur.BLEU,library,bellecouleur.NORMAL))
++
+ # copying files to destination directories
+ self.copyFiles()
+ # copying headers in the include folder
+@@ -211,11 +211,11 @@
+ self.cleaningFiles()
+
+ # installing GUI
+- if (self.dicolib['gui'].has_key('INSTALL') and self.dicolib['gui']['INSTALL'].upper()=='YES'):
++ if ('INSTALL' in self.dicolib['gui'] and self.dicolib['gui']['INSTALL'].upper()=='YES'):
+ self.installGUI()
+ else:
+- print '- %syou ve chosen not to install "%s" %s'%(bellecouleur.BLEU,'gui',bellecouleur.NORMAL)
+-
++ print('- %syou ve chosen not to install "%s" %s'%(bellecouleur.BLEU,'gui',bellecouleur.NORMAL))
++
+ # make a report of the installation
+ os.chdir(self.installPath+'/syrthes-install')
+ self.report()
+@@ -223,17 +223,17 @@
+ resume.write('End time: '+endTime+'\n')
+ resume.write('\n')
+ resume.close()
+-
++
+ # Delete file
+ try:
+- os.remove('ERREUR.log')
+- except:
+- print "NO file ERREUR.log"
+-
+- try:
+- os.remove(tmp)
++ os.remove('ERREUR.log')
+ except:
+- pass
++ print("NO file ERREUR.log")
++
++ try:
++ os.remove(tmp)
++ except:
++ pass
+ ft = open('tmp','w')
+ ft.write(' \n')
+ ft.write(' **************************************\n')
+@@ -241,7 +241,7 @@
+ ft.write(' **************************************\n')
+ ft.write(' \n')
+ ft.close()
+- os.system("env >> tmp")
++ os.system("env >> tmp")
+ os.system("cat resume tmp > tmp2; mv tmp2 resume; rm tmp")
+
+ os.system("grep -i erreur resume > ERREUR.log")
+@@ -252,51 +252,51 @@
+ vide=open("ERREUR.log",'r')
+ lecture = vide.readlines()
+ N_lignes = len(lecture)
+- vide.close()
+-
++ vide.close()
++
+ # End Message
+ if N_lignes == 0 :
+- print ""
+- print "----------------------------------------------------------"
+- print "Before using SYRTHES, each user must"+bellecouleur.BLEU+" source"+bellecouleur.NORMAL
+- print "the"+bellecouleur.BLEU+" "+self.syrthesDir+"/arch/"+self.arch+"/bin/syrthes.profile"+bellecouleur.NORMAL+" file before using the code."
+- print ""
+- print "The easiest way is to put the following lines in each of the users"
+- print bellecouleur.BLEU+" '.profile'"+bellecouleur.NORMAL+" or "+bellecouleur.BLEU+"'.bashrc'"+bellecouleur.NORMAL+" (depending on the shell)"
+- print ""
+- print "syrthesprofile="+self.syrthesDir+"/arch/"+self.arch+"/bin/syrthes.profile"
+- print "#(adjust path to your system)"
+- print "if [ -f $syrthesprofile ] ; then "
+- print " . $syrthesprofile"
+- print "fi"
+- print ""
+- print "---------------------------------------------------------"
+- print ""
+- print bellecouleur.ROUGE+'Thank you for choosing SYRTHES'+bellecouleur.NORMAL
++ print("")
++ print("----------------------------------------------------------")
++ print("Before using SYRTHES, each user must"+bellecouleur.BLEU+" source"+bellecouleur.NORMAL)
++ print("the"+bellecouleur.BLEU+" "+self.syrthesDir+"/arch/"+self.arch+"/bin/syrthes.profile"+bellecouleur.NORMAL+" file before using the code.")
++ print("")
++ print("The easiest way is to put the following lines in each of the users")
++ print(bellecouleur.BLEU+" '.profile'"+bellecouleur.NORMAL+" or "+bellecouleur.BLEU+"'.bashrc'"+bellecouleur.NORMAL+" (depending on the shell)")
++ print("")
++ print("syrthesprofile="+self.syrthesDir+"/arch/"+self.arch+"/bin/syrthes.profile")
++ print("#(adjust path to your system)")
++ print("if [ -f $syrthesprofile ] ; then ")
++ print(" . $syrthesprofile")
++ print("fi")
++ print("")
++ print("---------------------------------------------------------")
++ print("")
++ print(bellecouleur.ROUGE+'Thank you for choosing SYRTHES'+bellecouleur.NORMAL)
+ else :
+- print ""
+- print "---------------------------------------------------------"
+- print "Before using SYRTHES, each user must"+bellecouleur.BLEU+" source"+bellecouleur.NORMAL
+- print "the"+bellecouleur.BLEU+" "+self.syrthesDir+"/arch/"+self.arch+"/bin/syrthes.profile"+bellecouleur.NORMAL+" file before using the code."
+- print ""
+- print "The easiest way is to put the following lines in each of the users"
+- print bellecouleur.BLEU+" '.profile'"+bellecouleur.NORMAL+" or "+bellecouleur.BLEU+"'.bashrc'"+bellecouleur.NORMAL+" (depending on the shell)"
+- print ""
+- print "syrthesprofile="+self.syrthesDir+"/arch/"+self.arch+"/bin/syrthes.profile"
+- print "#(adjust path to your system)"
+- print "if [ -f $syrthesprofile ] ; then "
+- print " . $syrthesprofile"
+- print "fi"
+- print ""
+- print "---------------------------------------------------------"
+- print "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
+- print bellecouleur.ROUGE+"Warning : installation of some composants failed"+bellecouleur.NORMAL
+- print "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
+- print "Check log files for more information...."
+- print ""
++ print("")
++ print("---------------------------------------------------------")
++ print("Before using SYRTHES, each user must"+bellecouleur.BLEU+" source"+bellecouleur.NORMAL)
++ print("the"+bellecouleur.BLEU+" "+self.syrthesDir+"/arch/"+self.arch+"/bin/syrthes.profile"+bellecouleur.NORMAL+" file before using the code.")
++ print("")
++ print("The easiest way is to put the following lines in each of the users")
++ print(bellecouleur.BLEU+" '.profile'"+bellecouleur.NORMAL+" or "+bellecouleur.BLEU+"'.bashrc'"+bellecouleur.NORMAL+" (depending on the shell)")
++ print("")
++ print("syrthesprofile="+self.syrthesDir+"/arch/"+self.arch+"/bin/syrthes.profile")
++ print("#(adjust path to your system)")
++ print("if [ -f $syrthesprofile ] ; then ")
++ print(" . $syrthesprofile")
++ print("fi")
++ print("")
++ print("---------------------------------------------------------")
++ print("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
++ print(bellecouleur.ROUGE+"Warning : installation of some composants failed"+bellecouleur.NORMAL)
++ print("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
++ print("Check log files for more information....")
++ print("")
++
+
+
+-
+
+
+
+@@ -318,20 +318,20 @@
+ #
+ # Init
+ #
+- print "Reading setup file"
++ print("Reading setup file")
+ self.dicolib = {}
+ self.dicospeci = {}
+-
++
+ self.libraries = []
+- # Graphical user Interface
+- self.listGui = ['gui']
++ # Graphical user Interface
++ self.listGui = ['gui']
+ # Archtecture and C compilateur
+ self.listDef = ['specific_inc','specific_lib','specific_debug','specific_option', 'specific_makej']
+ # Lib for SYRTHES BLAS, METIS, SCOTCH, MPI, MED, HDF
+ self.listLib = ['blas','hdf5','med','mpi','metis','scotch']
+ # Lib for coupling with Code_Saturne
+ self.listSat = ['ple']
+- # Lib SYRTHES sequential, tool,user functions, parallele, preprocessor, post, syrthescfd
++ # Lib SYRTHES sequential, tool,user functions, parallele, preprocessor, post, syrthescfd
+ self.listSYR = ['syrthesconvert','syrthesensight','syrthesmed', 'syrthesppfunc', 'syrthespp', 'syrthespost', 'syrthesseq', 'syrthesmpi', 'syrthescfd']
+
+ list_lib = self.listGui + self.listLib + self.listSat + self.listSYR
+@@ -342,14 +342,14 @@
+ self.dicospeci[ele] = {}
+ #
+ try:
+- setupFile = file('setup.ini', mode='r')
++ setupFile = open('setup.ini', mode='r')
+ except IOError:
+- print 'Error : opening setup file'
++ print('Error : opening setup file')
+ sys.exit(1)
+ #
+- print '\n--------------------------------------------------'
+- print '%s Installation of SYRTHES %s'%(bellecouleur.BLEU,bellecouleur.NORMAL)
+- print '--------------------------------------------------'
++ print('\n--------------------------------------------------')
++ print('%s Installation of SYRTHES %s'%(bellecouleur.BLEU,bellecouleur.NORMAL))
++ print('--------------------------------------------------')
+ #
+ self.comp = 'gcc'
+ self.compcx = 'g++'
+@@ -357,12 +357,12 @@
+
+ lines = setupFile.readlines()
+ for line in lines:
+- ## Comment in file "setup"
+- if (line[0] == '#' or len(line[0])==0) :
+- pass
++ ## Comment in file "setup"
++ if (line[0] == '#' or len(line[0])==0) :
++ pass
+ else:
+- # splitlines necessary to get rid of carriage return on IRIX64
+- line = line.splitlines()
++ # splitlines necessary to get rid of carriage return on IRIX64
++ line = line.splitlines()
+
+ listopt = line[0].split("=")
+ list = line[0].split()
+@@ -374,88 +374,88 @@
+ # rajouter une cle dicolib avec Use = YESn INSTALL=NO, PATH=list(1)
+ self.dicospeci[listopt[0]]['PATH'] = listopt[1]
+ self.dicospeci[listopt[0]]['USE'] = 'YES'
+-
+- # Screen out Begin
+- print " Specific : %s %s %s " %(bellecouleur.VERT,listopt[1],bellecouleur.NORMAL)
++
++ # Screen out Begin
++ print(" Specific : %s %s %s " %(bellecouleur.VERT,listopt[1],bellecouleur.NORMAL))
+ #-------------------------------------------------------------------------------
+ # Screen out End
+-
+- # Architecture Name in file "setup"
+- elif list[0]=='nom_arch' :
+- try:
+- self.arch = list[1]
+- except:
+- arch = os.uname()[0]
+- if arch=='Linux' :
+- if os.uname()[4]== 'x86_64' :
+- arch = arch+'_'+'x86_64'
+- elif os.uname()[4]== 'ia64' :
+- arch = arch+'_'+'IA64'
++
++ # Architecture Name in file "setup"
++ elif list[0]=='nom_arch' :
++ try:
++ self.arch = list[1]
++ except:
++ arch = os.uname()[0]
++ if arch=='Linux' :
++ if os.uname()[4]== 'x86_64' :
++ arch = arch+'_'+'x86_64'
++ elif os.uname()[4]== 'ia64' :
++ arch = arch+'_'+'IA64'
+ else :
+ arch = arch+'_'+os.uname()[4]
+- self.arch = arch
+-
+- # Screen out Begin
+- print " Architecture Name : %s %s %s " %(bellecouleur.VERT,self.arch,bellecouleur.NORMAL)
++ self.arch = arch
++
++ # Screen out Begin
++ print(" Architecture Name : %s %s %s " %(bellecouleur.VERT,self.arch,bellecouleur.NORMAL))
+ #-------------------------------------------------------------------------------
+- # Screen out End
+-
+- # C compiler in file "setup"
+- elif list[0]=='compC' :
++ # Screen out End
++
++ # C compiler in file "setup"
++ elif list[0]=='compC' :
+ if len(list)!=1:
+ name = list[1]
+- else:
++ else:
+ name = 'gcc'
+- self.comp = name
+-
+- # Screen out Begin
+- print " C compiler : %s %s %s " %(bellecouleur.VERT,self.comp,bellecouleur.NORMAL)
++ self.comp = name
++
++ # Screen out Begin
++ print(" C compiler : %s %s %s " %(bellecouleur.VERT,self.comp,bellecouleur.NORMAL))
+ #-------------------------------------------------------------------------------
+- # Screen out End
++ # Screen out End
+
+- # C++ compiler in file "setup"
+- elif list[0]=='compCX' :
++ # C++ compiler in file "setup"
++ elif list[0]=='compCX' :
+ if len(list)!=1:
+ name = list[1]
+- else:
++ else:
+ name = 'g++'
+- self.compcx = name
+-
+- # Screen out Begin
+- print " C++ compiler : %s %s %s " %(bellecouleur.VERT,self.comp,bellecouleur.NORMAL)
++ self.compcx = name
++
++ # Screen out Begin
++ print(" C++ compiler : %s %s %s " %(bellecouleur.VERT,self.comp,bellecouleur.NORMAL))
+ #-------------------------------------------------------------------------------
+- # Screen out End
+-
+- # C++ compiler in file "setup"
+- elif list[0]=='wrapperC' :
++ # Screen out End
++
++ # C++ compiler in file "setup"
++ elif list[0]=='wrapperC' :
+ if len(list)!=1:
+ name = list[1]
+- else:
++ else:
+ name = 'mpicc'
+- self.wrapperc = name
+-
+- # Screen out Begin
+- print " C wrapper : %s %s %s " %(bellecouleur.VERT,self.comp,bellecouleur.NORMAL)
++ self.wrapperc = name
++
++ # Screen out Begin
++ print(" C wrapper : %s %s %s " %(bellecouleur.VERT,self.comp,bellecouleur.NORMAL))
+ #-------------------------------------------------------------------------------
+- # Screen out End
+-
+- # Extern Lib in file "setup"
++ # Screen out End
++
++ # Extern Lib in file "setup"
+ # find keys in file
+- else :
++ else :
+ name = list[0]
+ list = list[1:]
+ for l in list:
+- [key,val] = l.split('=')
+- self.dicolib[name][key] = val
+-
++ [key,val] = l.split('=')
++ self.dicolib[name][key] = val
++
+ # Screen out Begin
+- print "-----------------------------------------------------------"
+- print " externe libraries : -"
+- print "-----------------------------------------------------------"
++ print("-----------------------------------------------------------")
++ print(" externe libraries : -")
++ print("-----------------------------------------------------------")
+ for key in self.listLib:
+- print " %s %s %s:"%(bellecouleur.VERT,key, bellecouleur.NORMAL)
+- for k in self.dicolib[key]:
+- print " %s %s %s : %s" %(k, bellecouleur.VERT, bellecouleur.NORMAL, self.dicolib[key][k])
++ print(" %s %s %s:"%(bellecouleur.VERT,key, bellecouleur.NORMAL))
++ for k in self.dicolib[key]:
++ print(" %s %s %s : %s" %(k, bellecouleur.VERT, bellecouleur.NORMAL, self.dicolib[key][k]))
+ # Screen out End
+
+
+@@ -470,27 +470,27 @@
+ def installMETIS(self):
+ #
+ #
+- nameLib, buildPath, optPath, srcPath = self.unzipLib('metis')
+-
+- self.printResume('metis')
++ nameLib, buildPath, optPath, srcPath = self.unzipLib('metis')
++
++ self.printResume('metis')
+
+ if (os.path.isdir(optPath+'/arch/'+self.arch)) :
+ shutil.rmtree(optPath+'/arch/'+self.arch)
+
+- error = os.system("make config prefix="+optPath+'/arch/'+self.arch+" && make "+self.makeopt+" && make install 2>&1 | tee "+nameLib+".log")
++ error = os.system("make config prefix="+optPath+'/arch/'+self.arch+" && make "+self.makeopt+" && make install 2>&1 | tee "+nameLib+".log")
+
+
+ if error != 0 :
+- print "Error during make install of "+nameLib
++ print("Error during make install of "+nameLib)
+ sys.exit(1)
+
+ # Clean the lib
+ os.system('make clean')
+
+- # cleaning source directory
+- shutil.rmtree(self.libSourceDir+'/TMP/'+nameLib)
++ # cleaning source directory
++ shutil.rmtree(self.libSourceDir+'/TMP/'+nameLib)
+
+- print 'metisINSTALL', error
++ print('metisINSTALL', error)
+ self.dicolib['metis']['PATH'] = optPath+'/arch/'+self.arch
+ self.dicolib['metis']['INSTALL'] = 'OK'
+ os.chdir(self.installPath)
+@@ -508,9 +508,9 @@
+ def installSCOTCH(self):
+ #
+ #
+- nameLib, buildPath, optPath, srcPath = self.unzipLib('scotch')
+-
+- self.printResume('scotch')
++ nameLib, buildPath, optPath, srcPath = self.unzipLib('scotch')
++
++ self.printResume('scotch')
+
+ os.chdir(srcPath+nameLib+'/src')
+
+@@ -521,28 +521,28 @@
+ #file("./Makefile.inc","w").write(modif)
+
+ if os.path.exists(optPath) == False:
+- os.mkdir(optPath, 0755)
+- os.mkdir(optPath+'/arch', 0755)
+- os.mkdir(optPath+'/arch/'+self.arch, 0755)
++ os.mkdir(optPath, 0o755)
++ os.mkdir(optPath+'/arch', 0o755)
++ os.mkdir(optPath+'/arch/'+self.arch, 0o755)
+ elif os.path.exists(optPath+'/arch/'+self.arch) == False:
+- os.mkdir(optPath+'/arch/'+self.arch, 0755)
++ os.mkdir(optPath+'/arch/'+self.arch, 0o755)
+ elif os.path.exists(optPath+'/arch/'+self.arch) == True:
+ shutil.rmtree(optPath+'/arch/'+self.arch)
+- os.mkdir(optPath+'/arch/'+self.arch, 0755)
++ os.mkdir(optPath+'/arch/'+self.arch, 0o755)
+
+- error = os.system("make scotch && make "+self.makeopt+" install prefix="+optPath+'/arch/'+self.arch+" 2>&1 | tee "+nameLib+".log")
++ error = os.system("make scotch && make "+self.makeopt+" install prefix="+optPath+'/arch/'+self.arch+" 2>&1 | tee "+nameLib+".log")
+
+ if error != 0 :
+- print "Error during make install of "+nameLib
++ print("Error during make install of "+nameLib)
+ sys.exit(1)
+
+ # Clean the lib
+ os.system('make clean')
+
+- # cleaning source directory
+- shutil.rmtree(self.libSourceDir+'/TMP/'+nameLib)
++ # cleaning source directory
++ shutil.rmtree(self.libSourceDir+'/TMP/'+nameLib)
+
+- print 'scotchINSTALL', error
++ print('scotchINSTALL', error)
+ self.dicolib['scotch']['PATH'] = optPath+'/arch/'+self.arch
+ self.dicolib['scotch']['INSTALL'] = 'OK'
+ os.chdir(self.installPath)
+@@ -560,38 +560,38 @@
+ #
+ #
+ nameLib, buildPath, optPath, srcPath = self.unzipLib('mpi')
+- self.printResume('mpi')
+-
+- print " "
+- print " "
+- print " "
+- print " - debug-------------------------------------------------------------- "
+- print buildPath+'/configure --prefix='+optPath+'/arch/'+self.arch+' CC=\"'+self.comp+'\"'+' CXX=\"'+self.compcx+'\"'
+- print " - debug-------------------------------------------------------------- "
+- print " "
+- print " "
+- print " "
+-
+- error = os.system(srcPath+nameLib+'/configure --prefix='+optPath+'/arch/'+self.arch +
+- ' CC=\"'+self.comp+'\"'+' CXX=\"'+self.compcx+'\"')
+-
++ self.printResume('mpi')
++
++ print(" ")
++ print(" ")
++ print(" ")
++ print(" - debug-------------------------------------------------------------- ")
++ print(buildPath+'/configure --prefix='+optPath+'/arch/'+self.arch+' CC=\"'+self.comp+'\"'+' CXX=\"'+self.compcx+'\"')
++ print(" - debug-------------------------------------------------------------- ")
++ print(" ")
++ print(" ")
++ print(" ")
++
++ error = os.system(srcPath+nameLib+'/configure --prefix='+optPath+'/arch/'+self.arch +
++ ' CC=\"'+self.comp+'\"'+' CXX=\"'+self.compcx+'\"')
++
+ if error != 0 :
+- print "Error during configure of "+nameLib
++ print("Error during configure of "+nameLib)
+ sys.exit(1)
+
+ error = os.system('make '+self.makeopt+' all')
+ error = os.system('make install')
+
+ if error != 0 :
+- print "Error during make install of "+nameLib
++ print("Error during make install of "+nameLib)
+ sys.exit(1)
+
+ os.system('make clean')
+-
+- # cleaning source directory
+- shutil.rmtree(self.libSourceDir+'/TMP/'+nameLib)
+
+- print 'MPIINSTALL', error
++ # cleaning source directory
++ shutil.rmtree(self.libSourceDir+'/TMP/'+nameLib)
++
++ print('MPIINSTALL', error)
+
+ self.dicolib['mpi']['PATH'] = optPath+'/arch/'+self.arch
+ self.dicolib['mpi']['INSTALL'] = 'OK'
+@@ -611,31 +611,31 @@
+ def installHDF(self):
+ #
+ #
+- nameLib, buildPath, optPath, srcPath = self.unzipLib('hdf')
+- self.printResume('hdf')
++ nameLib, buildPath, optPath, srcPath = self.unzipLib('hdf')
++ self.printResume('hdf')
+
+ error = os.system(srcPath+nameLib+'/configure --prefix='+optPath+'/arch/'+self.arch+' CC=\"'+self.comp+'\"')
+-
+-
++
++
+ error = os.system('make')
+ if error != 0 :
+- print "Error during make install of "+nameLib
++ print("Error during make install of "+nameLib)
+ sys.exit(1)
+ error = os.system('make '+self.makeopt+' install')
+ if error != 0 :
+- print "Error during make install of "+nameLib
++ print("Error during make install of "+nameLib)
+ sys.exit(1)
+- os.system('make clean')
+-
+- # cleaning source directory
+- shutil.rmtree(self.libSourceDir+'/TMP/'+nameLib)
+-
+- print 'HDF5INSTALL', error
++ os.system('make clean')
++
++ # cleaning source directory
++ shutil.rmtree(self.libSourceDir+'/TMP/'+nameLib)
++
++ print('HDF5INSTALL', error)
+
+ self.dicolib['hdf5']['PATH'] = optPath+'/arch/'+self.arch
+ self.dicolib['hdf5']['INSTALL'] = 'OK'
+ os.chdir(self.installPath)
+-
++
+
+
+
+@@ -649,7 +649,7 @@
+ #----------------------------------------------------------------------------
+ def installMED(self):
+ #MED Installing needs HDF5INSTALL
+- if self.dicolib['hdf5'].has_key('PATH'):
++ if 'PATH' in self.dicolib['hdf5']:
+ hdfPath = self.dicolib['hdf5']['PATH']
+ else:
+ self.installHDF()
+@@ -657,22 +657,22 @@
+ hdfPath = self.dicolib['hdf5']['PATH']
+
+ withHdf = ''
+- if self.dicolib['hdf5'].has_key('USE') and self.dicolib['hdf5']['USE'].upper()=='YES':
++ if 'USE' in self.dicolib['hdf5'] and self.dicolib['hdf5']['USE'].upper()=='YES':
+ withHdf = ' --with-hdf5='+hdfPath
+- #
+- nameLib, buildPath, optPath, srcPath = self.unzipLib('med')
+- self.printResume('med')
+-
++ #
++ nameLib, buildPath, optPath, srcPath = self.unzipLib('med')
++ self.printResume('med')
++
+ ## configure commande See
+- error = os.system(srcPath+nameLib+'/configure --prefix='+optPath+'/arch/'+self.arch+withHdf+' CC=\"'+self.comp+'\"')
+-
+- error = os.system('make '+self.makeopt+' install')
++ error = os.system(srcPath+nameLib+'/configure --prefix='+optPath+'/arch/'+self.arch+withHdf+' CC=\"'+self.comp+'\"')
++
++ error = os.system('make '+self.makeopt+' install')
+ if error != 0 :
+- print "Error during make install of "+nameLib
++ print("Error during make install of "+nameLib)
+ sys.exit(1)
+
+ os.system('make clean')
+- print 'MEDINSTALL', error
++ print('MEDINSTALL', error)
+ self.dicolib['med']['PATH'] = optPath+'/arch/'+self.arch
+ self.dicolib['med']['INSTALL'] = 'OK'
+
+@@ -688,25 +688,25 @@
+ def installBLAS(self):
+ #
+ #
+- nameLib, buildPath, optPath, srcPath = self.unzipLib('blas')
+- self.printResume('blas')
+-
++ nameLib, buildPath, optPath, srcPath = self.unzipLib('blas')
++ self.printResume('blas')
++
+ error = os.system(srcPath+'/configure --prefix='+optPath+'/arch/'+self.arch+' -b 32')
+ if error != 0 :
+- print "Error during configure of "+nameLib
++ print("Error during configure of "+nameLib)
+ sys.exit(1)
+
+ error = os.system('make install')
+ if error != 0 :
+- print "Error during make install of "+nameLib
++ print("Error during make install of "+nameLib)
+ sys.exit(1)
+
+- print 'blasINSTALL', error
++ print('blasINSTALL', error)
+
+ self.dicolib['blas']['PATH'] = optPath+'/arch/'+self.arch
+ self.dicolib['blas']['INSTALL'] = 'OK'
+ os.chdir(self.installPath)
+-
++
+
+
+
+@@ -719,23 +719,23 @@
+ os.chdir(self.installPath)
+ fileProfileName = '/syrthes.profile'
+ destPath = self.destPath+self.arch+'/bin'
+- #
++ #
+ nameLib = 'profile'
+ self.printResume(nameLib)
+-
+- Setupsyrthesprofile.configuration(self,self)
++
++ Setupsyrthesprofile.configuration(self,self)
+ shutil.move(self.installPath+fileProfileName+'_'+self.arch, destPath+fileProfileName)
+ os.chdir(destPath)
+ os.system('chmod +x '+destPath+fileProfileName)
+- print "source "+destPath+fileProfileName
+- os.environ['SYRTHES4_HOME']=self.syrthesDir
+-
++ print("source "+destPath+fileProfileName)
++ os.environ['SYRTHES4_HOME']=self.syrthesDir
++
+ os.chdir(self.installPath)
+- print "Configure file Makefile.in for installation"
++ print("Configure file Makefile.in for installation")
+ Setupmakefilein.configuration_make(self,self)
+ #
+ os.chdir(self.installPath+'/syrthes-install')
+-
++
+
+
+
+@@ -745,29 +745,29 @@
+ #----------------------------------------------------------------------------
+ def installsyrthesseq(self):
+ nameLib = 'syrthesseq'
+- print '\nInstallation of '+nameLib+' on architecture '+self.arch+'\n'
+- #
++ print('\nInstallation of '+nameLib+' on architecture '+self.arch+'\n')
++ #
+ destPath=self.syrthesDir+'/arch/'+self.arch+'/lib'
+
+ try:
+- os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo '* Installation syrthesseq *' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
+- os.chdir(self.installPath)
+- os.system("cat "+nameLib+".log >>"+self.installPath+"/syrthes-install/resume")
++ os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo '* Installation syrthesseq *' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
++ os.chdir(self.installPath)
++ os.system("cat "+nameLib+".log >>"+self.installPath+"/syrthes-install/resume")
+ except:
+- print "Error during make of "+nameLib
+-
++ print("Error during make of "+nameLib)
++
+ #destPath
+- print("make syrthesseq NOM_ARCH="+self.arch+" SYRTHES4_HOME='"+self.syrthesDir+"' 2>&1 | tee "+nameLib+".log")
++ print(("make syrthesseq NOM_ARCH="+self.arch+" SYRTHES4_HOME='"+self.syrthesDir+"' 2>&1 | tee "+nameLib+".log"))
+ error = os.system("make "+self.makeopt+" syrthesseq NOM_ARCH="+self.arch+" SYRTHES4_HOME="+self.syrthesDir+" 2>&1 | tee "+nameLib+".log")
+ if error != 0 :
+- print "Error during make install of "+nameLib
++ print("Error during make install of "+nameLib)
+ sys.exit(1)
+-
+- print 'syrthesseqINSTALL', error
++
++ print('syrthesseqINSTALL', error)
+ os.system('mv %s/* %s'%(self.build,destPath))
+
+ os.chdir(self.installPath)
+@@ -783,29 +783,29 @@
+ #
+ nameLib = 'syrthesconvert'
+ #
+- print '\n %s Installation of convert2syrthes4 on architecture %s %s'%(bellecouleur.VERT,self.arch,bellecouleur.NORMAL)
+- #
++ print('\n %s Installation of convert2syrthes4 on architecture %s %s'%(bellecouleur.VERT,self.arch,bellecouleur.NORMAL))
++ #
+
+ try:
+- os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo '* Installation convert *' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
+- os.chdir(self.installPath)
+- os.system("cat "+nameLib+".log >>"+self.installPath+"/syrthes-install/resume")
++ os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo '* Installation convert *' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
++ os.chdir(self.installPath)
++ os.system("cat "+nameLib+".log >>"+self.installPath+"/syrthes-install/resume")
+ except:
+- print "Error during make of "+nameLib
+-
++ print("Error during make of "+nameLib)
++
+ error = os.system("make "+self.makeopt+" syrthesconvert NOM_ARCH="+self.arch+" SYRTHES4_HOME="+self.syrthesDir+" 2>&1 | tee "+nameLib+".log")
+ if error != 0 :
+- print "Error during make install of "+nameLib
++ print("Error during make install of "+nameLib)
+ sys.exit(1)
+-
+- print 'syrthesconvert INSTALL', error
++
++ print('syrthesconvert INSTALL', error)
+
+ os.chdir(self.installPath)
+-
++
+
+
+
+@@ -817,29 +817,29 @@
+ #
+ nameLib = 'syrthesensight'
+ #
+- print '\n %s Installation of syrthes4ensight on architecture %s %s'%(bellecouleur.VERT,self.arch,bellecouleur.NORMAL)
+- #
++ print('\n %s Installation of syrthes4ensight on architecture %s %s'%(bellecouleur.VERT,self.arch,bellecouleur.NORMAL))
++ #
+
+ try:
+- os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo '* Installation ensight *' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
+- os.chdir(self.installPath)
+- os.system("cat "+nameLib+".log >>"+self.installPath+"/syrthes-install/resume")
++ os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo '* Installation ensight *' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
++ os.chdir(self.installPath)
++ os.system("cat "+nameLib+".log >>"+self.installPath+"/syrthes-install/resume")
+ except:
+- print "Error during make of "+nameLib
+-
++ print("Error during make of "+nameLib)
++
+ error = os.system("make "+self.makeopt+" syrthesensight NOM_ARCH="+self.arch+" SYRTHES4_HOME="+self.syrthesDir+" 2>&1 | tee "+nameLib+".log")
+ if error != 0 :
+- print "Error during make install of "+nameLib
++ print("Error during make install of "+nameLib)
+ sys.exit(1)
+-
+- print 'syrthesensight INSTALL', error
++
++ print('syrthesensight INSTALL', error)
+
+ os.chdir(self.installPath)
+-
++
+
+
+
+@@ -851,29 +851,29 @@
+ #
+ nameLib = 'syrthesmed'
+ #
+- print '\n %s Installation of syrthes4med3 on architecture %s %s'%(bellecouleur.VERT,self.arch,bellecouleur.NORMAL)
+- #
++ print('\n %s Installation of syrthes4med3 on architecture %s %s'%(bellecouleur.VERT,self.arch,bellecouleur.NORMAL))
++ #
+
+ try:
+- os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo '* Installation med *' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
+- os.chdir(self.installPath)
+- os.system("cat "+nameLib+".log >>"+self.installPath+"/syrthes-install/resume")
++ os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo '* Installation med *' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
++ os.chdir(self.installPath)
++ os.system("cat "+nameLib+".log >>"+self.installPath+"/syrthes-install/resume")
+ except:
+- print "Error during make of "+nameLib
+-
++ print("Error during make of "+nameLib)
++
+ error = os.system("make "+self.makeopt+" syrthesmed NOM_ARCH="+self.arch+" SYRTHES4_HOME="+self.syrthesDir+" 2>&1 | tee "+nameLib+".log")
+ if error != 0 :
+- print "Error during make install of "+nameLib
++ print("Error during make install of "+nameLib)
+ sys.exit(1)
+-
+- print 'syrthesmed INSTALL', error
++
++ print('syrthesmed INSTALL', error)
+
+ os.chdir(self.installPath)
+-
++
+
+
+
+@@ -884,27 +884,27 @@
+ def installppfunc(self):
+ #
+ nameLib = 'syrthesppfunc'
+- print '\n %s Installation of ppfunc on architecture %s %s'%(bellecouleur.VERT,self.arch,bellecouleur.NORMAL)
+- #
++ print('\n %s Installation of ppfunc on architecture %s %s'%(bellecouleur.VERT,self.arch,bellecouleur.NORMAL))
++ #
+
+ try:
+- os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo '* Installation ppfunc *' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
+- os.chdir(self.installPath)
+- os.system("cat "+nameLib+".log >>"+self.installPath+"/syrthes-install/resume")
++ os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo '* Installation ppfunc *' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
++ os.chdir(self.installPath)
++ os.system("cat "+nameLib+".log >>"+self.installPath+"/syrthes-install/resume")
+ except:
+- print "Error during make of "+nameLib
+-
++ print("Error during make of "+nameLib)
++
+ error = os.system("make "+self.makeopt+" ppfunc NOM_ARCH="+self.arch+" SYRTHES4_HOME="+self.syrthesDir+" 2>&1 | tee "+nameLib+".log")
+ if error != 0 :
+- print "Error during make install of "+nameLib
++ print("Error during make install of "+nameLib)
+ sys.exit(1)
+-
+- print 'syrthesppfuncINSTALL', error
+-
++
++ print('syrthesppfuncINSTALL', error)
++
+ os.chdir(self.installPath)
+
+
+@@ -916,23 +916,23 @@
+ #----------------------------------------------------------------------------
+ def installsyrthesmpi(self):
+ #
+- print '\n %s Installation of syrthesmpi on architecture %s %s'%(bellecouleur.VERT,self.arch,bellecouleur.NORMAL)
+- #
++ print('\n %s Installation of syrthesmpi on architecture %s %s'%(bellecouleur.VERT,self.arch,bellecouleur.NORMAL))
++ #
+ nameLib = 'syrthesmpi'
+ destPath=self.installPath+'/../arch/'+self.arch+'/lib'
+
+ try:
+- os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo '* Installation syrthesmpi *' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
+- os.chdir(self.installPath)
+- os.system("make "+self.makeopt+" syrthesmpi NOM_ARCH="+self.arch+" SYRTHES4_HOME="+self.syrthesDir+" 2>&1 | tee "+nameLib+".log")
+- os.system("cat "+nameLib+".log >>"+self.installPath+"/syrthes-install/resume")
++ os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo '* Installation syrthesmpi *' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
++ os.chdir(self.installPath)
++ os.system("make "+self.makeopt+" syrthesmpi NOM_ARCH="+self.arch+" SYRTHES4_HOME="+self.syrthesDir+" 2>&1 | tee "+nameLib+".log")
++ os.system("cat "+nameLib+".log >>"+self.installPath+"/syrthes-install/resume")
+ except:
+- print "Error during make of "+nameLib
+-
++ print("Error during make of "+nameLib)
++
+ os.chdir(self.installPath)
+
+ os.system('mv %s/* %s'%(self.build,destPath))
+@@ -949,31 +949,31 @@
+ #
+ #
+ nameLib = 'pp'
+- print '\n %s Installation of syrthes-pp on architecture %s %s'%(bellecouleur.VERT,self.arch,bellecouleur.NORMAL)
+- #
++ print('\n %s Installation of syrthes-pp on architecture %s %s'%(bellecouleur.VERT,self.arch,bellecouleur.NORMAL))
++ #
+ destPath=self.installPath+'/../arch/'+self.arch+'/lib'
+
+ try:
+- os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo '* Installation pp *' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
+- os.chdir(self.installPath)
+- os.system("cat "+nameLib+".log >>"+self.installPath+"/syrthes-install/resume")
++ os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo '* Installation pp *' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
++ os.chdir(self.installPath)
++ os.system("cat "+nameLib+".log >>"+self.installPath+"/syrthes-install/resume")
+ except:
+- print "Error during make of "+nameLib
+- sys.exit(1)
++ print("Error during make of "+nameLib)
++ sys.exit(1)
+
+ error = os.system("make "+self.makeopt+" pp NOM_ARCH="+self.arch+" SYRTHES4_HOME="+self.syrthesDir+" 2>&1 | tee "+nameLib+".log")
+
+ if error != 0 :
+- print "Error during make install of "+nameLib
++ print("Error during make install of "+nameLib)
+ sys.exit(1)
+-
+- print 'syrthesppINSTALL', error
++
++ print('syrthesppINSTALL', error)
+ os.system('mv %s/* %s'%(self.build,destPath))
+-
++
+
+
+
+@@ -983,23 +983,23 @@
+ #----------------------------------------------------------------------------
+ def installpost(self):
+ #
+- print '\n %s Installation of syrthes-post on architecture %s %s'%(bellecouleur.VERT,self.arch,bellecouleur.NORMAL)
+- #
++ print('\n %s Installation of syrthes-post on architecture %s %s'%(bellecouleur.VERT,self.arch,bellecouleur.NORMAL))
++ #
+ nameLib = 'post'
+ destPath=self.installPath+'/../arch/'+self.arch+'/lib'
+
+ try:
+- os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo '* Installation post *' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
+- os.chdir(self.installPath)
+- os.system("make "+self.makeopt+" post NOM_ARCH="+self.arch+" SYRTHES4_HOME="+self.syrthesDir+" 2>&1 | tee "+nameLib+".log")
+- os.system("cat "+nameLib+".log >>"+self.installPath+"/syrthes-install/resume")
++ os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo '* Installation post *' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
++ os.chdir(self.installPath)
++ os.system("make "+self.makeopt+" post NOM_ARCH="+self.arch+" SYRTHES4_HOME="+self.syrthesDir+" 2>&1 | tee "+nameLib+".log")
++ os.system("cat "+nameLib+".log >>"+self.installPath+"/syrthes-install/resume")
+ except:
+- print "Error during make of "+nameLib
+-
++ print("Error during make of "+nameLib)
++
+ os.chdir(self.installPath)
+ os.system('mv %s/* %s'%(self.build,destPath))
+
+@@ -1012,8 +1012,8 @@
+ #----------------------------------------------------------------------------
+ def installple(self):
+ #
+- print '\n %s Installation of ple on architecture %s %s'%(bellecouleur.VERT,self.arch,bellecouleur.NORMAL)
+- #
++ print('\n %s Installation of ple on architecture %s %s'%(bellecouleur.VERT,self.arch,bellecouleur.NORMAL))
++ #
+ nameLib = 'ple'
+
+ os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
+@@ -1031,22 +1031,22 @@
+ #----------------------------------------------------------------------------
+ def installsyrthescfd(self):
+ #
+- print '\n %s Installation of syrthescfd on architecture %s %s'%(bellecouleur.VERT,self.arch,bellecouleur.NORMAL)
+- #
++ print('\n %s Installation of syrthescfd on architecture %s %s'%(bellecouleur.VERT,self.arch,bellecouleur.NORMAL))
++ #
+ nameLib = 'syrthescfd'
+
+ try:
+- os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo '* Installation syrthescfd *' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
+- os.chdir(self.installPath)
+- os.system("make syrthescfd NOM_ARCH="+self.arch+" SYRTHES4_HOME="+self.syrthesDir+" 2>&1 | tee "+nameLib+".log")
+- os.system("cat "+nameLib+".log >>"+self.installPath+"/syrthes-install/resume")
++ os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo '* Installation syrthescfd *' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo '***************************************************' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
++ os.chdir(self.installPath)
++ os.system("make syrthescfd NOM_ARCH="+self.arch+" SYRTHES4_HOME="+self.syrthesDir+" 2>&1 | tee "+nameLib+".log")
++ os.system("cat "+nameLib+".log >>"+self.installPath+"/syrthes-install/resume")
+ except:
+- print "Error during make of "+nameLib
+-
++ print("Error during make of "+nameLib)
++
+ os.chdir(self.installPath+'/syrthes-install')
+
+
+@@ -1059,11 +1059,11 @@
+ #
+ # setup file update
+ #
+- print 'function report'
+- #
+- setupFile = file('setup', mode='w')
++ print('function report')
++ #
++ setupFile = open('setup', mode='w')
+
+- # Report for definition of architecture
++ # Report for definition of architecture
+ setupFile.write('#--------------------------------------------------------\n')
+ setupFile.write('# Architecture Name\n')
+ setupFile.write('#--------------------------------------------------------\n')
+@@ -1071,10 +1071,10 @@
+ setupFile.write('#nom_arch <- leave empty for automatic default\n')
+ setupFile.write('# value (based on uname)\n')
+ setupFile.write('nom_arch '+self.arch+'\n#\n')
+- setupFile.write('#\n')
++ setupFile.write('#\n')
+
+ # Report for definition of C compiler
+- setupFile.write('#--------------------------------------------------------\n')
++ setupFile.write('#--------------------------------------------------------\n')
+ setupFile.write('# C compiler \n')
+ setupFile.write('#--------------------------------------------------------\n')
+ setupFile.write('#compC /home/toto/gcc-x.y.z/gcc <- for specific the \n')
+@@ -1082,137 +1082,137 @@
+ setupFile.write('#compC gcc <- leave gcc for \n')
+ setupFile.write('# automatic default\n')
+ setupFile.write('compC'+' '+self.comp+"\n")
+- setupFile.write('#\n')
+- setupFile.write('#wrapperC mpicc <- for specific C wrapper without path\n')
+- setupFile.write('# (only needed for MPI installation)\n')
+- setupFile.write('# leave mpicc for automatic default\n')
++ setupFile.write('#\n')
++ setupFile.write('#wrapperC mpicc <- for specific C wrapper without path\n')
++ setupFile.write('# (only needed for MPI installation)\n')
++ setupFile.write('# leave mpicc for automatic default\n')
+ setupFile.write('wrapperC'+' '+self.wrapperc+"\n")
+- setupFile.write('#\n')
++ setupFile.write('#\n')
+ setupFile.write('# Specific options for compiler \n')
+ setupFile.write('# specific_inc= specific_inc= -I /myinclude/inc -I /myinclude2/inc\n')
+ setupFile.write('# specific_lib= -L /mylib/lib1 -L /mylib/lib2 \n')
+ setupFile.write('# specific_debug= -g\n')
+ setupFile.write('# specific_option= -D _SYRTHES_MPI_IO_\n')
+ setupFile.write('# specific_makej= -j8\n')
+-
++
+ liblist=['specific_inc','specific_lib','specific_debug','specific_option', 'specific_makej']
+- for lib in liblist:
+- if self.dicospeci[lib].has_key('PATH'):
+- setupFile.write(lib+' '+self.dicospeci[lib]['PATH']+"\n")
+- else:
+- setupFile.write('# \n')
+-
++ for lib in liblist:
++ if 'PATH' in self.dicospeci[lib]:
++ setupFile.write(lib+' '+self.dicospeci[lib]['PATH']+"\n")
++ else:
++ setupFile.write('# \n')
++
+ setupFile.write('#\n')
+- setupFile.write('#\n')
+- setupFile.write('#\n')
+-
+- # Report for Graphical user Interface Intallation
+- setupFile.write('#--------------------------------------------------------\n')
+- setupFile.write('# Graphical user Interface\n')
+- setupFile.write('#--------------------------------------------------------\n')
++ setupFile.write('#\n')
++ setupFile.write('#\n')
++
++ # Report for Graphical user Interface Intallation
++ setupFile.write('#--------------------------------------------------------\n')
++ setupFile.write('# Graphical user Interface\n')
++ setupFile.write('#--------------------------------------------------------\n')
+ lib='gui'
+ setupFile.write(lib+' '+'INSTALL='+self.dicolib[lib]['INSTALL']+"\n")
+- setupFile.write('#\n')
+-
+- # Report for builds the SYRTHES sequential library
+- setupFile.write('#--------------------------------------------------------\n')
++ setupFile.write('#\n')
++
++ # Report for builds the SYRTHES sequential library
++ setupFile.write('#--------------------------------------------------------\n')
+ setupFile.write('# SYRTHES4 - kernel - sequential version\n')
+ setupFile.write('#--------------------------------------------------------\n')
+ setupFile.write('# Answer by yes or no\n#\n')
+- lib='syrthesppfunc'
+- if self.dicolib[lib].has_key('PATH'):
++ lib='syrthesppfunc'
++ if 'PATH' in self.dicolib[lib]:
+ setupFile.write(lib+' '+'INSTALL='+self.dicolib[lib]['INSTALL']+"\n")
+- lib='syrthesseq'
+- if self.dicolib[lib].has_key('PATH'):
++ lib='syrthesseq'
++ if 'PATH' in self.dicolib[lib]:
+ setupFile.write(lib+' '+'INSTALL='+self.dicolib[lib]['INSTALL']+"\n")
+- setupFile.write('#\n')
+- setupFile.write('#\n')
+-
+- # Report for builds the SYRTHES tools
+- setupFile.write('#--------------------------------------------------------\n')
++ setupFile.write('#\n')
++ setupFile.write('#\n')
++
++ # Report for builds the SYRTHES tools
++ setupFile.write('#--------------------------------------------------------\n')
+ setupFile.write('# SYRTHES4 - tools for meshes and results conversions\n')
+ setupFile.write('#--------------------------------------------------------\n')
+- setupFile.write('# Choose your type of installation and answer by yes or no\n')
+- setupFile.write('#\n')
+- setupFile.write('# for MED format conversion : choose to istall or the path to the libraries\n')
++ setupFile.write('# Choose your type of installation and answer by yes or no\n')
++ setupFile.write('#\n')
++ setupFile.write('# for MED format conversion : choose to istall or the path to the libraries\n')
+ lib='hdf5'
+- if self.dicolib[lib].has_key('PATH') :
+- setupFile.write('#\n#\n')
+- setupFile.write(lib+' USE=yes PATH='+self.dicolib[lib]['PATH']+"\n")
+- setupFile.write('#\n#\n')
+- lib='med'
+- if self.dicolib[lib].has_key('PATH') :
+- setupFile.write('#\n#\n')
+- setupFile.write(lib+' USE=yes PATH='+self.dicolib[lib]['PATH']+"\n")
+- setupFile.write('#\n#\n')
++ if 'PATH' in self.dicolib[lib] :
++ setupFile.write('#\n#\n')
++ setupFile.write(lib+' USE=yes PATH='+self.dicolib[lib]['PATH']+"\n")
++ setupFile.write('#\n#\n')
++ lib='med'
++ if 'PATH' in self.dicolib[lib] :
++ setupFile.write('#\n#\n')
++ setupFile.write(lib+' USE=yes PATH='+self.dicolib[lib]['PATH']+"\n")
++ setupFile.write('#\n#\n')
++
+
+-
+- lib='syrthesconvert'
++ lib='syrthesconvert'
+ setupFile.write(lib+' '+'INSTALL='+self.dicolib[lib]['INSTALL']+"\n")
+- setupFile.write('#\n')
++ setupFile.write('#\n')
+
+- lib='syrthesensight'
++ lib='syrthesensight'
+ setupFile.write(lib+' '+'INSTALL='+self.dicolib[lib]['INSTALL']+"\n")
+- setupFile.write('#\n')
++ setupFile.write('#\n')
+
+- lib='syrthesmed'
++ lib='syrthesmed'
+ setupFile.write(lib+' '+'INSTALL='+self.dicolib[lib]['INSTALL']+"\n")
+- setupFile.write('#\n')
++ setupFile.write('#\n')
+
+- # Report for builds the SYRTHES parall version
+- setupFile.write('#--------------------------------------------------------\n')
++ # Report for builds the SYRTHES parall version
++ setupFile.write('#--------------------------------------------------------\n')
+ setupFile.write('# SYRTHES4 - parall version (optional)\n')
+ setupFile.write('#--------------------------------------------------------\n')
+
+ for lib in ['mpi', 'metis', 'scotch']:
+- if self.dicolib[lib].has_key('PATH') :
++ if 'PATH' in self.dicolib[lib] :
+ setupFile.write('#\n#\n')
+ setupFile.write(lib+' USE=yes PATH='+self.dicolib[lib]['PATH']+"\n")
+ setupFile.write('#\n#\n')
+-
+- lib='syrthespp'
++
++ lib='syrthespp'
+ setupFile.write(lib+' '+'INSTALL='+self.dicolib[lib]['INSTALL']+"\n")
+- setupFile.write('#\n')
+- lib='syrthesmpi'
++ setupFile.write('#\n')
++ lib='syrthesmpi'
+ setupFile.write(lib+' '+'INSTALL='+self.dicolib[lib]['INSTALL']+"\n")
+- setupFile.write('#\n')
+- lib='syrthespost'
++ setupFile.write('#\n')
++ lib='syrthespost'
+ setupFile.write(lib+' '+'INSTALL='+self.dicolib[lib]['INSTALL']+"\n")
+- setupFile.write('#\n')
++ setupFile.write('#\n')
+
+- # Report for builds the SYRTHES optional libraiires
+- setupFile.write('#--------------------------------------------------------\n')
++ # Report for builds the SYRTHES optional libraiires
++ setupFile.write('#--------------------------------------------------------\n')
+ setupFile.write('# Optional extern libraries\n')
+ setupFile.write('#--------------------------------------------------------\n')
+ setupFile.write('#\n')
+- setupFile.write('# BLAS Linear algebra library\n')
+- setupFile.write('blas USE=no\n')
+- setupFile.write('#blas USE=yes INSTALL=yes\n')
+- setupFile.write('#blas USE=yes PATH=/home/...\n')
+- setupFile.write('#\n')
+-
+-
+- # Report for builds the SYRTHES preprocessor syrthes-pp
+- setupFile.write('#--------------------------------------------------------\n')
++ setupFile.write('# BLAS Linear algebra library\n')
++ setupFile.write('blas USE=no\n')
++ setupFile.write('#blas USE=yes INSTALL=yes\n')
++ setupFile.write('#blas USE=yes PATH=/home/...\n')
++ setupFile.write('#\n')
++
++
++ # Report for builds the SYRTHES preprocessor syrthes-pp
++ setupFile.write('#--------------------------------------------------------\n')
+ setupFile.write('# SYRTHES for coupling with Code-Saturne (optional)\n')
+ setupFile.write('#--------------------------------------------------------\n')
+ setupFile.write('# Warning : MPI installation must be defined before\n')
+- setupFile.write('#\n')
+- lib='ple'
+- if self.dicolib[lib].has_key('PATH') :
+- setupFile.write('#\n#\n')
+- setupFile.write(lib+' USE=yes PATH='+self.dicolib[lib]['PATH']+"\n")
+- setupFile.write('#\n#\n')
+-
+- lib='syrthescfd'
++ setupFile.write('#\n')
++ lib='ple'
++ if 'PATH' in self.dicolib[lib] :
++ setupFile.write('#\n#\n')
++ setupFile.write(lib+' USE=yes PATH='+self.dicolib[lib]['PATH']+"\n")
++ setupFile.write('#\n#\n')
++
++ lib='syrthescfd'
+ setupFile.write(lib+' '+'INSTALL='+self.dicolib[lib]['INSTALL']+"\n")
+- setupFile.write('#\n')
++ setupFile.write('#\n')
+
+ setupFile.close()
+-
+
+
+-
++
++
+ #----------------------------------------------------------------------------
+ # Function to find a lib partial name (extension : tar.gz) in a path
+ #----------------------------------------------------------------------------
+@@ -1223,19 +1223,19 @@
+
+
+
+-
++
+ #----------------------------------------------------------------------------
+ # Function Copy of all headers in the include folder
+ #----------------------------------------------------------------------------
+ def copyInclude(self):
+-
++
+ files = os.listdir(self.installPath+'/syrthes-kernel/include/')
+ for name in files :
+- shutil.copy(self.installPath+'/syrthes-kernel/include/'+name,self.destPath+self.arch+'/include' )
+-
++ shutil.copy(self.installPath+'/syrthes-kernel/include/'+name,self.destPath+self.arch+'/include' )
++
+ files = os.listdir(self.installPath+'/syrthes-kernel/lib_material_syrthes/')
+ for name in files :
+- shutil.copy(self.installPath+'/syrthes-kernel/lib_material_syrthes/'+name,self.destPath+self.arch+'/include' )
++ shutil.copy(self.installPath+'/syrthes-kernel/lib_material_syrthes/'+name,self.destPath+self.arch+'/include' )
+
+
+
+@@ -1244,16 +1244,16 @@
+ # Function Cleaning of folders and temp directory.
+ #----------------------------------------------------------------------------
+ def cleaningFiles(self):
+- # cleaning .o files in arch/.../lib
+- files = os.listdir(self.destPath+self.arch+'/lib/')
++ # cleaning .o files in arch/.../lib
++ files = os.listdir(self.destPath+self.arch+'/lib/')
+ for name in files:
+ basename, extension = os.path.splitext(name)
+ if extension=='.o':
+- os.remove(self.destPath+self.arch+'/lib/'+name)
++ os.remove(self.destPath+self.arch+'/lib/'+name)
+ # cleaning directories
+- if os.path.isdir(self.syrthesDir+'/build') :
++ if os.path.isdir(self.syrthesDir+'/build') :
+ shutil.rmtree(self.syrthesDir+'/build')
+- if os.path.isdir(self.libSourceDir+'/TMP') :
++ if os.path.isdir(self.libSourceDir+'/TMP') :
+ shutil.rmtree(self.libSourceDir+'/TMP')
+
+
+@@ -1282,29 +1282,29 @@
+ shutil.copy(self.installPath+'/data/syrthes4_create_mylibmat' , self.destPath+self.arch+'/bin')
+ shutil.copy(self.installPath+'/syrthes-gui/src/22x22/syr_hmt_material.txt' , self.destPath+self.arch+'/include')
+ pass
+-
++
+ #----------------------------------------------------------------------------
+ # Function to find and unzip librairie
+ #----------------------------------------------------------------------------
+ def unzipLib(self,myLibName):
+- nameLib = self.findLib(self.libSourceDir,myLibName)
+- print '\nInstallation of %s %s %s on architecture %s\n'%(bellecouleur.VERT,nameLib,bellecouleur.NORMAL, self.arch)
++ nameLib = self.findLib(self.libSourceDir,myLibName)
++ print('\nInstallation of %s %s %s on architecture %s\n'%(bellecouleur.VERT,nameLib,bellecouleur.NORMAL, self.arch))
+ buildPath =self.libSourceDir+'/TMP/'+nameLib+'.build/'+self.arch
+ optPath = self.libDestOpt+'/'+nameLib
+-
+- # Unzip
+- print bellecouleur.BLEU +"Unzip "+ nameLib + bellecouleur.NORMAL
++
++ # Unzip
++ print(bellecouleur.BLEU +"Unzip "+ nameLib + bellecouleur.NORMAL)
+ os.chdir(self.libSourceDir+'/')
+ if os.path.isdir('TMP') :
+ shutil.rmtree('TMP')
+ os.system('mkdir TMP')
+ os.system("tar -zxf %s/%s.tar.gz -C TMP"%(self.libSourceDir,nameLib))
+- os.chdir('./TMP')
+-
+- srcPath=self.libSourceDir+'/TMP/'
+- if os.path.isdir(srcPath+nameLib+'.build') :
++ os.chdir('./TMP')
++
++ srcPath=self.libSourceDir+'/TMP/'
++ if os.path.isdir(srcPath+nameLib+'.build') :
+ shutil.rmtree(srcPath+nameLib+'.build')
+-
++
+ os.makedirs(buildPath)
+ os.chdir(buildPath)
+ files = os.listdir(srcPath+nameLib)
+@@ -1313,7 +1313,7 @@
+ shutil.copytree(srcPath+nameLib+'/'+file,buildPath+'/'+file)
+ except:
+ shutil.copy(srcPath+nameLib+'/'+file,buildPath+'/'+file)
+- return nameLib, buildPath, optPath, srcPath
++ return nameLib, buildPath, optPath, srcPath
+
+
+
+@@ -1322,23 +1322,23 @@
+ # print function for Libraries
+ #----------------------------------------------------------------------------
+ def printResume(self,myLibName):
+- try:
+- toWrite = " \n"
+- toWrite += "*************************************************** \n"
+- toWrite += "* Installation %s * \n"%myLibName.upper()
+- toWrite += "*************************************************** \n"
+- toWrite += " \n"
+- print toWrite
+-
+- os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo '*************************************************' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo '* Installation %s *' >> "%myLibName.upper()+self.installPath+"/syrthes-install/resume")
+- os.system("echo '*************************************************' >> "+self.installPath+"/syrthes-install/resume")
+- os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
+- #os.system("make all NOM_ARCH="+self.arch+" 2>&1 | tee "+nameLib+".log")
+- os.system("cat "+myLibName+".log >>"+self.installPath+"/syrthes-install/resume")
+- except:
+- print "Error during make of "+myLibName
++ try:
++ toWrite = " \n"
++ toWrite += "*************************************************** \n"
++ toWrite += "* Installation %s * \n"%myLibName.upper()
++ toWrite += "*************************************************** \n"
++ toWrite += " \n"
++ print(toWrite)
++
++ os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo '*************************************************' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo '* Installation %s *' >> "%myLibName.upper()+self.installPath+"/syrthes-install/resume")
++ os.system("echo '*************************************************' >> "+self.installPath+"/syrthes-install/resume")
++ os.system("echo ' ' >> "+self.installPath+"/syrthes-install/resume")
++ #os.system("make all NOM_ARCH="+self.arch+" 2>&1 | tee "+nameLib+".log")
++ os.system("cat "+myLibName+".log >>"+self.installPath+"/syrthes-install/resume")
++ except:
++ print("Error during make of "+myLibName)
+
+
+
+@@ -1351,40 +1351,40 @@
+ # Copy Graphical user Interface
+ if "x86_64" in os.uname()[4]: # <-> self.arch = "Linux_x86_64" or "Linux_IA64"
+ try:
+- shutil.copytree(self.installPath+'/syrthes-gui/exe.linux-x86_64', self.destPath+self.arch+'/lib/syrthes-GUI_exe')
++ shutil.copytree(self.installPath+'/syrthes-gui/exe.linux-x86_64', self.destPath+self.arch+'/lib/syrthes-GUI_exe')
+ except:
+- print " "
+- print "--> No such file or directory "+self.installPath+"/syrthes-gui/exe.linux-x86_64"
+- print " "
++ print(" ")
++ print("--> No such file or directory "+self.installPath+"/syrthes-gui/exe.linux-x86_64")
++ print(" ")
+ else:
+ if "CYGWIN" in os.uname()[0]:
+ try:
+- shutil.copytree(self.installPath+'/syrthes-gui/exe.WIN32', self.destPath+self.arch+'/lib/syrthes-GUI_exe')
++ shutil.copytree(self.installPath+'/syrthes-gui/exe.WIN32', self.destPath+self.arch+'/lib/syrthes-GUI_exe')
+ except:
+- print " "
+- print "--> No such file or directory "+self.installPath+"/syrthes-gui/exe.WIN32"
+- print " "
++ print(" ")
++ print("--> No such file or directory "+self.installPath+"/syrthes-gui/exe.WIN32")
++ print(" ")
+ else:
+ try:
+- shutil.copytree(self.installPath+'/syrthes-gui/exe.linux-x86_32', self.destPath+self.arch+'/lib/syrthes-GUI_exe')
++ shutil.copytree(self.installPath+'/syrthes-gui/exe.linux-x86_32', self.destPath+self.arch+'/lib/syrthes-GUI_exe')
+ except:
+- print " "
+- print "--> No such file or directory "+self.installPath+"/syrthes-gui/exe.linux-x86_32"
+- print " "
++ print(" ")
++ print("--> No such file or directory "+self.installPath+"/syrthes-gui/exe.linux-x86_32")
++ print(" ")
+
+
+ # Create a shortcut to syrthes-GUI program
+- os.chdir(self.destPath+self.arch+'/bin')
+- f = open("syrthes.gui",'w')
+- f.write('#/bin.sh\n')
+- f.write('# GUI Launcher\n')
++ os.chdir(self.destPath+self.arch+'/bin')
++ f = open("syrthes.gui",'w')
++ f.write('#/bin.sh\n')
++ f.write('# GUI Launcher\n')
+ f.write(self.destPath+self.arch+'/lib/syrthes-GUI_exe/SyrthesMain $1 $2 $3 $4 $5')
+- f.close()
+- os.system('chmod +x syrthes.gui')
++ f.close()
++ os.system('chmod +x syrthes.gui')
++
++
+
+
+-
+-
+
+
+
+@@ -1416,4 +1416,4 @@
+ #
+ #-------------------------------------------------------------------------------
+ if __name__ == '__main__':
+- main= Setup()
++ main= Setup()
diff --git a/debian/patches/series b/debian/patches/series
index b5aea8d..9da82c0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,5 @@
+python3.patch
+python3-conf.patch
setup.patch
buildflags.patch
debug.patch
diff --git a/debian/patches/setup.patch b/debian/patches/setup.patch
index d2552e3..85650f8 100644
--- a/debian/patches/setup.patch
+++ b/debian/patches/setup.patch
@@ -95,13 +95,13 @@ Index: syrthes/src/syrthes-install/config_makeFileIN.py
INC_SYRTHES = -I$(DIR_SYRTHES)/src/syrthes-kernel/include
@@ -328,13 +328,13 @@ endif
# ---------------------------
- if self.dicolib['metis'].has_key('PATH'):
+ if 'PATH' in self.dicolib['metis']:
- makefileinFile.write("LIBMETIS=-L $(DIR_METIS)/lib -lmetis\n")
+ makefileinFile.write("LIBMETIS=-lmetis\n")
makefileinFile.write("INC_METIS=-I$(DIR_METIS)/include\n")
- if self.dicolib['scotch'].has_key('PATH'):
+ if 'PATH' in self.dicolib['scotch']:
makefileinFile.write("LIBSCOTCH=-L $(DIR_SCOTCH)/lib -lscotch -L $(DIR_SCOTCH)/lib -lscotcherr\n")
- makefileinFile.write("INC_SCOTCH=-I$(DIR_SCOTCH)/include\n")
@@ -117,8 +117,8 @@ Index: syrthes/src/syrthes-install/syrthes_install.py
ft.write(' **************************************\n')
ft.write(' \n')
ft.close()
-- os.system("env >> tmp")
-+ os.system("env | grep -viE 'error|erreur' >> tmp")
+- os.system("env >> tmp")
++ os.system("env | grep -viE 'error|erreur' >> tmp")
os.system("cat resume tmp > tmp2; mv tmp2 resume; rm tmp")
- os.system("grep -i erreur resume > ERREUR.log")
@@ -148,9 +148,9 @@ Index: syrthes/src/syrthes-install/config_env.py
@@ -133,7 +133,7 @@ class Setupsyrthesprofile(object):
#-----------------------------------------------------------
""")
- for key in self.dicolib.keys():
-- if self.dicolib[key].has_key('PATH'):
-+ if key != 'specific_inc' and key != 'specific_lib' and self.dicolib[key].has_key('PATH'):
+ for key in list(self.dicolib.keys()):
+- if 'PATH' in self.dicolib[key]:
++ if key != 'specific_inc' and key != 'specific_lib' and 'PATH' in self.dicolib[key]:
line='LD_LIBRARY_PATH='+self.dicolib[key]['PATH']+'/lib:$LD_LIBRARY_PATH'
profileFile.write("#"+key+"\n")
profileFile.write(line)
--
2.20.1