Skip to content
Snippets Groups Projects
Commit f959b9dc authored by Andre Sailer's avatar Andre Sailer
Browse files

Merge branch 'fixPylint' into 'master'

Fixes for new pylint version: getPlatform et al.

See merge request !2254
parents 8da6f6f9 06490cab
No related branches found
No related tags found
1 merge request!2254Fixes for new pylint version: getPlatform et al.
Pipeline #7384203 passed
...@@ -3,11 +3,11 @@ from __future__ import print_function ...@@ -3,11 +3,11 @@ from __future__ import print_function
from os import listdir from os import listdir
from os.path import isfile, join from os.path import isfile, join
import shutil import sys
import os import os
from optparse import OptionParser from optparse import OptionParser
from common_parameters import officialarea, tmparea from common_parameters import officialarea, tmparea
import sys, errno import errno
from subprocess import Popen from subprocess import Popen
def copy_to_eos(from_, to, force=False): def copy_to_eos(from_, to, force=False):
...@@ -70,8 +70,9 @@ if __name__ == "__main__": ...@@ -70,8 +70,9 @@ if __name__ == "__main__":
(options, args) = parser.parse_args() (options, args) = parser.parse_args()
if len(args) != 2: if len(args) != 2:
parser.error("incorrect number of arguments.") parser.error("incorrect number of arguments.")
else: sys.exit(1)
localarea = args[0] #where RPMS have been build
target = args[1] localarea = args[0] # where RPMS have been build
target = args[1]
copyRPMS(localarea,tmparea,target=target) copyRPMS(localarea,tmparea,target=target)
...@@ -4,9 +4,9 @@ from __future__ import print_function ...@@ -4,9 +4,9 @@ from __future__ import print_function
# This script looks into existing RPMS and gives the lowest not used RPM revision # This script looks into existing RPMS and gives the lowest not used RPM revision
from os import listdir from os import listdir
from os.path import isfile, join, isdir from os.path import join, isdir
import shutil import sys
import os
from optparse import OptionParser from optparse import OptionParser
import itertools import itertools
from common_parameters import officialarea from common_parameters import officialarea
...@@ -31,8 +31,9 @@ if __name__ == "__main__": ...@@ -31,8 +31,9 @@ if __name__ == "__main__":
(options, args) = parser.parse_args() (options, args) = parser.parse_args()
if len(args) != 2: if len(args) != 2:
parser.error("incorrect number of arguments.") parser.error("incorrect number of arguments.")
else: sys.exit(1)
lcg_version = args[0] # lcg_version being built
platform = args[1] # platform being built for lcg_version = args[0] # lcg_version being built
platform = args[1] # platform being built for
print(get_new_RPM_revision(lcg_version,platform)) print(get_new_RPM_revision(lcg_version, platform))
...@@ -13,15 +13,9 @@ import distro # replacement of platform.linux_distribution https://github.com/ni ...@@ -13,15 +13,9 @@ import distro # replacement of platform.linux_distribution https://github.com/ni
arch = platform.machine() arch = platform.machine()
system = platform.system() system = platform.system()
flagarch = 0
flagcxx=0
#---Determine external architecture and extra options---------------- #---Determine external architecture and extra options----------------
if os.getenv('ARCHITECTURE'): architecture = os.getenv('ARCHITECTURE', None)
architecture = os.getenv('ARCHITECTURE') cxxoptions = os.getenv('CXXOPTIONS', None)
flagarch = 1
if os.getenv('CXXOPTIONS'):
cxxoptions = os.getenv('cxxoptions')
flagcxx = 1
#---Determine the OS and version-------------------------------------- #---Determine the OS and version--------------------------------------
if system == 'Darwin' : if system == 'Darwin' :
if int(platform.mac_ver()[0].split('.')[0]) > 10 : if int(platform.mac_ver()[0].split('.')[0]) > 10 :
...@@ -107,11 +101,11 @@ if buildtype == 'Release' : bt = 'opt' ...@@ -107,11 +101,11 @@ if buildtype == 'Release' : bt = 'opt'
elif buildtype == 'Debug' : bt = 'dbg' elif buildtype == 'Debug' : bt = 'dbg'
else : bt = 'unk' else : bt = 'unk'
if flagarch==1: if architecture:
print('%s+%s-%s-%s-%s' % (arch, architecture, osvers, compiler, bt)) print('%s+%s-%s-%s-%s' % (arch, architecture, osvers, compiler, bt))
elif flagcxx==1: elif cxxoptions:
print('%s+%s-%s-%s-%s' % (arch, cxxoptions, osvers, compiler, bt)) print('%s+%s-%s-%s-%s' % (arch, cxxoptions, osvers, compiler, bt))
elif flagarch==1 and flagcxx==1: elif architecture and cxxoptions: # we can never get here
print('%s+%s+%s-%s-%s-%s' % (arch, architecture, cxxoptions, osvers, compiler, bt)) print('%s+%s+%s-%s-%s-%s' % (arch, architecture, cxxoptions, osvers, compiler, bt))
else: else:
print('%s-%s-%s-%s' % (arch, osvers, compiler, bt)) print('%s-%s-%s-%s' % (arch, osvers, compiler, bt))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment