Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion pythonforandroid/bootstraps/pygame/build/build.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python2.7

from os.path import dirname, join, isfile, realpath, relpath, split
from os.path import dirname, join, isfile, realpath, relpath, split, exists
from zipfile import ZipFile
import sys
sys.path.insert(0, 'buildlib/jinja2.egg')
Expand Down Expand Up @@ -258,6 +258,13 @@ def make_package(args):
# Figure out if application has service part
service = False
directory = args.dir if public_version else args.private
if not (exists(join(realpath(directory), 'main.py')) or
exists(join(realpath(directory), 'main.pyo'))):
print('''BUILD FAILURE: No main.py(o) found in your app directory. This
file must exist to act as the entry point for you app. If your app is
started by a file with a different name, rename it to main.py or add a
main.py that loads it.''')
exit(1)
if directory:
service_main = join(realpath(directory), 'service', 'main.py')
if os.path.exists(service_main) or os.path.exists(service_main + 'o'):
Expand Down
8 changes: 8 additions & 0 deletions pythonforandroid/bootstraps/sdl2/build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,14 @@ def make_package(args):
# print('Your PATH must include android tools.')
# sys.exit(-1)

if not (exists(join(realpath(args.private), 'main.py')) or
exists(join(realpath(args.private), 'main.pyo'))):
print('''BUILD FAILURE: No main.py(o) found in your app directory. This
file must exist to act as the entry point for you app. If your app is
started by a file with a different name, rename it to main.py or add a
main.py that loads it.''')
exit(1)

# Delete the old assets.
if exists('assets/public.mp3'):
os.unlink('assets/public.mp3')
Expand Down