• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kivy / python-for-android / 6215290912

17 Sep 2023 06:49PM UTC coverage: 59.095% (+1.4%) from 57.68%
6215290912

push

github

web-flow
Merge pull request #2891 from misl6/release-2023.09.16

* Update `cffi` recipe for Python 3.10 (#2800)

* Update __init__.py

version bump to 1.15.1

* Update disable-pkg-config.patch

adjust patch for 1.15.1

* Use build rather than pep517 for building (#2784)

pep517 has been renamed to pyproject-hooks, and as a consequence all of
the deprecated functionality has been removed. build now provides the
functionality required, and since we are only interested in the
metadata, we can leverage a helper function for that. I've also removed
all of the subprocess machinery for calling the wrapping function, since
it appears to not be as noisy as pep517.

* Bump actions/setup-python and actions/checkout versions, as old ones are deprecated (#2827)

* Removes `mysqldb` recipe as does not support Python 3 (#2828)

* Removes `Babel` recipe as it's not needed anymore. (#2826)

* Remove dateutil recipe, as it's not needed anymore (#2829)

* Optimize CI runs, by avoiding unnecessary rebuilds (#2833)

* Remove `pytz` recipe, as it's not needed anymore (#2830)

* `freetype` recipe: Changed the url to use https as http doesn't work (#2846)

* Fix `vlc` recipe build (#2841)

* Correct sys_platform (#2852)

On Window, sys.platform = "win32".

I think "nt" is a reference to os.name.

* Fix code string - quickstart.rst

* Bump `kivy` version to `2.2.1` (#2855)

* Use a pinned version of `Cython` for now, as most of the recipes are incompatible with `Cython==3.x.x` (#2862)

* Automatically generate required pre-requisites (#2858)

`get_required_prerequisites()` maintains a list of Prerequisites required by each platform.

But that same information is already stored in each Prerequisite class.

Rather than rather than maintaining two lists which might become inconsistent, auto-generate one.

* Use `platform.uname` instead of `os.uname` (#2857)

Advantages:

- Works cross platform, not just Unix.
- Is a namedtuple, ... (continued)

944 of 2241 branches covered (0.0%)

Branch coverage included in aggregate %.

174 of 272 new or added lines in 32 files covered. (63.97%)

9 existing lines in 5 files now uncovered.

4725 of 7352 relevant lines covered (64.27%)

2.56 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

64.0
/pythonforandroid/checkdependencies.py
1
from importlib import import_module
4✔
2
from os import environ
4✔
3
import sys
4✔
4

5
from packaging.version import Version
4✔
6

7
from pythonforandroid.prerequisites import (
4✔
8
    check_and_install_default_prerequisites,
9
)
10

11

12
def check_python_dependencies():
4✔
13
    """
14
    Check if the Python requirements are installed. This must appears
15
    before other imports because otherwise they're imported elsewhere.
16

17
    Using the ok check instead of failing immediately so that all
18
    errors are printed at once.
19
    """
20

21
    ok = True
4✔
22

23
    modules = [("colorama", "0.3.3"), "appdirs", ("sh", "1.10"), "jinja2"]
4✔
24

25
    for module in modules:
4✔
26
        if isinstance(module, tuple):
4✔
27
            module, version = module
4✔
28
        else:
29
            version = None
4✔
30

31
        try:
4✔
32
            import_module(module)
4✔
NEW
33
        except ImportError:
×
NEW
34
            if version is None:
×
NEW
35
                print(
×
36
                    "ERROR: The {} Python module could not be found, please "
37
                    "install it.".format(module)
38
                )
NEW
39
                ok = False
×
40
            else:
NEW
41
                print(
×
42
                    "ERROR: The {} Python module could not be found, "
43
                    "please install version {} or higher".format(
44
                        module, version
45
                    )
46
                )
NEW
47
                ok = False
×
48
        else:
49
            if version is None:
4✔
50
                continue
4✔
51
            try:
4✔
52
                cur_ver = sys.modules[module].__version__
4✔
NEW
53
            except AttributeError:  # this is sometimes not available
×
NEW
54
                continue
×
55
            if Version(cur_ver) < Version(version):
4!
NEW
56
                print(
×
57
                    "ERROR: {} version is {}, but python-for-android needs "
58
                    "at least {}.".format(module, cur_ver, version)
59
                )
NEW
60
                ok = False
×
61

62
    if not ok:
4!
NEW
63
        print("python-for-android is exiting due to the errors logged above")
×
NEW
64
        exit(1)
×
65

66

67
def check():
4✔
68
    if not environ.get("SKIP_PREREQUISITES_CHECK", "0") == "1":
4!
NEW
69
        check_and_install_default_prerequisites()
×
70
    check_python_dependencies()
4✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc