diff --git a/atomic.spec b/atomic.spec index 144a6fb..6799edb 100644 --- a/atomic.spec +++ b/atomic.spec @@ -1,9 +1,11 @@ %global debug_package %{nil} %if 0%{?fedora} <= 22 || (0%{?rhel} != 0 && 0%{?rhel} <= 7) +%bcond_with python3 %global pypkg python %global pysitelib %{python_sitelib} %global __python %{__python} %else +%bcond_without python3 %global pypkg python3 %global pysitelib %{python3_sitelib} %global __python %{__python3} @@ -37,6 +39,11 @@ BuildRequires: go-srpm-macros BuildRequires: %{pypkg}-dbus BuildRequires: %{pypkg}-docker-py BuildRequires: rpm-%{pypkg} +%if %{with python3} +BuildRequires: python3-PyYAML +%else +BuildRequires: PyYAML +%endif Requires: dbus Requires: docker @@ -51,6 +58,11 @@ Requires: %{pypkg}-requests >= 2.4.3 Requires: %{pypkg}-docker-py Requires: %{pypkg}-websocket-client >= 0.11.0 Requires: %{pypkg}-six >= 1.3.0 +%if %{with python3} +Requires: python3-PyYAML +%else +Requires: PyYAML +%endif %description