From 66b104e167c061e0eab4fc7fd05bd8a911c39750 Mon Sep 17 00:00:00 2001 From: Robby Workman Date: Fri, 6 Nov 2009 11:40:17 -0600 Subject: [PATCH 1/2] Allow installation without the gtk client. This adds a --no-install-gtk switch to configure. Icons are not installed if the gtk client is not installed. --- in/wicd=wpath.py.in | 1 + setup.py | 49 +++++++++++++++++++++++++-------------------- 2 files changed, 28 insertions(+), 22 deletions(-) diff --git a/in/wicd=wpath.py.in b/in/wicd=wpath.py.in index eebd556..5c2e1e8 100755 --- a/in/wicd=wpath.py.in +++ b/in/wicd=wpath.py.in @@ -73,6 +73,7 @@ no_install_man = %NO_INSTALL_MAN% no_install_kde = %NO_INSTALL_KDE% no_install_acpi = %NO_INSTALL_ACPI% no_install_docs = %NO_INSTALL_DOCS% +no_install_gtk = %NO_INSTALL_GTK% no_install_ncurses = %NO_INSTALL_NCURSES% no_use_notifications = %NO_USE_NOTIFICATIONS% diff --git a/setup.py b/setup.py index fbdd0c6..b3d2ad3 100755 --- a/setup.py +++ b/setup.py @@ -98,6 +98,7 @@ class configure(Command): ('no-install-pmutils', None, 'do not install the pm-utils hooks'), ('no-install-docs', None, 'do not install the auxiliary documentation'), ('no-install-ncurses', None, 'do not install the ncurses client'), + ('no-install-gtk', None, 'do not install the gtk client'), ('no-use-notifications', None, 'do not ever allow the use of libnotify notifications') ] @@ -133,6 +134,7 @@ class configure(Command): self.no_install_acpi = False self.no_install_pmutils = False self.no_install_docs = False + self.no_install_gtk = False self.no_install_ncurses = False self.no_use_notifications = False @@ -463,39 +465,42 @@ try: print "Using init file",(wpath.init, wpath.initfile) data = [ (wpath.dbus, ['other/wicd.conf']), - (wpath.desktop, ['other/wicd.desktop']), (wpath.log, []), (wpath.etc, []), - (wpath.icons + 'scalable/apps/', ['icons/scalable/wicd-client.svg']), - (wpath.icons + '192x192/apps/', ['icons/192px/wicd-client.png']), - (wpath.icons + '128x128/apps/', ['icons/128px/wicd-client.png']), - (wpath.icons + '96x96/apps/', ['icons/96px/wicd-client.png']), - (wpath.icons + '72x72/apps/', ['icons/72px/wicd-client.png']), - (wpath.icons + '64x64/apps/', ['icons/64px/wicd-client.png']), - (wpath.icons + '48x48/apps/', ['icons/48px/wicd-client.png']), - (wpath.icons + '36x36/apps/', ['icons/36px/wicd-client.png']), - (wpath.icons + '32x32/apps/', ['icons/32px/wicd-client.png']), - (wpath.icons + '24x24/apps/', ['icons/24px/wicd-client.png']), - (wpath.icons + '22x22/apps/', ['icons/22px/wicd-client.png']), - (wpath.icons + '16x16/apps/', ['icons/16px/wicd-client.png']), - (wpath.images, [('images/' + b) for b in os.listdir('images') if not b.startswith('.')]), (wpath.encryption, [('encryption/templates/' + b) for b in os.listdir('encryption/templates') if not b.startswith('.')]), (wpath.networks, []), - (wpath.bin, ['scripts/wicd-client', ]), - (wpath.sbin, ['scripts/wicd', ]), - (wpath.share, ['data/wicd.glade', ]), - (wpath.lib, ['wicd/wicd-client.py', 'wicd/monitor.py', - 'wicd/wicd-daemon.py', 'wicd/configscript.py', + (wpath.sbin, ['scripts/wicd']), + (wpath.lib, ['wicd/monitor.py', 'wicd/wicd-daemon.py', 'wicd/configscript.py', 'wicd/suspend.py', 'wicd/autoconnect.py']), (wpath.backends, ['wicd/backends/be-external.py', 'wicd/backends/be-ioctl.py']), - (wpath.autostart, ['other/wicd-tray.desktop', ]), (wpath.scripts, []), (wpath.predisconnectscripts, []), (wpath.postdisconnectscripts, []), (wpath.preconnectscripts, []), (wpath.postconnectscripts, []), ] + if not wpath.no_install_gtk: + data.append((wpath.desktop, ['other/wicd.desktop'])) + data.append((wpath.bin, ['scripts/wicd-client'])) + data.append((wpath.share, ['data/wicd.glade'])) + data.append((wpath.lib, ['wicd/wicd-client.py'])) + data.append((wpath.autostart, ['other/wicd-tray.desktop'])) + if not wpath.no_install_man: + data.append((wpath.mandir + 'man1/', [ 'man/wicd-client.1' ])) + data.append((wpath.icons + 'scalable/apps/', ['icons/scalable/wicd-client.svg'])) + data.append((wpath.icons + '192x192/apps/', ['icons/192px/wicd-client.png'])) + data.append((wpath.icons + '128x128/apps/', ['icons/128px/wicd-client.png'])) + data.append((wpath.icons + '96x96/apps/', ['icons/96px/wicd-client.png'])) + data.append((wpath.icons + '72x72/apps/', ['icons/72px/wicd-client.png'])) + data.append((wpath.icons + '64x64/apps/', ['icons/64px/wicd-client.png'])) + data.append((wpath.icons + '48x48/apps/', ['icons/48px/wicd-client.png'])) + data.append((wpath.icons + '36x36/apps/', ['icons/36px/wicd-client.png'])) + data.append((wpath.icons + '32x32/apps/', ['icons/32px/wicd-client.png'])) + data.append((wpath.icons + '24x24/apps/', ['icons/24px/wicd-client.png'])) + data.append((wpath.icons + '22x22/apps/', ['icons/22px/wicd-client.png'])) + data.append((wpath.icons + '16x16/apps/', ['icons/16px/wicd-client.png'])) + data.append((wpath.images, [('images/' + b) for b in os.listdir('images') if not b.startswith('.')])) if not wpath.no_install_ncurses: data.append((wpath.lib, ['curses/curses_misc.py'])) data.append((wpath.lib, ['curses/prefs_curses.py'])) @@ -513,7 +518,8 @@ try: 'README', 'CHANGES', ])) data.append((wpath.varlib, ['other/WHEREAREMYFILES'])) if not wpath.no_install_kde: - data.append((wpath.kdedir, ['other/wicd-tray.desktop'])) + if not wpath.no_install_gtk: + data.append((wpath.kdedir, ['other/wicd-tray.desktop'])) if not wpath.no_install_init: data.append((wpath.init, [ wpath.initfile ])) if not wpath.no_install_man: @@ -521,7 +527,6 @@ try: data.append((wpath.mandir + 'man5/', [ 'man/wicd-manager-settings.conf.5' ])) data.append((wpath.mandir + 'man5/', [ 'man/wicd-wired-settings.conf.5' ])) data.append((wpath.mandir + 'man5/', [ 'man/wicd-wireless-settings.conf.5' ])) - data.append((wpath.mandir + 'man1/', [ 'man/wicd-client.1' ])) if not wpath.no_install_acpi: data.append((wpath.resume, ['other/80-wicd-connect.sh' ])) data.append((wpath.suspend, ['other/50-wicd-suspend.sh' ])) From 006cfd34b4d7adb23e1536d550c60656a4c503e4 Mon Sep 17 00:00:00 2001 From: Robby Workman Date: Fri, 6 Nov 2009 15:52:15 -0600 Subject: [PATCH 2/2] Make --no-install-gtk ignore the gui and guiutil python modules This is not how Adam recommended doing it, but I couldn't get that way to work. :-) --- setup.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index b3d2ad3..45a3a1e 100755 --- a/setup.py +++ b/setup.py @@ -460,6 +460,10 @@ message. It is probably because you haven't run python setup.py configure yet or you are running it for the first time.''' data = [] +py_modules=['wicd.networking','wicd.misc','wicd.wnettools', + 'wicd.wpath','wicd.prefs','wicd.netentry','wicd.dbusmanager', + 'wicd.logfile','wicd.backend','wicd.configmanager', + 'wicd.translations'] try: print "Using init file",(wpath.init, wpath.initfile) @@ -481,6 +485,7 @@ try: (wpath.postconnectscripts, []), ] if not wpath.no_install_gtk: + py_modules.extend(['wicd.gui', 'wicd.guiutil']) data.append((wpath.desktop, ['other/wicd.desktop'])) data.append((wpath.bin, ['scripts/wicd-client'])) data.append((wpath.share, ['data/wicd.glade'])) @@ -544,7 +549,6 @@ except Exception, e: print '''Error setting up data array. This is normal if python setup.py configure has not yet been run.''' - wpactrl_ext = Extension(name='wpactrl', sources=['depends/python-wpactrl/wpa_ctrl.c', 'depends/python-wpactrl/wpactrl.c'], @@ -572,9 +576,6 @@ connect at startup to any preferred network within range. author_email="compwiz18@gmail.com, oreilldf@gmail.com, ampsaltis@gmail.com", url="http://wicd.net", license="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html", - py_modules=['wicd.networking','wicd.misc','wicd.gui','wicd.wnettools', - 'wicd.wpath','wicd.prefs','wicd.netentry','wicd.dbusmanager', - 'wicd.logfile','wicd.backend','wicd.configmanager', - 'wicd.guiutil','wicd.translations'], + py_modules=py_modules, data_files=data )