|
|
|
@ -23,10 +23,10 @@ import os
|
|
|
|
|
import glob
|
|
|
|
|
sys.path.insert(0,"src") # We need this for the import statement below.
|
|
|
|
|
|
|
|
|
|
import kdedistutils
|
|
|
|
|
import tdedistutils
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
|
kdedistutils.setup(name="pytdeextensions",
|
|
|
|
|
tdedistutils.setup(name="pytdeextensions",
|
|
|
|
|
version="0.4.0",
|
|
|
|
|
author="Simon Edwards",
|
|
|
|
|
author_email="simon@simonzone.com",
|
|
|
|
@ -35,7 +35,7 @@ def main():
|
|
|
|
|
min_qt_version = "3.0.0",
|
|
|
|
|
license = "LGPL",
|
|
|
|
|
package_dir = {'': 'src'},
|
|
|
|
|
py_modules = ["kdedistutils","qtuicompiler","qtdesigner","kdedesigner"],
|
|
|
|
|
py_modules = ["tdedistutils","qtuicompiler","qtdesigner","kdedesigner"],
|
|
|
|
|
application_data = ["app_templates","AUTHORS","ChangeLog","COPYING","INSTALL","NEWS"],
|
|
|
|
|
docbooks = [ ('doc/en','en') ],
|
|
|
|
|
cmdclass = {
|
|
|
|
@ -46,18 +46,18 @@ def main():
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
###########################################################################
|
|
|
|
|
class InstallPyKDEExtensions(kdedistutils.InstallKDE):
|
|
|
|
|
sub_commands = kdedistutils.InstallKDE.sub_commands[:]
|
|
|
|
|
class InstallPyKDEExtensions(tdedistutils.InstallKDE):
|
|
|
|
|
sub_commands = tdedistutils.InstallKDE.sub_commands[:]
|
|
|
|
|
sub_commands.append( ('install_libpythonize',None) )
|
|
|
|
|
|
|
|
|
|
user_options = kdedistutils.InstallKDE.user_options
|
|
|
|
|
user_options = tdedistutils.InstallKDE.user_options
|
|
|
|
|
user_options.append( ('install-clib=', None, "installation directory for shared libraries") )
|
|
|
|
|
user_options.append( ('install-cheaders=', None, "installation directory for C header files") )
|
|
|
|
|
|
|
|
|
|
def initialize_options(self):
|
|
|
|
|
self.install_clib = None
|
|
|
|
|
self.install_cheaders = None
|
|
|
|
|
kdedistutils.InstallKDE.initialize_options(self)
|
|
|
|
|
tdedistutils.InstallKDE.initialize_options(self)
|
|
|
|
|
|
|
|
|
|
def finalize_options(self):
|
|
|
|
|
if self.install_clib is None:
|
|
|
|
@ -65,7 +65,7 @@ class InstallPyKDEExtensions(kdedistutils.InstallKDE):
|
|
|
|
|
self.install_clib = os.path.join(self.prefix,'lib')
|
|
|
|
|
else:
|
|
|
|
|
self.announce("Detecting KDE library directory...")
|
|
|
|
|
self.install_clib = kdedistutils.ask_kde_config('--install lib --expandvars').strip()
|
|
|
|
|
self.install_clib = tdedistutils.ask_kde_config('--install lib --expandvars').strip()
|
|
|
|
|
self.announce(" ...KDE library directory is %s" % self.install_clib)
|
|
|
|
|
|
|
|
|
|
if self.install_cheaders is None:
|
|
|
|
@ -73,10 +73,10 @@ class InstallPyKDEExtensions(kdedistutils.InstallKDE):
|
|
|
|
|
self.install_cheaders = os.path.join(self.prefix,'include')
|
|
|
|
|
else:
|
|
|
|
|
self.announce("Detecting KDE headers directory...")
|
|
|
|
|
self.install_cheaders = os.path.normpath(os.path.join(kdedistutils.ask_kde_config('--install lib --expandvars').strip(),"../include"))
|
|
|
|
|
self.install_cheaders = os.path.normpath(os.path.join(tdedistutils.ask_kde_config('--install lib --expandvars').strip(),"../include"))
|
|
|
|
|
self.announce(" ...KDE library headers is %s" % self.install_cheaders)
|
|
|
|
|
|
|
|
|
|
kdedistutils.InstallKDE.finalize_options(self)
|
|
|
|
|
tdedistutils.InstallKDE.finalize_options(self)
|
|
|
|
|
|
|
|
|
|
if self.root is not None:
|
|
|
|
|
self.change_roots('clib','cheaders')
|
|
|
|
@ -126,12 +126,12 @@ class BuildLibpythonize(Command):
|
|
|
|
|
|
|
|
|
|
# Find the C library (libgcc, libgcc_s or some other variation).
|
|
|
|
|
if self.clib is None:
|
|
|
|
|
canidatepaths = ["/usr/"+kdedistutils.get_libdir_name(), "/usr/local/"+kdedistutils.get_libdir_name(), "/usr/lib" ]
|
|
|
|
|
self.clib = kdedistutils.FindFileInPaths("libgcc*.so",canidatepaths)
|
|
|
|
|
canidatepaths = ["/usr/"+tdedistutils.get_libdir_name(), "/usr/local/"+tdedistutils.get_libdir_name(), "/usr/lib" ]
|
|
|
|
|
self.clib = tdedistutils.FindFileInPaths("libgcc*.so",canidatepaths)
|
|
|
|
|
if self.clib!=None:
|
|
|
|
|
self.clib = glob.glob(os.path.join(self.clib,'libgcc*.so'))[0]
|
|
|
|
|
else:
|
|
|
|
|
self.clib = kdedistutils.FindFileInPaths("libgcc*.a",canidatepaths)
|
|
|
|
|
self.clib = tdedistutils.FindFileInPaths("libgcc*.a",canidatepaths)
|
|
|
|
|
if self.clib!=None:
|
|
|
|
|
self.clib = glob.glob(os.path.join(self.clib,'libgcc*.a'))[0]
|
|
|
|
|
if self.clib is None:
|
|
|
|
|