Rename kdedistutils => tdedistutils

pull/1/head
Slávek Banko 11 years ago
parent edae246dc7
commit 5559f44ec6

@ -15,9 +15,9 @@
# # # #
########################################################################### ###########################################################################
import kdedistutils import tdedistutils
kdedistutils.setup(name="kcontrol_module", tdedistutils.setup(name="kcontrol_module",
version="0.1.0", version="0.1.0",
author="AUTHOR", author="AUTHOR",
author_email="YOUR@EMAIL.com", author_email="YOUR@EMAIL.com",

@ -15,9 +15,9 @@
# # # #
########################################################################### ###########################################################################
import kdedistutils import tdedistutils
kdedistutils.setup(name="kdeapp", tdedistutils.setup(name="kdeapp",
version="0.1.0", version="0.1.0",
author="AUTHOR", author="AUTHOR",
author_email="YOUR@EMAIL.com", author_email="YOUR@EMAIL.com",

@ -15,9 +15,9 @@
# # # #
########################################################################### ###########################################################################
import kdedistutils import tdedistutils
kdedistutils.setup(name="kdeutility", tdedistutils.setup(name="kdeutility",
version="0.1.0", version="0.1.0",
author="AUTHOR", author="AUTHOR",
author_email="YOUR@EMAIL.com", author_email="YOUR@EMAIL.com",

@ -15,9 +15,9 @@
# # # #
########################################################################### ###########################################################################
import kdedistutils import tdedistutils
kdedistutils.setup(name="tdeioslave", tdedistutils.setup(name="tdeioslave",
version="0.1.0", version="0.1.0",
author="AUTHOR", author="AUTHOR",
author_email="YOUR@EMAIL.com", author_email="YOUR@EMAIL.com",

@ -125,20 +125,20 @@ below.
Distutils is based around writing a <filename>setup.py</filename> file which Distutils is based around writing a <filename>setup.py</filename> file which
then uses the distutils package then uses the distutils package
To use the KDE extensions, the first thing you need to do in your <filename>setup.py To use the KDE extensions, the first thing you need to do in your <filename>setup.py
</filename> file is include the <symbol>kdedistutils</symbol> package. </filename> file is include the <symbol>tdedistutils</symbol> package.
<programlisting> <programlisting>
#!/usr/bin/env python #!/usr/bin/env python
# Setup.py file for MyKDEApplication # Setup.py file for MyKDEApplication
import kdedistutils import tdedistutils
</programlisting> </programlisting>
You need to call the <symbol>setup()</symbol> function from <symbol>kdedistutils</symbol> You need to call the <symbol>setup()</symbol> function from <symbol>tdedistutils</symbol>
with all of the configuration information about your application, much like the standard with all of the configuration information about your application, much like the standard
<symbol>setup()</symbol> from <symbol>distutils</symbol>. <symbol>setup()</symbol> from <symbol>distutils</symbol>.
<programlisting> <programlisting>
kdedistutils.setup(name="pytdeextensions", tdedistutils.setup(name="pytdeextensions",
version="0.1.0", version="0.1.0",
author="Simon Edwards", author="Simon Edwards",
author_email="simon@simonzone.com", author_email="simon@simonzone.com",

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

@ -1,6 +1,6 @@
#!/usr/bin/python #!/usr/bin/python
########################################################################### ###########################################################################
# kdedistutils - description # # tdedistutils - description #
# ------------------------------ # # ------------------------------ #
# begin : Thu Apr 21 2005 # # begin : Thu Apr 21 2005 #
# copyright : (C) 2005 by Simon Edwards # # copyright : (C) 2005 by Simon Edwards #
@ -684,7 +684,7 @@ class BuildKControlModule(Command):
if self.clib!=None: if self.clib!=None:
self.clib = glob.glob(os.path.join(self.clib,'libgcc*.a'))[0] self.clib = glob.glob(os.path.join(self.clib,'libgcc*.a'))[0]
if self.clib is None: if self.clib is None:
raise SystemExit, "kdedistutils.py (1): Failed to find a suitable libgcc library" raise SystemExit, "tdedistutils.py (1): Failed to find a suitable libgcc library"
self.announce("Using %s for clib" % self.clib) self.announce("Using %s for clib" % self.clib)
# Make a list of places to look for python .so modules # Make a list of places to look for python .so modules
@ -1634,7 +1634,7 @@ class BuildTdeioslave(Command):
if self.clib!=None: if self.clib!=None:
self.clib = glob.glob(os.path.join(self.clib,'libgcc*.a'))[0] self.clib = glob.glob(os.path.join(self.clib,'libgcc*.a'))[0]
if self.clib is None: if self.clib is None:
raise SystemExit, "kdedistutils.py (2): Failed to find a suitable libgcc library" raise SystemExit, "tdedistutils.py (2): Failed to find a suitable libgcc library"
self.announce("Using %s for clib" % self.clib) self.announce("Using %s for clib" % self.clib)
# Make a list of places to look for python .so modules # Make a list of places to look for python .so modules
Loading…
Cancel
Save