diff --git a/macros.python2 b/macros.python2 index 4b1390c..38c6eb9 100644 --- a/macros.python2 +++ b/macros.python2 @@ -7,19 +7,24 @@ # Use the slashes after expand so that the command starts on the same line as # the macro +# The `sleep 1` commands work around a race in install; see: +# https://bugzilla.redhat.com/show_bug.cgi?id=1644923 %py2_build() %{expand:\\\ + sleep 1 CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ %{__python2} %{py_setup} %{?py_setup_args} build --executable="%{__python2} %{py2_shbang_opts}" %{?*} sleep 1 } %py2_build_egg() %{expand:\\\ + sleep 1 CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ %{__python2} %{py_setup} %{?py_setup_args} bdist_egg %{?*} sleep 1 } %py2_build_wheel() %{expand:\\\ + sleep 1 CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ %{__python2} %{py_setup} %{?py_setup_args} bdist_wheel %{?*} sleep 1 diff --git a/macros.python3 b/macros.python3 index 44e2889..1952aed 100644 --- a/macros.python3 +++ b/macros.python3 @@ -12,19 +12,16 @@ %py3_build() %{expand:\\\ CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ %{__python3} %{py_setup} %{?py_setup_args} build --executable="%{__python3} %{py3_shbang_opts}" %{?*} - sleep 1 } %py3_build_egg() %{expand:\\\ CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ %{__python3} %{py_setup} %{?py_setup_args} bdist_egg %{?*} - sleep 1 } %py3_build_wheel() %{expand:\\\ CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\ %{__python3} %{py_setup} %{?py_setup_args} bdist_wheel %{?*} - sleep 1 } %py3_install() %{expand:\\\ diff --git a/python-rpm-macros.spec b/python-rpm-macros.spec index 649cd30..1d26b45 100644 --- a/python-rpm-macros.spec +++ b/python-rpm-macros.spec @@ -1,6 +1,6 @@ Name: python-rpm-macros Version: 3 -Release: 38%{?dist} +Release: 39%{?dist} Summary: The unversioned Python RPM macros License: MIT @@ -73,6 +73,9 @@ install -m 644 %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} \ %changelog +* Thu Nov 01 2018 Petr Viktorin - 3-39 +- Move "sleep 1" workaround from py3_build to py2_build (#1644923) + * Thu Sep 20 2018 Tomas Orsava - 3-38 - Move the __python2/3 macros to the python-srpm-macros subpackage - This facilitates using the %%{__python2/3} in Build/Requires