summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-03-11 08:10:59 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-03-11 08:10:59 +0000
commit19f9c3f434e0648b1952102c819ebee45de6e1e3 (patch)
treee913a90912ca3f51fa0db0c048df3595f4b6f1d7 /setup.py
downloaddesktop-effects-tde-19f9c3f434e0648b1952102c819ebee45de6e1e3.tar.gz
desktop-effects-tde-19f9c3f434e0648b1952102c819ebee45de6e1e3.zip
Added KDE3 version of Desktop Effects
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/desktop-effects-kde@1101884 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py56
1 files changed, 56 insertions, 0 deletions
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..096d2e4
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,56 @@
+
+# setup.py file for desktop-effects-kde
+# by the Kubuntu Team, inspired by the Restricted Manager setup file
+# -*- coding: utf-8 -*-
+from distutils.core import setup, Extension
+from distutils.command.clean import clean
+from distutils.dir_util import remove_tree
+import subprocess, glob, os.path, shutil
+
+# for kcm modules building
+import kdedistutils
+
+mo_files = []
+# HACK: make sure that the mo files are generated and up-to-date
+#subprocess.call(["make", "-C", "po", "build-mo"])
+for filepath in glob.glob("po/mo/*/LC_MESSAGES/*.mo"):
+ lang = filepath[len("po/mo/"):]
+ targetpath = os.path.dirname(os.path.join("share/locale",lang))
+ mo_files.append((targetpath, [filepath]))
+
+# build .py files from the .ui files.
+for file in glob.glob("data/*.ui"):
+ subprocess.call(["kdepyuic", file])
+ shutil.move(file[5:-3]+".py","./")
+# patch desktopeffectsdialog.py for kcm-specific fixes
+subprocess.call(["patch", "-p1", "-i" "data/kcm-fix.patch"])
+
+class RMClean(clean):
+ ''' cleans up the hacks above, mostly '''
+ def run(self):
+ clean.run(self)
+ if os.path.exists('build/'):
+ remove_tree('build/')
+ generated_files = ['applications/kde/kcm_restricted-manager.cpp' , 'RestrictedManager/ManagerWindowKDE.py',
+ 'RestrictedManager/FwHandlerBcm.py', 'RestrictedManager/FwHandlerProgress.py']
+ for file in generated_files:
+ if os.path.exists(file):
+ os.remove(file)
+
+kdedistutils.setup(
+ name="desktop-effects-kde",
+ author="Martin Böhm",
+ author_email="martin.bohm@kubuntu.org",
+ maintainer="Kubuntu Team",
+ maintainer_email="kubuntu-devel@lists.ubuntu.com",
+ url="http://www.kubuntu.org",
+ license="gpl",
+ description="enable and configure Compiz effects in KDE",
+ packages=["DesktopEffects/"],
+ data_files=[("share/desktop-effects", glob.glob("data/*.png")),
+ ("share/applications/kde", glob.glob("applications/kde/*.desktop"))
+ ],
+ scripts=["desktop-effects-kde"],
+ kcontrol_modules = [ ('applications/kde/desktop-effects-kde.desktop.in', 'DesktopEffectsKDE')],
+ cmdclass = { 'clean' : RMClean }
+)