Skip to content

Commit

Permalink
Style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
inclement committed Jul 28, 2019
1 parent f74c546 commit f22fc46
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions pythonforandroid/entrypoints.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from pythonforandroid.recommendations import check_python_version
from pythonforandroid.util import BuildInterruptingException, handle_build_exception


def main():
"""
Main entrypoint for running python-for-android as a script.
Expand Down
3 changes: 3 additions & 0 deletions pythonforandroid/recommendations.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def check_target_api(api, arch):
RECOMMENDED_NDK_API = 21
OLD_NDK_API_MESSAGE = ('NDK API less than {} is not supported'.format(MIN_NDK_API))


def check_ndk_api(ndk_api, android_api):
"""Warn if the user's NDK is too high or low."""
if ndk_api > android_api:
Expand All @@ -107,6 +108,7 @@ def check_ndk_api(ndk_api, android_api):
if ndk_api < MIN_NDK_API:
warning(OLD_NDK_API_MESSAGE)


MIN_PYTHON_MAJOR_VERSION = 3
MIN_PYTHON_MINOR_VERSION = 6
MIN_PYTHON_VERSION = LooseVersion('{major}.{minor}'.format(major=MIN_PYTHON_MAJOR_VERSION,
Expand All @@ -125,6 +127,7 @@ def check_ndk_api(ndk_api, android_api):
user_minor=sys.version_info.minor,
min_version=MIN_PYTHON_VERSION)


def check_python_version():
if sys.version_info.major < MIN_PYTHON_MAJOR_VERSION:
raise BuildInterruptingException(PY2_ERROR_TEXT)
Expand Down
5 changes: 3 additions & 2 deletions pythonforandroid/toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
from pythonforandroid import __version__
from pythonforandroid.pythonpackage import get_dep_names_of_package
from pythonforandroid.recommendations import (
RECOMMENDED_NDK_API, RECOMMENDED_TARGET_API, check_python_version)
from pythonforandroid.util import BuildInterruptingException, handle_build_exception
RECOMMENDED_NDK_API, RECOMMENDED_TARGET_API)
from pythonforandroid.util import BuildInterruptingException
from pythonforandroid.entrypoints import main


Expand Down Expand Up @@ -101,6 +101,7 @@ def check_python_dependencies():
toolchain_dir = dirname(__file__)
sys.path.insert(0, join(toolchain_dir, "tools", "external"))


def add_boolean_option(parser, names, no_names=None,
default=True, dest=None, description=None):
group = parser.add_argument_group(description=description)
Expand Down
1 change: 0 additions & 1 deletion pythonforandroid/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from os import getcwd, chdir, makedirs, walk, uname
import sh
import shutil
import sys
from fnmatch import fnmatch
from tempfile import mkdtemp

Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
data_files = []



# must be a single statement since buildozer is currently parsing it, refs:
# https://github.com/kivy/buildozer/issues/722
install_reqs = [
Expand Down

0 comments on commit f22fc46

Please sign in to comment.