diff --git a/macros.pyproject b/macros.pyproject index 737a856..aa787f6 100644 --- a/macros.pyproject +++ b/macros.pyproject @@ -92,5 +92,5 @@ TOX_TESTENV_PASSENV="${TOX_TESTENV_PASSENV:-*}" \\ PATH="%{buildroot}%{_bindir}:$PATH" \\ PYTHONPATH="${PYTHONPATH:-%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}}" \\ HOSTNAME="rpmbuild" \\ -tox --current-env -q --recreate -e "%{-e:%{-e*}}%{!-e:%{toxenv}}" %{?*} +%{__python3} -m tox --current-env -q --recreate -e "%{-e:%{-e*}}%{!-e:%{toxenv}}" %{?*} } diff --git a/pyproject_buildrequires.py b/pyproject_buildrequires.py index 4efcdee..49b1cde 100644 --- a/pyproject_buildrequires.py +++ b/pyproject_buildrequires.py @@ -219,7 +219,8 @@ def generate_tox_requirements(toxenv, requirements): requirements.check(source='tox itself') with tempfile.NamedTemporaryFile('r') as depfile: r = subprocess.run( - ['tox', '--print-deps-to-file', depfile.name, '-qre', toxenv], + [sys.executable, '-m', 'tox', '--print-deps-to-file', + depfile.name, '-qre', toxenv], check=False, encoding='utf-8', stdout=subprocess.PIPE,