Explicitly use python2, in preparation for python3 becoming the default python

This commit is contained in:
Todd Zullinger 2017-12-06 10:21:32 -05:00
parent 4fdc554bfc
commit 6b6011b36a

View File

@ -1,10 +1,10 @@
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%global vimdir %{_datadir}/vim/vimfiles
Summary: Text based document generation
Name: asciidoc
Version: 8.6.8
Release: 12%{?dist}
Release: 13%{?dist}
# The python code does not specify a version.
# The javascript example code is GPLv2+.
License: GPL+ and GPLv2+
@ -27,7 +27,7 @@ BuildRequires: vim-filesystem
BuildRequires: symlinks
Requires: python >= 2.4
Requires: python2 >= 2.4
Requires: docbook-style-xsl
Requires: graphviz
Requires: libxslt
@ -104,7 +104,7 @@ for d in dblatex docbook-xsl images javascripts stylesheets; do
done
# Python API
install -Dpm 644 asciidocapi.py %{buildroot}%{python_sitelib}/asciidocapi.py
install -Dpm 644 asciidocapi.py %{buildroot}%{python2_sitelib}/asciidocapi.py
# Make it easier to %exclude these with both rpm < and >= 4.7
for file in %{buildroot}{%{_bindir},%{_sysconfdir}/asciidoc/filters/*}/*.py ; do
@ -128,8 +128,8 @@ done
%check
export PATH="../:$PATH"
cd tests
python testasciidoc.py update
python testasciidoc.py run
%{__python2} testasciidoc.py update
%{__python2} testasciidoc.py run
%files
%doc COPYING COPYRIGHT BUGS CHANGELOG README
@ -141,7 +141,7 @@ python testasciidoc.py run
%{_bindir}/asciidoc
%{_bindir}/asciidoc.py
%{_datadir}/asciidoc/
%{python_sitelib}/asciidocapi.py*
%{python2_sitelib}/asciidocapi.py*
%{vimdir}/ftdetect/asciidoc_filetype.vim
%{vimdir}/syntax/asciidoc.vim
%exclude %{_bindir}/*.py[co]
@ -171,6 +171,10 @@ python testasciidoc.py run
%changelog
* Wed Dec 06 2017 Todd Zullinger <tmz@pobox.com> - 8.6.8-13
- Explicitly use python2, in preparation for python3 becoming the default
python
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 8.6.8-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild