mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
flake8
This commit is contained in:
parent
c3af677cf7
commit
845c72363a
3 changed files with 43 additions and 42 deletions
8
setup.py
8
setup.py
|
@ -6,7 +6,7 @@ from distutils.core import setup
|
||||||
from pysollib.settings import VERSION
|
from pysollib.settings import VERSION
|
||||||
from pysollib.settings import PACKAGE_URL
|
from pysollib.settings import PACKAGE_URL
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
import py2exe
|
eval('import py2exe')
|
||||||
|
|
||||||
if os.name == 'posix':
|
if os.name == 'posix':
|
||||||
data_dir = 'share/PySolFC'
|
data_dir = 'share/PySolFC'
|
||||||
|
@ -24,7 +24,7 @@ ddirs = [
|
||||||
'themes',
|
'themes',
|
||||||
'tcl',
|
'tcl',
|
||||||
]
|
]
|
||||||
for s in file('MANIFEST.in'):
|
for s in open('MANIFEST.in'):
|
||||||
if s.startswith('graft data/cardset-'):
|
if s.startswith('graft data/cardset-'):
|
||||||
ddirs.append(s[11:].strip())
|
ddirs.append(s[11:].strip())
|
||||||
|
|
||||||
|
@ -50,8 +50,8 @@ if os.name == 'posix':
|
||||||
data_files.append((data_dir, ['data/pysolfc.glade']))
|
data_files.append((data_dir, ['data/pysolfc.glade']))
|
||||||
data_files.append(('share/applications', ['data/pysol.desktop']))
|
data_files.append(('share/applications', ['data/pysol.desktop']))
|
||||||
|
|
||||||
##from pprint import pprint; pprint(data_files)
|
# from pprint import pprint; pprint(data_files)
|
||||||
##import sys; sys.exit()
|
# import sys; sys.exit()
|
||||||
|
|
||||||
long_description = '''\
|
long_description = '''\
|
||||||
PySolFC is a collection of more than 1000 solitaire card games.
|
PySolFC is a collection of more than 1000 solitaire card games.
|
||||||
|
|
|
@ -3,8 +3,10 @@ Usage:
|
||||||
python setup.py py2app
|
python setup.py py2app
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import os, sys
|
import os
|
||||||
|
import sys
|
||||||
import shutil
|
import shutil
|
||||||
|
import Tkinter
|
||||||
from subprocess import call
|
from subprocess import call
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
from pysollib.settings import PACKAGE, VERSION
|
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.
|
# Use Tile widgets, if they are installed.
|
||||||
# http://tktable.sourceforge.net/tile/
|
# http://tktable.sourceforge.net/tile/
|
||||||
import Tkinter
|
|
||||||
root = Tkinter.Tk()
|
root = Tkinter.Tk()
|
||||||
root.withdraw()
|
root.withdraw()
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -26,7 +26,7 @@ my %skip =
|
||||||
|
|
||||||
# my $cmd = shell_quote( 'flake8', '.' );
|
# my $cmd = shell_quote( 'flake8', '.' );
|
||||||
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
|
# TEST
|
||||||
eq_or_diff( scalar(`$cmd`), '', "flake8 is happy with the code." );
|
eq_or_diff( scalar(`$cmd`), '', "flake8 is happy with the code." );
|
||||||
|
|
Loading…
Add table
Reference in a new issue