pull/1/head
Timothy Pearson 13 years ago
parent 1408265197
commit 1cef95ab02

@ -56,7 +56,7 @@ def setup(**arg_dict):
'install_messages' : InstallI18NMessages,
'update_messages' : UpdateI18NMessages,
'checkpyqt' : CheckPyQt,
'checkpytde' : CheckPyKDE,
'checkpytde' : CheckPyTDE,
'uninstall' : Uninstall,
'build' : BuildKDE,
'build_kcm' : BuildKControlModule,
@ -167,7 +167,7 @@ def has_executable_links(self):
###########################################################################
class InstallKDE(install):
user_options = install.user_options[:]
user_options.append( ('kde-prefix=',None,"KDE installation prefix") )
user_options.append( ('kde-prefix=',None,"TDE installation prefix") )
user_options.append( ('install-messages=',None,"installation directory for i18n message files") )
user_options.append( ('install-html=',None,"installation directory for Docbook HTML files") )
user_options.append( ('install-cmd=',None,"Command to use to install the files") )
@ -505,7 +505,7 @@ class BuildKControlModule(Command):
('sip-dir=','/usr/lib/pyshared/python2.6','Directory containing the sip library files'),
('clib=',None,'gcc library and path'),
('pyqt-dir=','/usr/lib/pyshared/python2.6','PyQt module directory'),
('pytde-dir=',None,'PyKDE module directory'),
('pytde-dir=',None,'PyTDE module directory'),
('data-dir=',None,'installation directory for data (script) files')]
def initialize_options(self):
@ -534,7 +534,7 @@ class BuildKControlModule(Command):
# KDE inc dir: find it!
if self.kde_inc_dir is None:
canidatepaths = []
kdedir = os.getenv("KDEDIR")
kdedir = os.getenv("TDEDIR")
if kdedir!=None:
canidatepaths.append(os.path.join(kdedir,"include"))
canidatepaths.append(os.path.join(install.prefix,"include"))
@ -618,12 +618,12 @@ class BuildKControlModule(Command):
raise SystemExit, "Failed to find the PyQt directory: %s" % self.pyqt_dir
self.announce("Using %s for PyQt modules" % self.pyqt_dir)
# PyKDE dir
# PyTDE dir
if self.pytde_dir is None:
self.pytde_dir = sysconfig.get_python_lib()
if (FindFileInPaths("libtdecorecmodule*",[self.pytde_dir]) is None) and (FindFileInPaths("tdecore*",[self.pytde_dir]) is None):
raise SystemExit, "Failed to find the PyKDE directory: %s" % self.pytde_dir
self.announce("Using %s for PyKDE modules" % self.pytde_dir)
raise SystemExit, "Failed to find the PyTDE directory: %s" % self.pytde_dir
self.announce("Using %s for PyTDE modules" % self.pytde_dir)
# Sip dir
if self.sip_dir is None:
@ -804,18 +804,18 @@ class BuildKControlModule(Command):
linklist.append(self.sip_dir+"/sip.so")
# PyQt libs
linklist.append(self.pyqt_dir+"/qt.so")
# PyKDE libs
# PyTDE libs
linklist.append(self.pytde_dir+"/tdecore.so")
linklist.append(self.pytde_dir+"/tdeui.so")
# linklist.append("-L"+self.sip_dir); linklist.append("-lsip")
# # PyQt libs
# linklist.append("-L"+self.pyqt_dir); linklist.append("-lqtcmodule")
# # PyKDE libs
# # PyTDE libs
# linklist.append("-L"+self.pytde_dir); linklist.append("-ltdecorecmodule"); linklist.append("-ltdeuicmodule")
linklist.append("-L"+self.kde_lib_dir); linklist.append("-L/opt/trinity/lib"); linklist.append("-ltdecore"); linklist.append("-lpythonize")
linklist.append("-L"+self.qt_lib_dir); linklist.append("-lqt-mt")
linklist.append("-L"+self.qt_lib_dir); linklist.append("-ltqt-mt")
linklist.append("-lm")
linklist.append("-lstdc++")
linklist.append("-lc")
@ -838,7 +838,7 @@ class BuildKControlModule(Command):
*
* Launch Control Centre modules written in Python using an embedded Python
* interpreter.
* Based on David Boddie's PyKDE-components.
* Based on David Boddie's PyTDE-components.
*/
// pythonize.h must be included first.
@ -969,7 +969,7 @@ static KCModule* return_instance( QWidget *parent, const char *name ) {
}
pyize->decref(pyKCModuleTuple);
// PyKDE can't run the module without this - Pythonize
// PyTDE can't run the module without this - Pythonize
// grabs the lock at initialization and we have to give
// it back before exiting. At this point, we no longer need
// it.
@ -1269,7 +1269,7 @@ class UpdateI18NMessages(Command):
if self.kde_pot is None:
self.announce("Detecting kde.pot...")
canidatepaths = []
kdedir = os.getenv("KDEDIR")
kdedir = os.getenv("TDEDIR")
if kdedir!=None:
canidatepaths.append(os.path.join(kdedir,"include"))
install = self.get_finalized_command('install')
@ -1433,7 +1433,7 @@ class BuildKioslave(Command):
('sip-dir=','/usr/lib/pyshared/python2.6','Directory containing the sip library files'),
('clib=',None,'gcc library and path'),
('pyqt-dir=','/usr/lib/pyshared/python2.6','PyQt module directory'),
('pytde-dir=',None,'PyKDE module directory'),
('pytde-dir=',None,'PyTDE module directory'),
('data-dir=',None,'installation directory for data (script) files')]
def initialize_options(self):
@ -1463,7 +1463,7 @@ class BuildKioslave(Command):
# KDE inc dir: find it!
if self.kde_inc_dir is None:
canidatepaths = []
kdedir = os.getenv("KDEDIR")
kdedir = os.getenv("TDEDIR")
if kdedir!=None:
canidatepaths.append(os.path.join(kdedir,"include"))
canidatepaths.append(os.path.join(install.prefix,"include"))
@ -1546,12 +1546,12 @@ class BuildKioslave(Command):
raise SystemExit, "Failed to find the PyQt directory: %s" % self.pyqt_dir
self.announce("Using %s for PyQt modules" % self.pyqt_dir)
# PyKDE dir
# PyTDE dir
if self.pytde_dir is None:
self.pytde_dir = sysconfig.get_python_lib()
if (FindFileInPaths("libtdecorecmodule*",[self.pytde_dir]) is None) and (FindFileInPaths("tdecore*",[self.pytde_dir]) is None):
raise SystemExit, "Failed to find the PyKDE directory: %s" % self.pytde_dir
self.announce("Using %s for PyKDE modules" % self.pytde_dir)
raise SystemExit, "Failed to find the PyTDE directory: %s" % self.pytde_dir
self.announce("Using %s for PyTDE modules" % self.pytde_dir)
# Sip dir
if self.sip_dir is None:
@ -1717,13 +1717,13 @@ class BuildKioslave(Command):
linklist.append(self.sip_dir+"/sip.so")
# PyQt libs
linklist.append(self.pyqt_dir+"/qt.so")
# PyKDE libs
# PyTDE libs
linklist.append(self.pytde_dir+"/tdecore.so")
# linklist.append("-L"+self.sip_dir); linklist.append("-lsip")
# # PyQt libs
# linklist.append("-L"+self.pyqt_dir); linklist.append("-lqtcmodule")
# # PyKDE libs
# # PyTDE libs
# linklist.append("-L"+self.pytde_dir); linklist.append("-ltdecorecmodule"); linklist.append("-ltdeuicmodule")
linklist.append("-L"+self.kde_lib_dir); linklist.append("-L/opt/trinity/lib"); linklist.append("-ltdecore"); linklist.append("-lpythonize")
@ -1748,7 +1748,7 @@ class BuildKioslave(Command):
/*
* Launch Control Centre modules written in Python using an embedded Python
* interpreter.
* Based on David Boddie's PyKDE-components.
* Based on David Boddie's PyTDE-components.
*/
#include <stdio.h>
@ -1987,8 +1987,8 @@ class CheckPyQt(Command):
def get_outputs(self): return []
###########################################################################
class CheckPyKDE(Command):
description = "Checks for the presence of a working PyKDE installation"
class CheckPyTDE(Command):
description = "Checks for the presence of a working PyTDE installation"
user_options = []
@ -2004,7 +2004,7 @@ class CheckPyKDE(Command):
if compare_versions(self.min_kde_version,kdever)==1:
raise SystemExit, "Your KDE version is too old. Version %s or higher is required, found %s." % (self.min_kde_version,kdever)
self.announce("Found KDE version %s." % kdever)
self.announce("Checking for a working PyKDE...")
self.announce("Checking for a working PyTDE...")
# Try to import modules one by one.
for k_module in ('dcop', 'tdecore', 'tdeui', 'kio', 'kfile', 'kparts', 'khtml', 'kspell'):
@ -2013,9 +2013,9 @@ class CheckPyKDE(Command):
exec('import ' + k_module)
except:
raise SystemExit, "Error: Couldn't find module '" + k_module + "'. \n" + \
"Couldn't import KDE! Please make sure that PyKDE is installed and working.\n" + \
"PyKDE is available here: http://www.riverbankcomputing.co.uk/pytde/index.php"
self.announce(" ...PyKDE is working")
"Couldn't import KDE! Please make sure that PyTDE is installed and working.\n" + \
"PyTDE is available here: http://www.trinitydesktop.org"
self.announce(" ...PyTDE is working")
def get_outputs(self): return []
@ -2166,7 +2166,7 @@ def get_qt_kde_versions():
for line in versioninfo.splitlines():
if line.startswith("Qt: "):
qtver = line[4:]
elif line.startswith("KDE: "):
elif line.startswith("TDE: "):
kdever = line[5:]
return qtver,kdever

Loading…
Cancel
Save