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() 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