diff --git a/macros.pyproject b/macros.pyproject index d615c22..bab2c4c 100644 --- a/macros.pyproject +++ b/macros.pyproject @@ -61,7 +61,7 @@ echo 'python3dist(toml)' # setuptools assumes no pre-existing dist-info rm -rfv *.dist-info/ >&2 if [ -f %{__python3} ]; then - RPM_TOXENV="%{toxenv}" %{__python3} -I %{_rpmconfigdir}/redhat/pyproject_buildrequires.py %{?**} + RPM_TOXENV="%{toxenv}" HOSTNAME="rpmbuild" %{__python3} -I %{_rpmconfigdir}/redhat/pyproject_buildrequires.py %{?**} fi } @@ -70,5 +70,6 @@ fi 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}}" %{?*} } diff --git a/pyproject-rpm-macros.spec b/pyproject-rpm-macros.spec index 3fdd306..fe8f52d 100644 --- a/pyproject-rpm-macros.spec +++ b/pyproject-rpm-macros.spec @@ -6,7 +6,7 @@ License: MIT # Keep the version at zero and increment only release Version: 0 -Release: 16%{?dist} +Release: 17%{?dist} # Macro files Source001: macros.pyproject @@ -87,6 +87,7 @@ install -m 644 pyproject_save_files.py %{buildroot}%{_rpmconfigdir}/redhat/ %if %{with tests} %check +export HOSTNAME="rpmbuild" # to speedup tox in network-less mock, see rhbz#1856356 %{python3} -m pytest -vv --doctest-modules %endif @@ -100,6 +101,10 @@ install -m 644 pyproject_save_files.py %{buildroot}%{_rpmconfigdir}/redhat/ %license LICENSE %changelog +* Wed Jul 15 2020 Miro Hrončok - 0-17 +- Set HOSTNAME to prevent tox 3.17+ from a DNS query +- Fixes rhbz#1856356 + * Fri Jun 19 2020 Miro Hrončok - 0-16 - Switch from upstream deprecated pytoml to toml