From 55f3ffbd09e15299aa86151e8f45d369b23dd5e8 Mon Sep 17 00:00:00 2001 From: opacam Date: Sun, 19 May 2019 09:19:23 +0200 Subject: [PATCH 1/2] [ci] Fix ci's tox import errors Since the last update of tox (3.10.0), it seems that we cannot pass the `tox tests` because of import errors...so we set the `PYTHONPATH` environment variable for our tox tests so the test can find the modules --- tox.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tox.ini b/tox.ini index 47ad3e029b..627be18976 100644 --- a/tox.ini +++ b/tox.ini @@ -10,6 +10,8 @@ deps = # makes it possible to override pytest args, e.g. # tox -- tests/test_graph.py commands = pytest {posargs:tests/} +setenv = + PYTHONPATH={toxinidir} [testenv:pep8] deps = flake8 From f74d4f34d1f72e3a41d17954e528eea5077ca5fc Mon Sep 17 00:00:00 2001 From: opacam Date: Sun, 19 May 2019 10:24:22 +0200 Subject: [PATCH 2/2] [ci] Fix `python_package_basic` tests error: pep517.wrappers.BackendUnavailable This error is raised when we try to get the metadata from a package and this happens because we forgot to first install the build requirements from the `pyproject.toml` file --- pythonforandroid/pythonpackage.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pythonforandroid/pythonpackage.py b/pythonforandroid/pythonpackage.py index 47ce81fbef..0ab5bf06c1 100644 --- a/pythonforandroid/pythonpackage.py +++ b/pythonforandroid/pythonpackage.py @@ -436,10 +436,11 @@ def _extract_metainfo_files_from_package_unsafe( os.path.join(output_path, 'pyproject.toml') ) - # Get build backend from pyproject.toml: + # Get build backend and requirements from pyproject.toml: with open(os.path.join(path, 'pyproject.toml')) as f: build_sys = pytoml.load(f)['build-system'] backend = build_sys["build-backend"] + build_requires.extend(build_sys["requires"]) # Get a virtualenv with build requirements and get all metadata: env = BuildEnvironment()