Blame SOURCES/macros.python2

23b3e9
# define these macros in a way which will expand them to correct values even for non-scl-build, assuming 's/@scl@//'
23b3e9
%@scl@__python2
23b3e9
%@scl@__python %@scl@__python2
23b3e9
%@scl@python2_sitelib %(%{?scl:scl enable @scl@ '}%{@scl@__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"%{?scl:'})
23b3e9
%@scl@python_sitelib %@scl@python2_sitelib
23b3e9
%@scl@python2_sitearch %(%{?scl:scl enable @scl@ '}%{@scl@__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))"%{?scl:'})
23b3e9
%@scl@python_sitearch %@scl@python2_sitearch
23b3e9
%@scl@python2_version %(%{?scl:scl enable @scl@ '}%{@scl@__python2} -c "import sys; sys.stdout.write(sys.version[:3])"%{?scl:'})
23b3e9
%@scl@python_version %@scl@python2_version
23b3e9
23b3e9
# these macros won't be needed if doing non-scl build, so define them in a way that won't overwrite system ones
23b3e9
%@scl@_os_install_post \
23b3e9
    /usr/lib/rpm/brp-scl-compress %{_scl_root} \
23b3e9
    %{!?__debug_package:/usr/lib/rpm/redhat/brp-strip %{__strip} \
23b3e9
    /usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump} \
23b3e9
    } \
23b3e9
    /usr/lib/rpm/redhat/brp-strip-static-archive %{__strip} \
23b3e9
    %{!?_turn_off_bytecompile:scl enable @scl@ '/usr/lib/rpm/redhat/brp-python-bytecompile-with-scl-python %@scl@__python2 %{?_python_bytecompile_errors_terminate_build} %{_scl_root}'} \
23b3e9
    /usr/lib/rpm/redhat/brp-python-hardlink
23b3e9
23b3e9
%@scl@_python_provides /usr/lib/rpm/pythondeps-scl.sh --provides %{?scl:@scl@-}
23b3e9
%@scl@_python_requires /usr/lib/rpm/pythondeps-scl.sh --requires %{?scl:@scl@-}
23b3e9
23b3e9
23b3e9
%_python_bytecompile_errors_terminate_build 1