PEP8 style fixes and other small style fixes
I used autopep8 on some files and did carefully check the changes. I ignored E501,E302,E231,E225,E222,E221,E241,E203 in my search, and at least E501 on any autopep8 run. Other style fixes not related to PEP8: * Only use new-style classes. I don't think the usage of old-style classes was voluntary. Old-style classes are removed in Python 3. * Convert an if/else to a one-liner in mediawiki, change docstring style change to a comment something that wasn't really appropriate for a docstring. * Unneeded first if condition in meteofrance
This commit is contained in:
parent
1e000acf3a
commit
006e97a8be
99 changed files with 441 additions and 350 deletions
26
setup.py
26
setup.py
|
|
@ -38,7 +38,7 @@ def check_executable_win(executable, error):
|
|||
path = filter(None, path.split(";"))
|
||||
|
||||
if dotfirst:
|
||||
path = ["."]+path
|
||||
path = ["."] + path
|
||||
|
||||
pathext = os.environ[pathextsrc]
|
||||
pathext = filter(None, pathext.split(";"))
|
||||
|
|
@ -56,13 +56,14 @@ def check_executable_win(executable, error):
|
|||
for e in pathext:
|
||||
filePath = os.path.join(d, cmdName + e)
|
||||
if os.path.exists(filePath):
|
||||
return filePath.replace( '\\', '/' )
|
||||
return filePath.replace('\\', '/')
|
||||
|
||||
print >>sys.stderr, 'Error: %s is not installed on your system.' % executable
|
||||
if error:
|
||||
print >>sys.stderr, error
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def check_executable_unix(executable, error):
|
||||
with open('/dev/null', 'w') as devnull:
|
||||
process = subprocess.Popen(['which', executable], stdout=devnull)
|
||||
|
|
@ -80,28 +81,31 @@ if sys.platform == 'win32':
|
|||
else:
|
||||
check_executable = check_executable_unix
|
||||
|
||||
|
||||
def build_qt():
|
||||
print 'Building Qt applications'
|
||||
pyuic4 = check_executable('pyuic4', 'Install PyQt4-devel or disable Qt applications (with --no-qt).')
|
||||
|
||||
if sys.platform == 'win32':
|
||||
env={ 'PYUIC' : pyuic4, 'PATH':os.environ['PATH']}
|
||||
env = {'PYUIC': pyuic4, 'PATH': os.environ['PATH']}
|
||||
extraMakeFlag = ['-e']
|
||||
else:
|
||||
env = None
|
||||
extraMakeFlag = []
|
||||
|
||||
subprocess.check_call(['make']+extraMakeFlag+['-C','weboob/applications/qboobmsg/ui'], env=env )
|
||||
subprocess.check_call(['make']+extraMakeFlag+['-C','weboob/applications/qhavedate/ui'], env=env )
|
||||
subprocess.check_call(['make']+extraMakeFlag+['-C', 'weboob/applications/qboobmsg/ui'], env=env)
|
||||
subprocess.check_call(['make']+extraMakeFlag+['-C', 'weboob/applications/qhavedate/ui'], env=env)
|
||||
if sys.platform != 'win32':
|
||||
subprocess.check_call(['make']+extraMakeFlag+['-C','weboob/applications/qvideoob/ui'], env=env )
|
||||
subprocess.check_call(['make']+extraMakeFlag+['-C','weboob/applications/qwebcontentedit/ui'], env=env )
|
||||
subprocess.check_call(['make']+extraMakeFlag+['-C','weboob/applications/qflatboob/ui'], env=env )
|
||||
subprocess.check_call(['make']+extraMakeFlag+['-C','weboob/tools/application/qt'], env=env )
|
||||
subprocess.check_call(['make']+extraMakeFlag+['-C', 'weboob/applications/qvideoob/ui'], env=env)
|
||||
subprocess.check_call(['make']+extraMakeFlag+['-C', 'weboob/applications/qwebcontentedit/ui'], env=env)
|
||||
subprocess.check_call(['make']+extraMakeFlag+['-C', 'weboob/applications/qflatboob/ui'], env=env)
|
||||
subprocess.check_call(['make']+extraMakeFlag+['-C', 'weboob/tools/application/qt'], env=env)
|
||||
|
||||
class Options:
|
||||
|
||||
class Options(object):
|
||||
pass
|
||||
|
||||
|
||||
options = Options()
|
||||
options.hildon = False
|
||||
options.qt = True
|
||||
|
|
@ -189,7 +193,7 @@ if options.xdg:
|
|||
|
||||
setup(
|
||||
name='weboob',
|
||||
version = '0.b',
|
||||
version='0.b',
|
||||
description='Weboob, Web Out Of Browsers',
|
||||
long_description=open('README').read(),
|
||||
author='Romain Bignon',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue