diff --git a/setup.py b/setup.py index 28372fd0..84d7200d 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ from distutils.core import setup from pysollib.settings import VERSION from pysollib.settings import PACKAGE_URL if os.name == 'nt': - import py2exe + eval('import py2exe') if os.name == 'posix': data_dir = 'share/PySolFC' @@ -24,7 +24,7 @@ ddirs = [ 'themes', 'tcl', ] -for s in file('MANIFEST.in'): +for s in open('MANIFEST.in'): if s.startswith('graft data/cardset-'): ddirs.append(s[11:].strip()) @@ -35,7 +35,7 @@ for d in ddirs: if root.find('.svn') >= 0: continue if files: - #files = map(lambda f: os.path.join(root, f), files) + # files = map(lambda f: os.path.join(root, f), files) files = [os.path.join(root, f) for f in files] data_files.append((os.path.join(data_dir, root[5:]), files)) @@ -43,15 +43,15 @@ if os.name == 'posix': data_files.append(('share/pixmaps', ['data/pysol.xbm', 'data/pysol.xpm'])) data_files.append(('share/icons', ['data/images/misc/pysol01.png', - 'data/images/misc/pysol02.png',])) + 'data/images/misc/pysol02.png', ])) for l in ('ru', 'ru_RU'): data_files.append(('share/locale/%s/LC_MESSAGES' % l, ['locale/%s/LC_MESSAGES/pysol.mo' % l])) data_files.append((data_dir, ['data/pysolfc.glade'])) data_files.append(('share/applications', ['data/pysol.desktop'])) -##from pprint import pprint; pprint(data_files) -##import sys; sys.exit() +# from pprint import pprint; pprint(data_files) +# import sys; sys.exit() long_description = '''\ PySolFC is a collection of more than 1000 solitaire card games. @@ -62,29 +62,29 @@ plug-ins, an integrated HTML help browser, and lots of documentation. ''' kw = { - 'name' : 'PySolFC', - 'version' : VERSION, - 'url' : PACKAGE_URL, - 'author' : 'Skomoroh', - 'author_email' : 'skomoroh@gmail.com', - 'description' : 'a Python solitaire game collection', - 'long_description' : long_description, - 'license' : 'GPL', - 'scripts' : ['pysol.py'], - 'packages' : ['pysollib', - 'pysollib.configobj', - 'pysollib.macosx', - 'pysollib.winsystems', - 'pysollib.tk', - 'pysollib.tile', - 'pysollib.pysolgtk', - 'pysollib.ui', - 'pysollib.ui.tktile', - 'pysollib.games', - 'pysollib.games.special', - 'pysollib.games.ultra', - 'pysollib.games.mahjongg'], - 'data_files' : data_files, + 'name': 'PySolFC', + 'version': VERSION, + 'url': PACKAGE_URL, + 'author': 'Skomoroh', + 'author_email': 'skomoroh@gmail.com', + 'description': 'a Python solitaire game collection', + 'long_description': long_description, + 'license': 'GPL', + 'scripts': ['pysol.py'], + 'packages': ['pysollib', + 'pysollib.configobj', + 'pysollib.macosx', + 'pysollib.winsystems', + 'pysollib.tk', + 'pysollib.tile', + 'pysollib.pysolgtk', + 'pysollib.ui', + 'pysollib.ui.tktile', + 'pysollib.games', + 'pysollib.games.special', + 'pysollib.games.ultra', + 'pysollib.games.mahjongg'], + 'data_files': data_files, } if os.name == 'nt': diff --git a/setup_osx.py b/setup_osx.py index a7aa7281..fe44ee01 100644 --- a/setup_osx.py +++ b/setup_osx.py @@ -3,8 +3,10 @@ Usage: python setup.py py2app """ -import os, sys +import os +import sys import shutil +import Tkinter from subprocess import call from setuptools import setup from pysollib.settings import PACKAGE, VERSION @@ -26,7 +28,6 @@ call("./scripts/all_games.py > docs/all_games.html", shell=True) # Use Tile widgets, if they are installed. # http://tktable.sourceforge.net/tile/ -import Tkinter root = Tkinter.Tk() root.withdraw() try: @@ -52,19 +53,19 @@ GETINFO_STRING = "PySol Fan Club Edition \ %s %s, (C) 1998-2003 Markus F.X.J Oberhumer \ (C) 2006-2007 Skomoroh" % (PACKAGE, VERSION) PLIST = dict( - CFBundleDevelopmentRegion = 'en_US', - CFBundleExecutable = PACKAGE, - CFBundleDisplayName = PACKAGE, - CFBundleGetInfoString = GETINFO_STRING, - CFBundleIdentifier = 'net.sourceforge.pysolfc', - CFBundleName = PACKAGE, - CFBundleVersion = '%s' % VERSION, - CFBundleShortVersionString = '%s' % VERSION, - NSHumanReadableCopyright = "Copyright (C) 1998-2003 Markus F.X.J. Oberhumer", + CFBundleDevelopmentRegion='en_US', + CFBundleExecutable=PACKAGE, + CFBundleDisplayName=PACKAGE, + CFBundleGetInfoString=GETINFO_STRING, + CFBundleIdentifier='net.sourceforge.pysolfc', + CFBundleName=PACKAGE, + CFBundleVersion='%s' % VERSION, + CFBundleShortVersionString='%s' % VERSION, + NSHumanReadableCopyright="Copyright (C) 1998-2003 Markus F.X.J. Oberhumer", ) APP = ['pysol.py'] ICON_FILE = 'data/PySol.icns' -DATA_FILES = ['docs', 'data', 'scripts','COPYING', 'README.md'] + SOLVER +DATA_FILES = ['docs', 'data', 'scripts', 'COPYING', 'README.md'] + SOLVER RESOURCES = [os.path.join(TCL_EXTENSION_PATH, TILE)] if TILE else [] FRAMEWORKS = [SOLVER_LIB_PATH] if SOLVER_LIB_PATH else [] OPTIONS = dict(argv_emulation=True, diff --git a/tests/style/py-flake8.t b/tests/style/py-flake8.t index 83318598..6aead621 100644 --- a/tests/style/py-flake8.t +++ b/tests/style/py-flake8.t @@ -26,7 +26,7 @@ my %skip = # my $cmd = shell_quote( 'flake8', '.' ); my $cmd = shell_quote( 'flake8', - grep { not exists $skip{$_} } glob('pysol.py ./pysollib/*.py ./pysollib/[cmgpuw]*/{*/*.py,*.py} ./pysollib/tile/*.py ./pysollib/ui/tktile/*.py') ); + grep { not exists $skip{$_} } glob('*.py ./pysollib/*.py ./pysollib/[cmgpuw]*/{*/*.py,*.py} ./pysollib/tile/*.py ./pysollib/ui/tktile/*.py') ); # TEST eq_or_diff( scalar(`$cmd`), '', "flake8 is happy with the code." );