| |
@@ -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 @@
|
| |
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 @@
|
| |
%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 @@
|
| |
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 @@
|
| |
%{python3_sitearch}/
|
| |
|
| |
%changelog
|
| |
+ * Tue Jun 12 2018 Lumír Balhar <lbalhar@redhat.com> - 3.1.0-3
|
| |
+ - Fixed python2 conditions
|
| |
+ - Removed usage of %%{py3dir}
|
| |
+
|
| |
* Wed Mar 28 2018 Marek Skalický <mskalick@redhat.com> - 3.1.0-2
|
| |
- Use python3 shebang in binary files
|
| |
|
| |
Hello.
I improved the specfile a little bit and fixed some issues. Now it builds with/without Python 2.
Scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=27579908
Have a nice day.
Lumír