X-Git-Url: https://git.pld-linux.org/?a=blobdiff_plain;f=python-jinja2.spec;h=4604816a99383ca85ded1c87e2b6b45ef4f0c55b;hb=HEAD;hp=70a52a25b82334251ccd39d7549422ada8fcc978;hpb=f8857e60769e9851bd3cbf225233637be8464b64;p=packages%2Fpython-jinja2.git diff --git a/python-jinja2.spec b/python-jinja2.spec index 70a52a2..4604816 100644 --- a/python-jinja2.spec +++ b/python-jinja2.spec @@ -1,38 +1,49 @@ # # Conditional build: %bcond_without doc # API documentation +%bcond_without tests # unit tests %bcond_without python2 # Python 2.x modules -%bcond_without python3 # Python 3.x modules +%bcond_with python3 # Python 3.x modules, python3 is built from python3-jinja2.spec %define module jinja2 Summary: Jinja2 Template engine for Python 2.x Summary(pl.UTF-8): Silnik szablonów Jinja2 dla Pythona 2.x Name: python-%{module} -Version: 2.10 -Release: 3 +Version: 2.11.3 +Release: 1 License: BSD Group: Development/Languages/Python #Source0Download: https://pypi.org/simple/Jinja2 Source0: https://files.pythonhosted.org/packages/source/J/Jinja2/Jinja2-%{version}.tar.gz -# Source0-md5: 61ef1117f945486472850819b8d1eb3d -URL: http://jinja.pocoo.org/ +# Source0-md5: 231dc00d34afb2672c497713fa9cdaaa +URL: https://jinja.palletsprojects.com/ BuildRequires: rpmbuild(macros) >= 1.714 BuildRequires: rpm-pythonprov %if %{with python2} -BuildRequires: python-devel >= 1:2.6 +BuildRequires: python-devel >= 1:2.7 BuildRequires: python-setuptools +%if %{with tests} +BuildRequires: python-markupsafe >= 0.23 +BuildRequires: python-pytest +%endif %endif %if %{with python3} -BuildRequires: python3-devel >= 1:3.3 -BuildRequires: python3-modules >= 1:3.3 +BuildRequires: python3-devel >= 1:3.5 +BuildRequires: python3-modules >= 1:3.5 BuildRequires: python3-setuptools +%if %{with tests} +BuildRequires: python3-markupsafe >= 0.23 +BuildRequires: python3-pytest +%endif %endif %if %{with doc} -BuildRequires: sphinx-pdg +BuildRequires: python3-pallets-sphinx-themes >= 1.2.0 +BuildRequires: python3-sphinxcontrib-log-cabinet >= 1.0.1 +BuildRequires: python3-sphinx_issues >= 1.2.0 +BuildRequires: sphinx-pdg-3 >= 2.1.2 %endif -Requires: python-markupsafe -Requires: python-modules >= 1:2.6 -Obsoletes: python-Jinja2 +Requires: python-modules >= 1:2.7 +Obsoletes: python-Jinja2 < 2.7 BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -51,8 +62,7 @@ ograniczonym środowisku. Summary: Template engine Jinja2 for Python 3.x Summary(pl.UTF-8): Silnik szablonów Jinja2 dla Pythona 3.x Group: Development/Languages/Python -Requires: python3-markupsafe -Requires: python3-modules >= 1:3.3 +Requires: python3-modules >= 1:3.5 %description -n python3-%{module} A small but fast and easy to use stand-alone template engine written @@ -82,15 +92,26 @@ Dokumentacja API silnika szablonów Jinja2. %build %if %{with python2} %py_build + +%if %{with tests} +PYTHONPATH=$(pwd)/src \ +%{__python} -m pytest tests +%endif %endif + %if %{with python3} %py3_build + +%if %{with tests} +PYTHONPATH=$(pwd)/src \ +%{__python3} -m pytest tests +%endif %endif %if %{with doc} PYTHONPATH=$(pwd) \ %{__make} -C docs -j1 html \ - SPHINXBUILD=sphinx-build + SPHINXBUILD=sphinx-build-3 %endif %install @@ -112,7 +133,7 @@ rm -rf $RPM_BUILD_ROOT %if %{with python2} %files %defattr(644,root,root,755) -%doc AUTHORS CHANGES.rst LICENSE README.rst +%doc CHANGES.rst LICENSE.rst README.rst %{py_sitescriptdir}/%{module} %{py_sitescriptdir}/Jinja2-%{version}-py*.egg-info %endif @@ -120,7 +141,7 @@ rm -rf $RPM_BUILD_ROOT %if %{with python3} %files -n python3-%{module} %defattr(644,root,root,755) -%doc AUTHORS CHANGES.rst LICENSE README.rst +%doc CHANGES.rst LICENSE.rst README.rst %{py3_sitescriptdir}/%{module} %{py3_sitescriptdir}/Jinja2-%{version}-py*.egg-info %endif