|
15 | 15 | from pythonforandroid.util import BuildInterruptingException
|
16 | 16 | from pythonforandroid.entrypoints import main
|
17 | 17 |
|
18 |
| - |
19 | 18 | def check_python_dependencies():
|
20 | 19 | # Check if the Python requirements are installed. This appears
|
21 | 20 | # before the imports because otherwise they're imported elsewhere.
|
@@ -101,6 +100,7 @@ def check_python_dependencies():
|
101 | 100 | toolchain_dir = dirname(__file__)
|
102 | 101 | sys.path.insert(0, join(toolchain_dir, "tools", "external"))
|
103 | 102 |
|
| 103 | +APK_SUFFIX = '.apk' |
104 | 104 |
|
105 | 105 | def add_boolean_option(parser, names, no_names=None,
|
106 | 106 | default=True, dest=None, description=None):
|
@@ -1064,9 +1064,9 @@ def apk(self, args):
|
1064 | 1064 | info_main('# Found APK file: {}'.format(apk_file))
|
1065 | 1065 | if apk_add_version:
|
1066 | 1066 | info('# Add version number to APK')
|
1067 |
| - apk_name, apk_suffix = basename(apk_file).split("-", 1) |
| 1067 | + apk_name = basename(apk_file)[:-len(APK_SUFFIX)] |
1068 | 1068 | apk_file_dest = "{}-{}-{}".format(
|
1069 |
| - apk_name, build_args.version, apk_suffix) |
| 1069 | + apk_name, build_args.version, APK_SUFFIX) |
1070 | 1070 | info('# APK renamed to {}'.format(apk_file_dest))
|
1071 | 1071 | shprint(sh.cp, apk_file, apk_file_dest)
|
1072 | 1072 | else:
|
|
0 commit comments