]> git.pld-linux.org Git - packages/python3-jinja2.git/blobdiff - python3-jinja2.spec
Build only Python3
[packages/python3-jinja2.git] / python3-jinja2.spec
index b3ccb45c84ca29a4812abc6faac2d98d33e10cf0..ee7aca6eeb713960474312367ceb7542a91e357e 100644 (file)
@@ -2,13 +2,11 @@
 # 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
 
 %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}
+Summary:       Template engine Jinja2 for Python 3.x
+Summary(pl.UTF-8):     Silnik szablonów Jinja2 dla Pythona 3.x
+Name:          python3-%{module}
 Version:       2.11.3
 Release:       1
 License:       BSD
@@ -19,15 +17,6 @@ Source0:     https://files.pythonhosted.org/packages/source/J/Jinja2/Jinja2-%{versio
 URL:           http://jinja.pocoo.org/
 BuildRequires: rpmbuild(macros) >= 1.714
 BuildRequires: rpm-pythonprov
-%if %{with python2}
-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.5
 BuildRequires: python3-modules >= 1:3.5
 BuildRequires: python3-setuptools
@@ -35,16 +24,14 @@ BuildRequires:      python3-setuptools
 BuildRequires: python3-markupsafe >= 0.23
 BuildRequires: python3-pytest
 %endif
-%endif
 %if %{with doc}
 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-modules >= 1:2.7
-Obsoletes:     python-Jinja2
 BuildArch:     noarch
+Requires:      python3-modules >= 1:3.5
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -58,23 +45,6 @@ w czystym Pythonie. Udostępnia podobne do Django, o odmiennej od XML-a
 składni i kompilowane do kodu Pythona szablony w opcjonalnie
 ograniczonym środowisku.
 
-%package -n python3-%{module}
-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-modules >= 1:3.5
-
-%description -n python3-%{module}
-A small but fast and easy to use stand-alone template engine written
-in pure Python. Provides a Django inspired non-XML syntax but supports
-inline expressions and an optional sandboxed environment.
-
-%description -n python3-%{module} -l pl.UTF-8
-Mały ale szybki i łatwy w użyciu samodzielny silnik szablonów napisany
-w czystym Pythonie. Udostępnia podobne do Django, o odmiennej od XML-a
-składni i kompilowane do kodu Pythona szablony w opcjonalnie
-ograniczonym środowisku.
-
 %package apidoc
 Summary:       Jinja2 template engine API documentation
 Summary(pl.UTF-8):     Dokumentacja API silnika szablonów Jinja2
@@ -90,23 +60,12 @@ Dokumentacja API silnika szablonów Jinja2.
 %setup -q -n Jinja2-%{version}
 
 %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) \
@@ -116,35 +75,16 @@ PYTHONPATH=$(pwd) \
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%py_install
-
-%py_postclean
-%endif
-
-%if %{with python3}
 %py3_install
-%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with python2}
 %files
 %defattr(644,root,root,755)
 %doc CHANGES.rst LICENSE.rst README.rst
-%{py_sitescriptdir}/%{module}
-%{py_sitescriptdir}/Jinja2-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-%{module}
-%defattr(644,root,root,755)
-%doc CHANGES.rst LICENSE.rst README.rst
 %{py3_sitescriptdir}/%{module}
 %{py3_sitescriptdir}/Jinja2-%{version}-py*.egg-info
-%endif
 
 %if %{with doc}
 %files apidoc
This page took 0.125368 seconds and 4 git commands to generate.