Update to 2.10.1.

Update specfile.
This commit is contained in:
Thomas Moschny 2019-04-11 07:54:06 +02:00
parent 13da8e68ac
commit 6145eda64b

View File

@ -1,10 +1,12 @@
%global srcname Jinja2
Name: python-jinja2
Version: 2.10.1
Release: 1%{?dist}
Summary: General purpose template engine
License: BSD
URL: http://jinja.pocoo.org/
Source0: https://files.pythonhosted.org/packages/source/J/Jinja2/Jinja2-%{version}.tar.gz
Source0: %{pypi_source}
%if 0%{?fedora} || 0%{?rhel} > 7
# Enable python3 build by default
@ -52,9 +54,6 @@ BuildRequires: python2-setuptools
BuildRequires: python2-babel >= 0.8
BuildRequires: python2-markupsafe >= 0.23
BuildRequires: python2-pytest
%if %{with docs}
BuildRequires: %{_bindir}/sphinx-build-2
%endif
Requires: python2-babel >= 0.8
Requires: python2-markupsafe >= 0.23
Requires: python2-setuptools
@ -103,94 +102,71 @@ environments.
%prep
%setup -qc -n Jinja2-%{version}
%autosetup -n %{srcname}-%{version}
# cleanup
find Jinja2-%{version} -name '*.pyo' -o -name '*.pyc' -delete
find . -name '*.pyo' -o -name '*.pyc' -delete
# fix EOL
sed -i 's|\r$||g' Jinja2-%{version}/LICENSE
sed -i 's|\r$||g' LICENSE
mv Jinja2-%{version} python3
%if %{with python2}
cp -av python3 python2
%endif # with python2
%build
%if %{with python2}
pushd python2
%py2_build
%if %{with docs}
make -C docs html PYTHONPATH=$(pwd) SPHINXBUILD=sphinx-build-2
%endif # with docs
popd
%endif # with python2
%if %{with python3}
pushd python3
%py3_build
%if %{with docs}
make -C docs html PYTHONPATH=$(pwd) SPHINXBUILD=sphinx-build-3
# remove hidden file
rm -rf docs/_build/html/.buildinfo
%endif # with docs
popd
%endif # with python3
%install
%if %{with python2}
pushd python2
%py2_install
# remove hidden file
rm -rf docs/_build/html/.buildinfo
# these files are valid only on Python 3.6+
rm %{buildroot}%{python2_sitelib}/jinja2/asyncsupport.py
rm %{buildroot}%{python2_sitelib}/jinja2/asyncfilters.py
popd
%endif # with python2
%if %{with python3}
pushd python3
%py3_install
# remove hidden file
rm -rf docs/_build/html/.buildinfo
%if ! %{with async}
# these files are valid only on Python 3.6+
rm %{buildroot}%{python3_sitelib}/jinja2/asyncsupport.py
rm %{buildroot}%{python3_sitelib}/jinja2/asyncfilters.py
%endif # ! with async
popd
%endif # with python3
%check
%if %{with python2}
pushd python2
# there are currently no tests in the jinja2 tarball
# make test
popd
%endif # with python2
%if %{with python3}
pushd python3
# there are currently no tests in the jinja2 tarball
# make test
popd
%endif # with python3
%if %{with python2}
%files -n python2-jinja2
%doc python2/AUTHORS
%doc python2/CHANGES.rst
%doc python2/ext
%doc python2/examples
%license python2/LICENSE
%doc AUTHORS
%doc CHANGES.rst
%doc ext
%doc examples
%license LICENSE
%if %{with docs}
%doc python2/docs/_build/html
%doc docs/_build/html
%endif
%{python2_sitelib}/jinja2
%{python2_sitelib}/Jinja2-%{version}-py?.?.egg-info
@ -199,13 +175,13 @@ popd
%if %{with python3}
%files -n python3-jinja2
%doc python3/AUTHORS
%doc python3/CHANGES.rst
%doc python3/ext
%doc python3/examples
%license python3/LICENSE
%doc AUTHORS
%doc CHANGES.rst
%doc ext
%doc examples
%license LICENSE
%if %{with docs}
%doc python3/docs/_build/html
%doc docs/_build/html
%endif
%{python3_sitelib}/jinja2
%{python3_sitelib}/Jinja2-%{version}-py?.?.egg-info
@ -215,6 +191,7 @@ popd
%changelog
* Wed Apr 10 2019 Thomas Moschny <thomas.moschny@gmx.de> - 2.10.1-1
- Update to 2.10.1.
- Update specfile.
* Wed Feb 27 2019 Phil Wyett <philwyett@kathenas.org> - 2.10-8
- Fix FTBS due to bad conditional