mirror of
https://github.com/gryf/wicd.git
synced 2025-12-22 22:27:59 +01:00
Make style consistent across the file
This commit is contained in:
97
setup.py
97
setup.py
@@ -248,15 +248,15 @@ class configure(Command):
|
||||
self.logperms = '0600'
|
||||
|
||||
def distro_check(self):
|
||||
print "Distro is: "+self.distro
|
||||
if self.distro in ['sles','suse']:
|
||||
print "Distro is: " + self.distro
|
||||
if self.distro in ['sles', 'suse']:
|
||||
self.init = '/etc/init.d/'
|
||||
self.initfile = 'init/suse/wicd'
|
||||
elif self.distro in ['redhat','centos','fedora']:
|
||||
elif self.distro in ['redhat', 'centos', 'fedora']:
|
||||
self.init = '/etc/rc.d/init.d/'
|
||||
self.initfile = 'init/redhat/wicd'
|
||||
self.pidfile = '/var/run/wicd.pid'
|
||||
elif self.distro in ['slackware','slamd64','bluewhite64']:
|
||||
elif self.distro in ['slackware', 'slamd64', 'bluewhite64']:
|
||||
self.init = '/etc/rc.d/'
|
||||
self.initfile = 'init/slackware/rc.wicd'
|
||||
self.docdir = '/usr/doc/wicd-%s' % VERSION_NUM
|
||||
@@ -285,7 +285,7 @@ class configure(Command):
|
||||
self.initfile = 'init/lunar/wicd'
|
||||
else :
|
||||
if self.distro == 'auto':
|
||||
print "NOTICE: Automatic distro detection found: "+self.ddistro+", retrying with that..."
|
||||
print "NOTICE: Automatic distro detection found: " + self.ddistro + ", retrying with that..."
|
||||
self.distro = self.ddistro
|
||||
self.distro_check()
|
||||
else:
|
||||
@@ -479,6 +479,7 @@ class uninstall(Command):
|
||||
|
||||
def run(self):
|
||||
os.system("./uninstall.sh")
|
||||
|
||||
try:
|
||||
import wpath
|
||||
except ImportError:
|
||||
@@ -487,7 +488,7 @@ 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',
|
||||
py_modules = ['wicd.networking','wicd.misc','wicd.wnettools',
|
||||
'wicd.wpath','wicd.dbusmanager',
|
||||
'wicd.logfile','wicd.backend','wicd.configmanager',
|
||||
'wicd.translations']
|
||||
@@ -518,13 +519,20 @@ try:
|
||||
(wpath.preconnectscripts, [empty_file]),
|
||||
(wpath.postconnectscripts, [empty_file]),
|
||||
]
|
||||
|
||||
if not wpath.no_install_gtk:
|
||||
data.append((wpath.desktop, ['other/wicd.desktop']))
|
||||
data.append((wpath.bin, ['scripts/wicd-client']))
|
||||
data.append((wpath.bin, ['scripts/wicd-gtk']))
|
||||
data.append((wpath.gtk, ['gtk/wicd-client.py', 'gtk/netentry.py', 'gtk/prefs.py',
|
||||
'gtk/gui.py', 'gtk/guiutil.py', 'data/wicd.ui',
|
||||
'gtk/configscript.py']))
|
||||
data.append((wpath.gtk, [
|
||||
'gtk/wicd-client.py',
|
||||
'gtk/netentry.py',
|
||||
'gtk/prefs.py',
|
||||
'gtk/gui.py',
|
||||
'gtk/guiutil.py',
|
||||
'data/wicd.ui',
|
||||
'gtk/configscript.py',
|
||||
]))
|
||||
data.append((wpath.autostart, ['other/wicd-tray.desktop']))
|
||||
if not wpath.no_install_man:
|
||||
data.append((wpath.mandir + 'man1/', [ 'man/wicd-client.1' ]))
|
||||
@@ -575,23 +583,23 @@ try:
|
||||
if not wpath.no_install_init:
|
||||
data.append((wpath.init, [ wpath.initfile ]))
|
||||
if not wpath.no_install_man:
|
||||
data.append((wpath.mandir + 'man8/', [ 'man/wicd.8' ]))
|
||||
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' ]))
|
||||
data.append((wpath.mandir + 'man8/', ['man/wicd.8']))
|
||||
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_man and not wpath.no_install_i18n_man:
|
||||
# Dutch translations of the man
|
||||
data.append((wpath.mandir + 'nl/man8/', [ 'man/nl/wicd.8' ]))
|
||||
data.append((wpath.mandir + 'nl/man5/', [ 'man/nl/wicd-manager-settings.conf.5' ]))
|
||||
data.append((wpath.mandir + 'nl/man5/', [ 'man/nl/wicd-wired-settings.conf.5' ]))
|
||||
data.append((wpath.mandir + 'nl/man5/', [ 'man/nl/wicd-wireless-settings.conf.5' ]))
|
||||
data.append((wpath.mandir + 'nl/man1/', [ 'man/nl/wicd-client.1' ]))
|
||||
data.append((wpath.mandir + 'nl/man8/', ['man/nl/wicd.8' ]))
|
||||
data.append((wpath.mandir + 'nl/man5/', ['man/nl/wicd-manager-settings.conf.5']))
|
||||
data.append((wpath.mandir + 'nl/man5/', ['man/nl/wicd-wired-settings.conf.5']))
|
||||
data.append((wpath.mandir + 'nl/man5/', ['man/nl/wicd-wireless-settings.conf.5']))
|
||||
data.append((wpath.mandir + 'nl/man1/', ['man/nl/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' ]))
|
||||
data.append((wpath.resume, ['other/80-wicd-connect.sh']))
|
||||
data.append((wpath.suspend, ['other/50-wicd-suspend.sh']))
|
||||
if not wpath.no_install_pmutils:
|
||||
data.append((wpath.pmutils, ['other/55wicd' ]))
|
||||
data.append((wpath.pmutils, ['other/55wicd']))
|
||||
print 'Using pid path', os.path.basename(wpath.pidfile)
|
||||
print 'Language support for',
|
||||
for language in os.listdir('translations/'):
|
||||
@@ -605,22 +613,27 @@ except Exception, e:
|
||||
python setup.py configure has not yet been run.'''
|
||||
|
||||
|
||||
wpactrl_ext = Extension(name='wpactrl',
|
||||
sources=['depends/python-wpactrl/wpa_ctrl.c',
|
||||
wpactrl_ext = Extension(name = 'wpactrl',
|
||||
sources = ['depends/python-wpactrl/wpa_ctrl.c',
|
||||
'depends/python-wpactrl/wpactrl.c'],
|
||||
extra_compile_args=["-fno-strict-aliasing"])
|
||||
extra_compile_args = ["-fno-strict-aliasing"])
|
||||
|
||||
iwscan_ext = Extension(name='iwscan', libraries=['iw'],
|
||||
sources=['depends/python-iwscan/pyiwscan.c'])
|
||||
iwscan_ext = Extension(name = 'iwscan', libraries = ['iw'],
|
||||
sources = ['depends/python-iwscan/pyiwscan.c'])
|
||||
|
||||
setup(cmdclass={'configure' : configure, 'get_translations' : get_translations,
|
||||
'uninstall' : uninstall, 'test' : test, 'clear_generated' :
|
||||
clear_generated, 'update_translations_py' :
|
||||
update_translations_py},
|
||||
name="Wicd",
|
||||
version=VERSION_NUM,
|
||||
description="A wireless and wired network manager",
|
||||
long_description="""A complete network connection manager
|
||||
setup(
|
||||
cmdclass = {
|
||||
'configure' : configure,
|
||||
'get_translations' : get_translations,
|
||||
'uninstall' : uninstall,
|
||||
'test' : test,
|
||||
'clear_generated' : clear_generated,
|
||||
'update_translations_py' : update_translations_py,
|
||||
},
|
||||
name = "Wicd",
|
||||
version = VERSION_NUM,
|
||||
description = "A wireless and wired network manager",
|
||||
long_description = """A complete network connection manager
|
||||
Wicd supports wired and wireless networks, and capable of
|
||||
creating and tracking profiles for both. It has a
|
||||
template-based wireless encryption system, which allows the user
|
||||
@@ -628,10 +641,10 @@ to easily add encryption methods used. It ships with some common
|
||||
encryption types, such as WPA and WEP. Wicd will automatically
|
||||
connect at startup to any preferred network within range.
|
||||
""",
|
||||
author="Adam Blackburn, Dan O'Reilly, Andrew Psaltis",
|
||||
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=py_modules,
|
||||
data_files=data
|
||||
)
|
||||
author = "Adam Blackburn, Dan O'Reilly, Andrew Psaltis",
|
||||
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 = py_modules,
|
||||
data_files = data,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user