diff --git a/setup.py b/setup.py index 7db91ef..3d13216 100755 --- a/setup.py +++ b/setup.py @@ -29,21 +29,9 @@ VERSION_NUM = '1.6.0' class configure(Command): description = "configure the paths that Wicd will be installed to" - # lib = '/usr/share/wicd/' - # etc = '/etc/wicd/' - # images = '/usr/share/pixmaps/wicd/' - # encryption = etc + 'encryption/templates/' - # bin = current - # networks = '/var/lib/wicd/configurations/' - # log = '/var/log/wicd/' - # - # python = '/usr/bin/python' - user_options = [ - # these first bunch are DIRECTORIES. - # they need to end a slash ("/") - # which will automatically be tacked on - # in the finalize_options method + # The first bunch is DIRECTORIES - they need to end with a slash ("/"), + # which will automatically be tacked on in the finalize_options method ('lib=', None, 'set the lib directory'), ('share=', None, 'set the share directory'), ('etc=', None, 'set the etc directory'), @@ -60,7 +48,6 @@ class configure(Command): ('dbus=', None, 'set the directory the dbus config file is stored in'), ('desktop=', None, 'set the directory the .desktop file is stored in'), ('icons=', None, "set the base directory for the .desktop file's icons"), - # ('pixmaps=', None, 'directory for images'), ('translations=', None, 'set the directory translations are stored in'), ('autostart=', None, 'set the directory that will be autostarted on desktop login'), ('init=', None, 'set the directory for the init file'), @@ -68,17 +55,16 @@ class configure(Command): ('mandir=', None, 'set the directory for the man pages'), ('kdedir=', None, 'set the kde autostart directory'), - # anything after here is a FILE. - # in other words, a slash ("/") will not automatically - # be added to the end of the path. - # do NOT remove the python= entry as it signals the beginning - # of the file section. + # Anything after this is a FILE; in other words, a slash ("/") will + # not automatically be added to the end of the path. + # Do NOT remove the python= entry, as it signals the beginning of + # the file section. ('python=', None, 'set the path to the Python executable'), ('pidfile=', None, 'set the pid file'), ('initfile=', None, 'set the init file to use'), ('initfilename=', None, "set the name of the init file (don't use)"), - # switches + # Configure switches ('no-install-init', None, "do not install the init file"), ('no-install-man', None, 'do not install the man file'), ('no-install-kde', None, 'do not install the kde autostart file'), @@ -118,8 +104,7 @@ class configure(Command): self.no_install_pmutils = False self.no_install_docs = False - # figure out what the default init file - # location should be on several different distros + # Determine the default init file location on several different distros self.distro_detect_failed = False @@ -190,10 +175,12 @@ class configure(Command): except (OSError, ValueError): pass # use our default + self.python = '/usr/bin/python' self.pidfile = '/var/run/wicd/wicd.pid' self.initfilename = os.path.basename(self.initfile) + def finalize_options(self): if self.distro_detect_failed == True: if not self.no_install_init: