From d2ec6ae95be9dd3e6edae06821d4bb3201f20834 Mon Sep 17 00:00:00 2001 From: Tomas Orsava Date: Thu, 21 Sep 2017 15:25:57 +0200 Subject: [PATCH] Switch bootsrapping macro to a bcond for modularity --- python-rpm-generators.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/python-rpm-generators.spec b/python-rpm-generators.spec index 6909ee9..b2b07a2 100644 --- a/python-rpm-generators.spec +++ b/python-rpm-generators.spec @@ -14,7 +14,7 @@ # # More info on the Python 3 bootstrapping sequence in the `python3` spec file. # -%global bootstrapping_python 0 +%bcond_with bootstrap # Disable automatic (Python 2) bytecompilation in %%__os_install_post. @@ -43,7 +43,7 @@ Source0: http://ftp.rpm.org/releases/%{srcdir}/%{srcname}-%{srcver}.tar.b BuildArch: noarch -%if ! 0%{?bootstrapping_python} +%if %{without bootstrap} BuildRequires: python3-devel %endif @@ -85,7 +85,7 @@ and add appropriate Provides and Requires tags to them. %build -%if ! 0%{?bootstrapping_python} +%if %{without bootstrap} %{__python3} -m compileall scripts/ %endif @@ -96,7 +96,7 @@ install -Dm 755 scripts/pythondeps.sh \ scripts/pythondistdeps.py \ -t %{buildroot}/%{_rpmconfigdir} -%if ! 0%{?bootstrapping_python} +%if %{without bootstrap} install -Dm 755 scripts/__pycache__/* \ -t %{buildroot}/%{_rpmconfigdir}/__pycache__ %endif @@ -108,7 +108,7 @@ install -Dm 755 scripts/__pycache__/* \ %{_rpmconfigdir}/pythondeps.sh %{_rpmconfigdir}/pythondistdeps.py -%if ! 0%{?bootstrapping_python} +%if %{without bootstrap} %{_rpmconfigdir}/__pycache__ %endif