diff --git a/python-cheetah.spec b/python-cheetah.spec index 27b6fb3..feed580 100644 --- a/python-cheetah.spec +++ b/python-cheetah.spec @@ -2,7 +2,7 @@ Name: python-cheetah Version: 3.1.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Template engine and code generator Group: Development/Libraries @@ -20,18 +20,18 @@ tools and frameworks. Web development is its principal use, but\ Cheetah is very flexible and is also being used to generate C++ code,\ Java, SQL, form emails and even Python code. +%description %{_description} + %if %{with python2} +%package -n python2-cheetah +Summary: %summary +%{?python_provide:%python_provide python2-cheetah} + BuildRequires: python2-devel BuildRequires: python2-setuptools BuildRequires: python2-markdown BuildRequires: python2-pygments -%description %_description - -%package -n python2-cheetah -Summary: %summary -%{?python_provide:%python_provide python2-cheetah} - %description -n python2-cheetah %_description %endif @@ -53,20 +53,14 @@ BuildRequires: python3-pygments %patch0 -p1 # remove unnecessary shebang lines to silence rpmlint %{__sed} -i -e '/^#!/,1d' Cheetah/Tests/* \ - Cheetah/DirectiveAnalyzer.py Cheetah/Utils/Misc.py - -rm -rf %{py3dir} -cp -a . %{py3dir} + Cheetah/DirectiveAnalyzer.py Cheetah/Utils/Misc.py %build -pushd %{py3dir} -%py3_build -popd - %if %{with python2} %py2_build %endif +%py3_build %install %if %{with python2} @@ -75,18 +69,18 @@ popd EGG_INFO=(%{buildroot}/%{python_sitearch}/Cheetah*.egg-info) cp -r $EGG_INFO ${EGG_INFO//Cheetah3/Cheetah} sed -i "s/Name: Cheetah3/Name: Cheetah/" ${EGG_INFO//Cheetah3/Cheetah}/PKG-INFO +rm %{buildroot}%{_bindir}/* %endif -pushd %{py3dir} -rm %{buildroot}%{_bindir}/* %py3_install -popd %check export PATH="%{buildroot}/%{_bindir}:$PATH" +%if %{with python2} export PYTHONPATH="%{buildroot}/%{python_sitearch}" %__python2 %{buildroot}/%{_bindir}/cheetah test +%endif export PYTHONPATH="%{buildroot}/%{python3_sitearch}" %{buildroot}/%{_bindir}/cheetah test @@ -109,6 +103,10 @@ export PYTHONPATH="%{buildroot}/%{python3_sitearch}" %{python3_sitearch}/ %changelog +* Tue Jun 12 2018 Lumír Balhar - 3.1.0-3 +- Fixed python2 conditions +- Removed usage of %%{py3dir} + * Wed Mar 28 2018 Marek Skalický - 3.1.0-2 - Use python3 shebang in binary files