Switch bootsrapping macro to a bcond for modularity

This commit is contained in:
Tomas Orsava 2017-09-21 15:25:57 +02:00
parent eee8ac4de7
commit d2ec6ae95b
1 changed files with 5 additions and 5 deletions

View File

@ -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