summaryrefslogtreecommitdiffstats
path: root/admin/kde.py
diff options
context:
space:
mode:
Diffstat (limited to 'admin/kde.py')
-rw-r--r--admin/kde.py94
1 files changed, 47 insertions, 47 deletions
diff --git a/admin/kde.py b/admin/kde.py
index 04119e6..e6cbdb1 100644
--- a/admin/kde.py
+++ b/admin/kde.py
@@ -44,22 +44,22 @@ def detect_kde(env):
tdedir = env['ARGS'].get('tdedir', None)
## Detect the tde libraries
- print "Checking for tde-config : ",
+ print("Checking for tde-config : ")
str="which tde-config 2>/dev/null"
if tdedir: str="which %s 2>/dev/null" % (tdedir+'/bin/tde-config')
kde_config = os.popen(str).read().strip()
if len(kde_config):
- print GREEN + 'tde-config was found as ' + kde_config + NORMAL
+ print(GREEN + 'tde-config was found as ' + kde_config + NORMAL)
else:
- if tdedir: print RED + 'tde-config was NOT found in the folder given ' + tdedir + NORMAL
- else: print RED + 'tde-config was NOT found in your PATH' + NORMAL
- print "Make sure kde is installed properly"
- print "(missing package tdebase-devel?)"
+ if tdedir: print(RED + 'tde-config was NOT found in the folder given ' + tdedir + NORMAL)
+ else: print(RED + 'tde-config was NOT found in your PATH' + NORMAL)
+ print("Make sure kde is installed properly")
+ print("(missing package tdebase-devel?)")
env.Exit(1)
if tdedir: env['TDEDIR']=tdedir
else: env['TDEDIR'] = os.popen(kde_config+' -prefix').read().strip()
- print "Checking for tde version : ",
+ print("Checking for tde version : ")
tde_version = os.popen(kde_config+" --version|grep TDE").read().strip().split()[1]
tde_major = tde_version.split('.')[0].lstrip('R')
tde_minor = tde_version.split('.')[1]
@@ -77,17 +77,17 @@ def detect_kde(env):
except:
pass
if int(tde_major) != 14:
- print RED + tde_version
- print RED + "Your tde version might be too old" + NORMAL
- print RED + "Please make sure TDE is at least R14.0" + NORMAL
+ print(RED + tde_version)
+ print(RED + "Your tde version might be too old" + NORMAL)
+ print(RED + "Please make sure TDE is at least R14.0" + NORMAL)
else:
- print GREEN + tde_version + NORMAL
+ print(GREEN + tde_version + NORMAL)
## Detect the qt library
- print "Checking for the qt library : ",
+ print("Checking for the qt library : ")
qtdir = os.getenv("QTDIR")
if qtdir:
- print GREEN + "qt is in " + qtdir + NORMAL
+ print(GREEN + "qt is in " + qtdir + NORMAL)
else:
libdir = os.popen(kde_config + ' --expandvars --install lib').read().strip()
libtdeuiSO = libdir+'/'+getSOfromLA(libdir+'/libtdeui.la')
@@ -98,103 +98,103 @@ def detect_kde(env):
pass
if m:
qtdir = m.group(1)
- print YELLOW+"qt was found as " + m.group(1) + NORMAL
+ print(YELLOW+"qt was found as " + m.group(1) + NORMAL)
else:
- print RED+"qt was not found"+NORMAL
- print RED+"Please set QTDIR first (/usr/lib/qt3?)"+NORMAL
+ print(RED+"qt was not found"+NORMAL)
+ print(RED+"Please set QTDIR first (/usr/lib/qt3?)"+NORMAL)
env.Exit(1)
env['QTDIR'] = qtdir.strip()
## Find the necessary programs uic-tqt and moc
- print "Checking for uic-tqt : ",
+ print("Checking for uic-tqt : ")
uic = qtdir + "/bin/uic-tqt"
if os.path.isfile(uic):
- print GREEN+"uic-tqt was found as "+uic+NORMAL
+ print(GREEN+"uic-tqt was found as "+uic+NORMAL)
else:
uic = os.popen("which uic-tqt 2>/dev/null").read().strip()
if len(uic):
- print YELLOW+"uic-tqt was found as "+uic+NORMAL
+ print(YELLOW+"uic-tqt was found as "+uic+NORMAL)
else:
uic = os.popen("which uic-tqt 2>/dev/null").read().strip()
if len(uic):
- print YELLOW+"uic-tqt was found as "+uic+NORMAL
+ print(YELLOW+"uic-tqt was found as "+uic+NORMAL)
else:
- print RED+"uic-tqt was not found - set QTDIR put it in your PATH ?"+NORMAL
+ print(RED+"uic-tqt was not found - set QTDIR put it in your PATH ?"+NORMAL)
env.Exit(1)
env['QT_UIC'] = uic
- print "Checking for moc : ",
+ print("Checking for moc : ")
moc = qtdir + "/bin/moc"
if os.path.isfile(moc):
- print GREEN+"moc was found as "+moc+NORMAL
+ print(GREEN+"moc was found as "+moc+NORMAL)
else:
moc = os.popen("which moc 2>/dev/null").read().strip()
if len(moc):
- print YELLOW+"moc was found as "+moc+NORMAL
+ print(YELLOW+"moc was found as "+moc+NORMAL)
elif os.path.isfile("/usr/share/tqt3/bin/moc"):
moc = "/usr/share/tqt3/bin/moc"
- print YELLOW+"moc was found as "+moc+NORMAL
+ print(YELLOW+"moc was found as "+moc+NORMAL)
elif os.path.isfile("/usr/share/qt3/bin/moc"):
moc = "/usr/share/qt3/bin/moc"
- print YELLOW+"moc was found as "+moc+NORMAL
+ print(YELLOW+"moc was found as "+moc+NORMAL)
else:
- print RED+"moc was not found - set QTDIR or put it in your PATH ?"+NORMAL
+ print(RED+"moc was not found - set QTDIR or put it in your PATH ?"+NORMAL)
env.Exit(1)
env['QT_MOC'] = moc
## check for the tqt includes
- print "Checking for the tqt includes : ",
+ print("Checking for the tqt includes : ")
if tqtincludes and os.path.isfile(tqtincludes + "/tqlayout.h"):
# The user told where to look for and it looks valid
- print GREEN + "ok " + tqtincludes + NORMAL
+ print(GREEN + "ok " + tqtincludes + NORMAL)
else:
if os.path.isfile(qtdir + "/include/qlayout.h"):
# Automatic detection
- print GREEN + "ok " + qtdir + "/include/ " + NORMAL
+ print(GREEN + "ok " + qtdir + "/include/ " + NORMAL)
tqtincludes = qtdir + "/include/"
elif os.path.isfile("/usr/include/tqt/tqlayout.h"):
# Debian probably
- print YELLOW + "the qt headers were found in /usr/include/tqt/ " + NORMAL
+ print(YELLOW + "the qt headers were found in /usr/include/tqt/ " + NORMAL)
tqtincludes = "/usr/include/tqt"
elif os.path.isfile("/usr/include/qt4/Qt/qglobal.h"):
# Debian probably
- print YELLOW + "the qt headers were found in /usr/include/qt4/ " + NORMAL
+ print(YELLOW + "the qt headers were found in /usr/include/qt4/ " + NORMAL)
tqtincludes = "/usr/include/qt4"
else:
- print RED + "the qt headers were not found" + NORMAL
+ print(RED + "the qt headers were not found" + NORMAL)
env.Exit(1)
## check for the qt includes
- print "Checking for the qt includes : ",
+ print("Checking for the qt includes : ")
if qtincludes and os.path.isfile(qtincludes + "/ntqglobal.h"):
# The user told where to look for and it looks valid
- print GREEN + "ok " + qtincludes + NORMAL
+ print(GREEN + "ok " + qtincludes + NORMAL)
else:
if os.path.isfile(qtdir + "/include/ntqglobal.h"):
# Automatic detection
- print GREEN + "ok " + qtdir + "/include/ " + NORMAL
+ print(GREEN + "ok " + qtdir + "/include/ " + NORMAL)
qtincludes = qtdir + "/include/"
elif os.path.isfile("/usr/include/tqt3/ntqglobal.h"):
# Debian probably
- print YELLOW + "the qt headers were found in /usr/include/tqt3/ " + NORMAL
+ print(YELLOW + "the qt headers were found in /usr/include/tqt3/ " + NORMAL)
qtincludes = "/usr/include/tqt3"
else:
- print RED + "the qt headers were not found" + NORMAL
+ print(RED + "the qt headers were not found" + NORMAL)
env.Exit(1)
- print "Checking for the tde includes : ",
+ print("Checking for the tde includes : ")
kdeprefix = os.popen(kde_config + " --prefix").read().strip()
if not kdeincludes:
kdeincludes = kdeprefix+"/include/"
if os.path.isfile(kdeincludes + "/klineedit.h"):
- print GREEN+"ok "+kdeincludes+NORMAL
+ print(GREEN+"ok "+kdeincludes+NORMAL)
else:
if os.path.isfile(kdeprefix+"/include/tde/klineedit.h"):
# Debian, Fedora probably
- print YELLOW+"the kde headers were found in "+kdeprefix+"/include/tde/"+NORMAL
+ print(YELLOW+"the kde headers were found in "+kdeprefix+"/include/tde/"+NORMAL)
kdeincludes = kdeprefix + "/include/tde/"
else:
- print RED+"The kde includes were NOT found"+NORMAL
+ print(RED+"The kde includes were NOT found"+NORMAL)
env.Exit(1)
if prefix:
@@ -583,10 +583,10 @@ ie: """+BOLD+"""scons configure libdir=/usr/local/lib qtincludes=/usr/include/qt
basedir=env['DESTDIR']
if len(restype)>0:
if not lenv.has_key(restype):
- print RED+"unknown resource type "+restype+NORMAL
+ print(RED+"unknown resource type "+restype+NORMAL)
else:
basedir += lenv[restype]+'/'
- #print file # <- useful to trace stuff :)
+ #print(file) # <- useful to trace stuff :)
install_list = env.Install(basedir+subdir, files)
env.Alias('install', install_list)
return install_list
@@ -597,7 +597,7 @@ ie: """+BOLD+"""scons configure libdir=/usr/local/lib qtincludes=/usr/include/qt
basedir=env['DESTDIR']
if len(restype)>0:
if not lenv.has_key(restype):
- print RED+"unknown resource type "+restype+NORMAL
+ print(RED+"unknown resource type "+restype+NORMAL)
else:
basedir += lenv[restype]+'/'
install_list = env.InstallAs(basedir+destfile, file)
@@ -705,13 +705,13 @@ ie: """+BOLD+"""scons configure libdir=/usr/local/lib qtincludes=/usr/include/qt
for iconfile in iconfiles:
tmp = iconfile.split('-')
if len(tmp) != 3:
- print RED + 'WARNING: icon filename has unknown format: ' + iconfile + NORMAL
+ print(RED + 'WARNING: icon filename has unknown format: ' + iconfile + NORMAL)
continue
[icon_dir, icon_type, icon_filename] = tmp
try:
destfile = '%s/%s/%s/%s' % (lenv['KDEICONS'], dir_dic[icon_dir], type_dic[icon_type], icon_filename)
except KeyError:
- print RED + 'WARNING: unknown icon type: ' + iconfile + NORMAL
+ print(RED + 'WARNING: unknown icon type: ' + iconfile + NORMAL)
continue
## do not use KDEinstallas here, as parsing from an ide will be necessary
if 'install' in env['TARGS']: