Skip to content

Commit 3f887fd

Browse files
committed
minor fixes
1 parent b35aa7f commit 3f887fd

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

pythonforandroid/recipe.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,7 +1251,7 @@ def get_pip_name(self):
12511251
name_str = self.name
12521252
if self.name not in self.ctx.use_prebuilt_version_for and self.version is not None:
12531253
# Like: v2.3.0 -> 2.3.0
1254-
cleaned_version = self.version.replace("v", "")
1254+
cleaned_version = self.version.lstrip("v")
12551255
name_str += f"=={cleaned_version}"
12561256
return name_str
12571257

@@ -1336,7 +1336,7 @@ def get_wheel_platform_tag(self, arch):
13361336
return PyProjectRecipe.get_wheel_platform_tags(arch, self.ctx)[0]
13371337

13381338
def install_prebuilt_wheel(self, arch):
1339-
info("Installing prebuilt built wheel")
1339+
info("Installing prebuilt wheel")
13401340
destination = self.ctx.get_python_install_dir(arch.arch)
13411341
pip_options = self.get_pip_install_args(arch)
13421342
pip_options.extend(["--target", destination])

pythonforandroid/recipes/hostpython3/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from os.path import join
77

88
from packaging.version import Version
9-
from pythonforandroid.logger import shprint, error
9+
from pythonforandroid.logger import shprint
1010
from pythonforandroid.recipe import Recipe
1111
from pythonforandroid.util import (
1212
BuildInterruptingException,
@@ -52,10 +52,9 @@ class HostPython3Recipe(Recipe):
5252
def download(self):
5353
python_recipe = Recipe.get_recipe("python3", self.ctx)
5454
if python_recipe.version != self.version:
55-
error(
55+
raise BuildInterruptingException(
5656
f"python3 should have same version as hostpython3, {python_recipe.version} != {self.version}"
5757
)
58-
exit(1)
5958
super().download()
6059

6160
@property

pythonforandroid/toolchain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ def __init__(self):
291291
'--use-prebuilt-version-for',
292292
help=(
293293
'For these packages, ignore pinned versions and use the latest '
294-
'prebuilt version from the extra index if available.'
294+
'prebuilt version from the extra index if available. '
295295
'Only applies to packages with a recipe.'
296296
),
297297
action='append',

0 commit comments

Comments
 (0)