Skip to content

Commit

Permalink
Optimize _checkGcc in setup.py (#849)
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Schönthaler <patrick.schoenthaler@itsc.de>
  • Loading branch information
pschoen-itsc committed May 13, 2023
1 parent b9498d0 commit 8f02cc8
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions IBM_DB/ibm_db/setup.py
Expand Up @@ -96,15 +96,8 @@ def _getinstalledDb2Path():
_printOnly(_errormessage("includeFolderMissing"))

def _checkGcc():
gccFound = False
status,output = subprocess.getstatusoutput('which gcc')
if(status == 0):
gccFound = True
else:
if (os.path.exists('/bin/gcc')):
gccFound = True
if (os.path.exists('/usr/bin/gcc')):
gccFound = True
gccFound = (status == 0) or os.path.exists('/bin/gcc') or os.path.exists('/usr/bin/gcc')

if(gccFound):
_printOnly("Pre-requisite check [gcc] : Passed")
Expand Down

0 comments on commit 8f02cc8

Please sign in to comment.