Skip to content

Commit ccc4ef4

Browse files
committed
More pep8 fixes for build.py
1 parent 43d4c19 commit ccc4ef4

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

src/build.py

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
ANDROID = 'android'
2323
ANT = 'ant'
2424

25-
#if ANDROIDSDK is on path, use android from this path
25+
# if ANDROIDSDK is on path, use android from this path
2626
ANDROIDSDK = os.environ.get('ANDROIDSDK')
2727
if ANDROIDSDK:
2828
ANDROID = os.path.join(ANDROIDSDK, 'tools', ANDROID)
@@ -85,11 +85,13 @@ def compile_dir(dfn):
8585
def is_whitelist(name):
8686
return match_filename(WHITELIST_PATTERNS, name)
8787

88+
8889
def is_blacklist(name):
8990
if is_whitelist(name):
9091
return False
9192
return match_filename(BLACKLIST_PATTERNS, name)
9293

94+
9395
def match_filename(pattern_list, name):
9496
for pattern in pattern_list:
9597
if pattern.startswith('^'):
@@ -131,11 +133,11 @@ def select(fn):
131133
fn = realpath(fn)
132134
assert(fn.startswith(d))
133135
fn = fn[len(d):]
134-
if fn.startswith('/site-packages/') or \
135-
fn.startswith('/config/') or \
136-
fn.startswith('/lib-dynload/') or \
137-
fn.startswith('/libpymodules.so'):
138-
return False
136+
if (fn.startswith('/site-packages/') or
137+
fn.startswith('/config/') or
138+
fn.startswith('/lib-dynload/') or
139+
fn.startswith('/libpymodules.so')):
140+
return False
139141
return fn
140142

141143
# get a list of all python file
@@ -300,7 +302,7 @@ def make_package(args):
300302
# Update the project to a recent version.
301303
try:
302304
subprocess.call([ANDROID, 'update', 'project', '-p', '.', '-t',
303-
'android-{}'.format(android_api)])
305+
'android-{}'.format(android_api)])
304306
except (OSError, IOError):
305307
print 'An error occured while calling', ANDROID, 'update'
306308
print 'Your PATH must include android tools.'
@@ -395,7 +397,8 @@ def make_package(args):
395397
help='The name of the project\'s launcher icon.')
396398
ap.add_argument('--orientation', dest='orientation', default='landscape',
397399
help=('The orientation that the game will display in. '
398-
'Usually one of "landscape", "portrait" or "sensor"'))
400+
'Usually one of "landscape", "portrait" or '
401+
'"sensor"'))
399402
ap.add_argument('--permission', dest='permissions', action='append',
400403
help='The permissions to give this app.')
401404
ap.add_argument('--ignore-path', dest='ignore_path', action='append',
@@ -439,18 +442,19 @@ def make_package(args):
439442
ap.add_argument('--minsdk', dest='min_sdk_version', default='8',
440443
help='Minimum Android SDK version to use. Default to 8')
441444
ap.add_argument('--window', dest='window', action='store_true',
442-
help='Indicate if the application will be windowed')
445+
help='Indicate if the application will be windowed')
443446
ap.add_argument('--wakelock', dest='wakelock', action='store_true',
444-
help='Indicate if the application needs the device to stay on')
447+
help=('Indicate if the application needs the device '
448+
'to stay on'))
445449
ap.add_argument('command', nargs='*',
446450
help=('The command to pass to ant (debug, release, '
447451
'installd, installr)'))
448452
ap.add_argument('--add-jar', dest='add_jar', action='append',
449453
help=('Add a Java .jar to the libs, so you can access its '
450-
'classes with pyjnius. You can specify this argument '
451-
'more than once to include multiple jars'))
454+
'classes with pyjnius. You can specify this '
455+
'argument more than once to include multiple jars'))
452456
ap.add_argument('--meta-data', dest='meta_data', action='append',
453-
help='Custom key=value to add in application metadata')
457+
help='Custom key=value to add in application metadata')
454458

455459
args = ap.parse_args()
456460

0 commit comments

Comments
 (0)