python linted
This commit is contained in:
parent
e562e63c8e
commit
41965be322
79
setup.py
79
setup.py
@ -3,7 +3,8 @@ import os
|
||||
import inspect
|
||||
|
||||
dir = os.path.dirname(inspect.getfile(inspect.currentframe()))
|
||||
if dir == '': dir = '.'
|
||||
if dir == '':
|
||||
dir = '.'
|
||||
print(('dir = %s' % dir))
|
||||
|
||||
os.chdir(dir)
|
||||
@ -24,15 +25,18 @@ if os.path.exists(in_file):
|
||||
output.write(input.read())
|
||||
output.write('"""\n')
|
||||
finally:
|
||||
if input is not None: input.close()
|
||||
if output is not None: output.close()
|
||||
if input is not None:
|
||||
input.close()
|
||||
if output is not None:
|
||||
output.close()
|
||||
|
||||
|
||||
# Bootstrap
|
||||
try:
|
||||
import ez_setup
|
||||
ez_setup.use_setuptools()
|
||||
except: pass
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
app = 'FAHControl'
|
||||
|
||||
@ -40,24 +44,24 @@ if sys.platform == 'darwin':
|
||||
from setuptools import setup
|
||||
|
||||
plist = dict(
|
||||
CFBundleDisplayName = 'FAHControl',
|
||||
CFBundleIdentifier = 'org.foldingathome.fahcontrol',
|
||||
CFBundleSignature = '????',
|
||||
NSHumanReadableCopyright = 'Copyright 2010-2018 foldingathome.org',
|
||||
CFBundleDisplayName='FAHControl',
|
||||
CFBundleIdentifier='org.foldingathome.fahcontrol',
|
||||
CFBundleSignature='????',
|
||||
NSHumanReadableCopyright='Copyright 2010-2018 foldingathome.org',
|
||||
)
|
||||
|
||||
options = dict(
|
||||
argv_emulation = False,
|
||||
includes = 'cairo, pango, pangocairo, atk, gobject, gio',
|
||||
iconfile = 'images/FAHControl.icns',
|
||||
resources = ['osx/themes', 'osx/entitlements.plist'],
|
||||
plist = plist,
|
||||
argv_emulation=False,
|
||||
includes='cairo, pango, pangocairo, atk, gobject, gio',
|
||||
iconfile='images/FAHControl.icns',
|
||||
resources=['osx/themes', 'osx/entitlements.plist'],
|
||||
plist=plist,
|
||||
)
|
||||
|
||||
extra_opts = dict(
|
||||
app = [app],
|
||||
options = {'py2app': options},
|
||||
setup_requires = ['py2app'],
|
||||
app=[app],
|
||||
options={'py2app': options},
|
||||
setup_requires=['py2app'],
|
||||
)
|
||||
|
||||
# Hack around py2app problem with python scripts with out .py extension.
|
||||
@ -68,38 +72,39 @@ elif sys.platform == 'win32':
|
||||
from cx_Freeze import setup, Executable
|
||||
|
||||
# Change base to 'Console' for debugging
|
||||
e = Executable(app, base = 'Win32GUI', icon = 'images/FAHControl.ico')
|
||||
e = Executable(app, base='Win32GUI', icon='images/FAHControl.ico')
|
||||
options = {
|
||||
'build_exe': {
|
||||
'build_exe': 'gui',
|
||||
'includes': 'gtk'
|
||||
}
|
||||
}
|
||||
extra_opts = dict(executables = [e], options = options)
|
||||
extra_opts = dict(executables=[e], options=options)
|
||||
|
||||
else:
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
extra_opts = dict(
|
||||
packages = find_packages(),
|
||||
scripts = [app],
|
||||
data_files = [('/usr/share/pixmaps', ['images/FAHControl.png'])],
|
||||
install_requires = 'gtk2 >= 2.14.0',
|
||||
include_package_data = True,
|
||||
packages=find_packages(),
|
||||
scripts=[app],
|
||||
data_files=[('/usr/share/pixmaps', ['images/FAHControl.png'])],
|
||||
install_requires='gtk2 >= 2.14.0',
|
||||
include_package_data=True,
|
||||
)
|
||||
|
||||
try:
|
||||
version = open('version.txt').read().strip()
|
||||
version.split('.')
|
||||
except: version = '0.0.0'
|
||||
except:
|
||||
version = '0.0.0'
|
||||
|
||||
if not os.path.exists('fah/Version.py') or version != '0.0.0':
|
||||
open('fah/Version.py', 'w').write('version = \'%s\'\n' % version)
|
||||
|
||||
description = \
|
||||
'''Folding@home is a distributed computing project using volunteered
|
||||
computer resources.
|
||||
'''
|
||||
'''Folding@home is a distributed computing project using volunteered
|
||||
computer resources.
|
||||
'''
|
||||
short_description = '''
|
||||
This package contains FAHControl, a graphical monitor and control
|
||||
utility for the Folding@home client. It gives an overview of running
|
||||
@ -111,16 +116,16 @@ additional information and settings for enthusiasts and gurus.'''
|
||||
description += short_description
|
||||
|
||||
setup(
|
||||
name = 'FAHControl',
|
||||
version = version,
|
||||
description = 'Folding@home Client Control',
|
||||
long_description = description,
|
||||
author = 'Joseph Coffland',
|
||||
author_email = 'joseph@cauldrondevelopment.com',
|
||||
license = 'GNU General Public License version 3',
|
||||
keywords = 'protein, molecular dynamics, simulation',
|
||||
url = 'https://foldingathome.org/',
|
||||
package_data = {'fah': ['*.glade']},
|
||||
name='FAHControl',
|
||||
version=version,
|
||||
description='Folding@home Client Control',
|
||||
long_description=description,
|
||||
author='Joseph Coffland',
|
||||
author_email='joseph@cauldrondevelopment.com',
|
||||
license='GNU General Public License version 3',
|
||||
keywords='protein, molecular dynamics, simulation',
|
||||
url='https://foldingathome.org/',
|
||||
package_data={'fah': ['*.glade']},
|
||||
**extra_opts)
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
|
Loading…
x
Reference in New Issue
Block a user