Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:onielsen:Virtualization:Testing
opennebula
0001-Port-build-scripts-to-Python3.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Port-build-scripts-to-Python3.patch of Package opennebula
From c2066a052a693052e989a4cf98d5c44ea447546c Mon Sep 17 00:00:00 2001 From: jean-michel <jean-michel@obarun.org> Date: Fri, 9 Aug 2019 22:08:24 +0200 Subject: [PATCH] Port build scripts to Python3 scons scripts are written in Python. When Python3 is used to run scons, the code has to be Python3-ready. --- SConstruct | 64 +++++++++++++++++----------------- share/rubygems/SConstruct | 4 +-- src/docker_machine/SConstruct | 4 +-- src/sunstone/public/SConstruct | 4 +-- 4 files changed, 38 insertions(+), 38 deletions(-) diff --git a/SConstruct b/SConstruct index f3666dc0b..050e913fd 100755 --- a/SConstruct +++ b/SConstruct @@ -29,15 +29,15 @@ main_env['ENV']['PATH'] = os.environ['PATH'] # snippet borrowed from http://dev.gentoo.org/~vapier/scons-blows.txt # makes scons aware of build related environment variables -if os.environ.has_key('CC'): +if 'CC' in os.environ: main_env['CC'] = os.environ['CC'] -if os.environ.has_key('CFLAGS'): +if 'CFLAGS' in os.environ: main_env['CCFLAGS'] += SCons.Util.CLVar(os.environ['CFLAGS']) -if os.environ.has_key('CXX'): +if 'CXX' in os.environ: main_env['CXX'] = os.environ['CXX'] -if os.environ.has_key('CXXFLAGS'): +if 'CXXFLAGS' in os.environ: main_env['CXXFLAGS'] += SCons.Util.CLVar(os.environ['CXXFLAGS']) -if os.environ.has_key('LDFLAGS'): +if 'LDFLAGS' in os.environ: main_env['LINKFLAGS'] += SCons.Util.CLVar(os.environ['LDFLAGS']) else: os.environ['LDFLAGS'] = "" @@ -175,15 +175,15 @@ if not main_env.GetOption('clean'): try: if mysql == 'yes': main_env.ParseConfig('mysql_config --cflags --libs') - except Exception, e: - print "" - print "mysql_config was not found in the path" - print "" - print "Check that mysql development package is installed and" - print "mysql_config is in the path. If your mysql config tool" - print "is called mysql5_config make a symlink as mysql_config" - print "to a directory in the path." - print "" + except Exception as e: + print ("") + print ("mysql_config was not found in the path") + print ("") + print ("Check that mysql development package is installed and") + print ("mysql_config is in the path. If your mysql config tool") + print ("is called mysql5_config make a symlink as mysql_config") + print ("to a directory in the path.") + print ("") exit(-1) try: @@ -192,24 +192,24 @@ if not main_env.GetOption('clean'): main_env.ParseConfig(("LDFLAGS='%s' share/scons/get_xmlrpc_config" + " client") % (os.environ['LDFLAGS'],)) - except Exception, e: - print "" - print "Error searching for xmlrpc-c libraries. Please check this" +\ - " things:" - print "" - print " * You have installed development libraries for xmlrpc-c. One" +\ - " way to check" - print " this is calling xmlrpc-c-config that is provided with the" +\ - " development" - print " package." - print " * Check that the version of xmlrpc-c is at least 1.06. You" +\ - " can do this also" - print " calling:" - print " $ xmlrpc-c-config --version" - print " * If all this requirements are already met please send log" +\ - " files located in" - print " .xmlrpc_test to the mailing list." - print "" + except Exception as e: + print ("") + print ("Error searching for xmlrpc-c libraries. Please check this") +\ + (" things:") + print ("") + print (" * You have installed development libraries for xmlrpc-c. One") +\ + (" way to check") + print (" this is calling xmlrpc-c-config that is provided with the") +\ + (" development") + print (" package.") + print (" * Check that the version of xmlrpc-c is at least 1.06. You") +\ + (" can do this also") + print (" calling:") + print (" $ xmlrpc-c-config --version") + print (" * If all this requirements are already met please send log") +\ + (" files located in") + print (" .xmlrpc_test to the mailing list.") + print ("") exit(-1) else: main_env.Replace(mysql='yes') diff --git a/share/rubygems/SConstruct b/share/rubygems/SConstruct index b3e3d8e14..60add7927 100644 --- a/share/rubygems/SConstruct +++ b/share/rubygems/SConstruct @@ -21,10 +21,10 @@ import os Import('env') if env['rubygems']=='yes': - print "Generating rubygems packages\n" + print ("Generating rubygems packages\n") exit_code=os.system("./generate") if exit_code != 0: - print "Error generating rubygem packages\n" + print ("Error generating rubygem packages\n") exit(-1) diff --git a/src/docker_machine/SConstruct b/src/docker_machine/SConstruct index 6027a5cc3..bff5870b7 100644 --- a/src/docker_machine/SConstruct +++ b/src/docker_machine/SConstruct @@ -21,9 +21,9 @@ import os Import('env') if env['docker_machine']=='yes': - print "Generating docker-machine-driver-opennebula\n" + print ("Generating docker-machine-driver-opennebula\n") exit_code=os.system("make -C src/docker_machine build") if exit_code != 0: - print "Error generating docker-machine-driver-opennebula\n" + print ("Error generating docker-machine-driver-opennebula\n") exit(-1) diff --git a/src/sunstone/public/SConstruct b/src/sunstone/public/SConstruct index bf5e588d6..c418231ec 100644 --- a/src/sunstone/public/SConstruct +++ b/src/sunstone/public/SConstruct @@ -22,11 +22,11 @@ Import('env') if env['sunstone']=='yes': - print "Generating Sunstone minified files\n" + print ("Generating Sunstone minified files\n") exit_code=os.system("./build.sh") if exit_code != 0: - print "Error generating minifying Sunstone files\n" + print ("Error generating minifying Sunstone files\n") exit(-1) -- 2.22.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor