Use python -m tox instead of just tox
This way, macros can use whatever Python has tox module available instead of only the main one which owns /usr/bin/tox.
This commit is contained in:
parent
5561755a00
commit
cb8e334272
@ -92,5 +92,5 @@ TOX_TESTENV_PASSENV="${TOX_TESTENV_PASSENV:-*}" \\
|
|||||||
PATH="%{buildroot}%{_bindir}:$PATH" \\
|
PATH="%{buildroot}%{_bindir}:$PATH" \\
|
||||||
PYTHONPATH="${PYTHONPATH:-%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}}" \\
|
PYTHONPATH="${PYTHONPATH:-%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}}" \\
|
||||||
HOSTNAME="rpmbuild" \\
|
HOSTNAME="rpmbuild" \\
|
||||||
tox --current-env -q --recreate -e "%{-e:%{-e*}}%{!-e:%{toxenv}}" %{?*}
|
%{__python3} -m tox --current-env -q --recreate -e "%{-e:%{-e*}}%{!-e:%{toxenv}}" %{?*}
|
||||||
}
|
}
|
||||||
|
@ -219,7 +219,8 @@ def generate_tox_requirements(toxenv, requirements):
|
|||||||
requirements.check(source='tox itself')
|
requirements.check(source='tox itself')
|
||||||
with tempfile.NamedTemporaryFile('r') as depfile:
|
with tempfile.NamedTemporaryFile('r') as depfile:
|
||||||
r = subprocess.run(
|
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,
|
check=False,
|
||||||
encoding='utf-8',
|
encoding='utf-8',
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
|
Loading…
Reference in New Issue
Block a user