Don't build the Python 2 subpackage on EL > 7
This commit is contained in:
parent
e1414d036a
commit
4320e1dd94
@ -1,20 +1,26 @@
|
|||||||
Name: python-jinja2
|
Name: python-jinja2
|
||||||
Version: 2.10
|
Version: 2.10
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: General purpose template engine
|
Summary: General purpose template engine
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: http://jinja.pocoo.org/
|
URL: http://jinja.pocoo.org/
|
||||||
Source0: https://files.pythonhosted.org/packages/source/J/Jinja2/Jinja2-%{version}.tar.gz
|
Source0: https://files.pythonhosted.org/packages/source/J/Jinja2/Jinja2-%{version}.tar.gz
|
||||||
|
|
||||||
%bcond_without python2
|
|
||||||
|
|
||||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||||
|
# Enable python3 build by default
|
||||||
%bcond_without python3
|
%bcond_without python3
|
||||||
%else
|
%else
|
||||||
%bcond_with python3
|
%bcond_with python3
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?rhel} > 7
|
||||||
|
# Disable python2 build by default
|
||||||
|
%bcond_with python2
|
||||||
|
%else
|
||||||
|
%bcond_without python2
|
||||||
|
%endif
|
||||||
|
|
||||||
# Enable building without docs to avoid a circular dependency between this
|
# Enable building without docs to avoid a circular dependency between this
|
||||||
# and python-sphinx:
|
# and python-sphinx:
|
||||||
%bcond_without docs
|
%bcond_without docs
|
||||||
@ -106,9 +112,10 @@ find Jinja2-%{version} -name '*.pyo' -o -name '*.pyc' -delete
|
|||||||
# fix EOL
|
# fix EOL
|
||||||
sed -i 's|\r$||g' Jinja2-%{version}/LICENSE
|
sed -i 's|\r$||g' Jinja2-%{version}/LICENSE
|
||||||
|
|
||||||
mv Jinja2-%{version} python2
|
mv Jinja2-%{version} python3
|
||||||
cp -av python2 python3
|
%if %{with python2}
|
||||||
|
cp -av python3 python2
|
||||||
|
%endif # with python2
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if %{with python2}
|
%if %{with python2}
|
||||||
@ -121,7 +128,7 @@ make -C docs html PYTHONPATH=$(pwd) SPHINXBUILD=sphinx-build-2
|
|||||||
popd
|
popd
|
||||||
%endif # with python2
|
%endif # with python2
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if %{?with_python3}
|
||||||
pushd python3
|
pushd python3
|
||||||
%py3_build
|
%py3_build
|
||||||
%if %{with docs}
|
%if %{with docs}
|
||||||
@ -208,6 +215,9 @@ popd
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Apr 16 2018 Charalampos Stratakis <cstratak@redhat.com> - 2.10-3
|
||||||
|
- Don't build the Python 2 subpackage on EL > 7
|
||||||
|
|
||||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.10-2
|
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.10-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user