Rename use_self_when_building to pypy2_build, make it a bcond

This commit is contained in:
Miro Hrončok 2022-02-09 13:03:38 +01:00
parent 7ab528fd75
commit 8950772c1a
1 changed files with 6 additions and 8 deletions

View File

@ -105,22 +105,20 @@ Source189: 189-use-rpm-wheels.patch
# Build-time requirements:
# pypy's can be rebuilt using itself, rather than with CPython; doing so
# pypy's can be rebuilt using pypy2, rather than with CPython 2; doing so
# halves the build time.
#
# Turn it off with this boolean, to revert back to rebuilding using CPython
# Turn it off with this bcond, to revert back to rebuilding using CPython
# and avoid a cycle in the build-time dependency graph:
# Note, pypy3 is built with pypy2, so no dependency cycle
%global use_self_when_building 1
%if 0%{use_self_when_building}
# pypy3 can only be build with pypy2
%bcond_without pypy2_build
%if %{with pypy2_build}
BuildRequires: pypy2
%global bootstrap_python_interp pypy2
%else
# pypy3 can only be build with python2
# exception to use Python 2: https://pagure.io/fesco/issue/2130
BuildRequires: python27
BuildRequires: python2.7
%global bootstrap_python_interp python2
%endif
@ -310,7 +308,7 @@ rm lib-python/3/idlelib/idle.bat
sed -i -r 's/\$\(LDFLAGSEXTRA\)/& -fuse-ld=gold/' ./rpython/translator/platform/posix.py
%endif
%if ! 0%{use_self_when_building}
%if %{without pypy2_build}
# use the pycparser from PyPy even on CPython
ln -s lib_pypy/cffi/_pycparser pycparser
%endif