diff options
author | Stephen Finucane <stephen@that.guru> | 2023-01-06 15:40:41 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-06 07:40:41 -0800 |
commit | c790c60a214bbcf1da203aee96c60aa0bc4411d1 (patch) | |
tree | cc8dc7f3f5a51fe07f188aad88eb979239d0934e /src/tox/tox_env/python/package.py | |
parent | af35384bb2eeb13e1a023ce9f0e9530adafa63dd (diff) | |
download | tox-git-c790c60a214bbcf1da203aee96c60aa0bc4411d1.tar.gz |
Fix various issues with missing interpreters (#2828)
fix https://github.com/tox-dev/tox/issues/2811
Diffstat (limited to 'src/tox/tox_env/python/package.py')
-rw-r--r-- | src/tox/tox_env/python/package.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/tox/tox_env/python/package.py b/src/tox/tox_env/python/package.py index 289bd774..d671550d 100644 --- a/src/tox/tox_env/python/package.py +++ b/src/tox/tox_env/python/package.py @@ -14,7 +14,7 @@ from ..api import ToxEnvCreateArgs from ..errors import Skip from ..package import Package, PackageToxEnv, PathPackage from ..runner import RunToxEnv -from .api import Python +from .api import NoInterpreter, Python from .pip.req_file import PythonDeps if TYPE_CHECKING: @@ -87,7 +87,11 @@ class PythonPackageToxEnv(Python, PackageToxEnv, ABC): # python only code are often compatible at major level (unless universal wheel in which case both 2/3) # c-extension codes are trickier, but as of today both poetry/setuptools uses pypa/wheels logic # https://github.com/pypa/wheel/blob/master/src/wheel/bdist_wheel.py#L234-L280 - run_py = cast(Python, run_env).base_python + try: + run_py = cast(Python, run_env).base_python + except NoInterpreter: + run_py = None + if run_py is None: base = ",".join(run_env.conf["base_python"]) raise Skip(f"could not resolve base python with {base}") |