#2 Update to Cheetah 3.0.0
Merged 6 years ago by mskalick. Opened 6 years ago by mskalick.
rpms/ mskalick/python-cheetah master  into  master

cheetah-3.0.0-dont-run-tests-twice.patch cheetah-2.4.4-dont-run-tests-twice.patch
file renamed
+2 -2
@@ -1,5 +1,5 @@ 

- --- Cheetah-2.4.4/cheetah/CheetahWrapper.py.orig	2010-12-12 22:43:26.000000000 -0500

- +++ Cheetah-2.4.4/cheetah/CheetahWrapper.py	2010-12-20 17:24:44.524608918 -0500

+ --- Cheetah-3.0.0/Cheetah/CheetahWrapper.py.orig	2010-12-12 22:43:26.000000000 -0500

+ +++ Cheetah-3.0.0/Cheetah/CheetahWrapper.py	2010-12-20 17:24:44.524608918 -0500

  @@ -263,7 +263,6 @@

           if '-v' in self.testOpts:

               verbosity = 2

@@ -1,16 +0,0 @@ 

- diff -up Cheetah-2.4.4/SetupConfig.py.bak Cheetah-2.4.4/SetupConfig.py

- --- Cheetah-2.4.4/SetupConfig.py.bak	2014-07-21 14:24:11.839067227 -0700

- +++ Cheetah-2.4.4/SetupConfig.py	2014-07-21 14:28:28.642988415 -0700

- @@ -60,7 +60,11 @@ if not os.getenv('CHEETAH_INSTALL_WITHOU

-      try:

-          from setuptools import setup

-          install_requires = [

- -                "Markdown >= 2.0.1",

- +                # Markdown is an optional dep (Cheetah still works without it).

- +                # Removing markdown as a hard requirement here as the

- +                # setuptools dep makes markdown a hard dependency for any code

- +                # that uses pkg_resources

- +                #"Markdown >= 2.0.1",

-          ]

-          if sys.platform == 'win32':

-              # use 'entry_points' instead of 'scripts'

file modified
+59 -46
@@ -1,23 +1,16 @@ 

+ %global with_python2 1

+ 

  Name:           python-cheetah

- Version:        2.4.4

+ Version:        3.0.0

  Release:        17%{?dist}

  Summary:        Template engine and code generator

  

  Group:          Development/Libraries

  License:        MIT

  URL:            http://cheetahtemplate.org/

- Source:         http://pypi.python.org/packages/source/C/Cheetah/Cheetah-%{version}.tar.gz

- 

- Patch0:         cheetah-2.4.4-dont-run-tests-twice.patch

- Patch1:         cheetah-optional-deps.patch

- 

- BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)

+ Source:         https://pypi.python.org/packages/5b/22/0238132792f3600717fad9647072486e2c15b7b45f845b52cc484b9af024/Cheetah3-3.0.0.tar.gz

  

- BuildRequires: python

- BuildRequires: python-devel

- BuildRequires: python-setuptools

- BuildRequires: python-markdown

- BuildRequires: python-pygments

+ Patch0:         cheetah-3.0.0-dont-run-tests-twice.patch

  

  %global _description\

  Cheetah is an open source template engine and code generation tool,\
@@ -26,6 +19,12 @@ 

  Cheetah is very flexible and is also being used to generate C++ code,\

  Java, SQL, form emails and even Python code.

  

+ %if 0%{?with_python2}

+ BuildRequires: python2-devel

+ BuildRequires: python2-setuptools

+ BuildRequires: python2-markdown

+ BuildRequires: python2-pygments

+ 

  %description %_description

  

  %package -n python2-cheetah
@@ -34,63 +33,77 @@ 

  

  %description -n python2-cheetah %_description

  

+ %endif

+ 

+ %package -n python3-cheetah

+ Summary: %summary

+ %{?python_provide:%python_provide python3-cheetah}

+ 

+ BuildRequires: python3-devel

+ BuildRequires: python3-setuptools

+ BuildRequires: python3-markdown

+ BuildRequires: python3-pygments

+ 

+ %description -n python3-cheetah %_description

+ 

+ 

  %prep

- %setup -q -n Cheetah-%{version}

+ %setup -q -n Cheetah3-%{version}

  %patch0 -p1

- %patch1 -p1

  # remove unnecessary shebang lines to silence rpmlint

- %{__sed} -i -e '/^#!/,1d' cheetah/Tests/* \

- 	 cheetah/DirectiveAnalyzer.py cheetah/Utils/Misc.py

+ %{__sed} -i -e '/^#!/,1d' Cheetah/Tests/* \

+ 	 Cheetah/DirectiveAnalyzer.py Cheetah/Utils/Misc.py

+ 

+ rm -rf %{py3dir}

+ cp -a . %{py3dir}

  

  %build

- %{__python} setup.py build

+ pushd %{py3dir}

+ %py3_build

+ popd

+ 

+ %if 0%{?with_python2}

+ %py2_build

+ %endif

+ 

  

  %install

- rm -rf %{buildroot}

- %{__python} setup.py install -O1 --skip-build --root %{buildroot}

+ %if 0%{?with_python2}

+ %py2_install

+ %endif

+ 

+ pushd %{py3dir}

+ %py3_install

+ popd

+ 

  

  %check

  export PATH="%{buildroot}/%{_bindir}:$PATH"

  export PYTHONPATH="%{buildroot}/%{python_sitearch}"

+ %__python2 %{buildroot}/%{_bindir}/cheetah test

+ export PYTHONPATH="%{buildroot}/%{python3_sitearch}"

  %{buildroot}/%{_bindir}/cheetah test

  

  %clean

  rm -rf %{buildroot}

  

+ %if 0%{?with_python2}

  %files -n python2-cheetah

  %defattr(-,root,root,-)

- %{!?_licensedir:%global license %%doc}

  %license LICENSE

- %doc CHANGES README.markdown TODO

- 

- %{_bindir}/cheetah

- %{_bindir}/cheetah-analyze

- %{_bindir}/cheetah-compile

+ %doc ANNOUNCE.rst README.rst TODO BUGS

  

- %dir %{python_sitearch}/Cheetah

- %{python_sitearch}/Cheetah/*.py*

- %{python_sitearch}/Cheetah/_namemapper.so

+ %{python_sitearch}/

+ %endif

  

- %dir %{python_sitearch}/Cheetah/Macros

- %{python_sitearch}/Cheetah/Macros/*.py*

- 

- %dir %{python_sitearch}/Cheetah/Templates

- %{python_sitearch}/Cheetah/Templates/*.py*

- %{python_sitearch}/Cheetah/Templates/*.tmpl

- 

- %dir %{python_sitearch}/Cheetah/Tests

- %{python_sitearch}/Cheetah/Tests/*.py*

- 

- %dir %{python_sitearch}/Cheetah/Tools

- %{python_sitearch}/Cheetah/Tools/*.py*

- %{python_sitearch}/Cheetah/Tools/*.txt

+ %files -n python3-cheetah

+ %defattr(-,root,root,-)

+ %license LICENSE

+ %doc ANNOUNCE.rst README.rst TODO BUGS

  

- %dir %{python_sitearch}/Cheetah/Utils

- %{python_sitearch}/Cheetah/Utils/*.py*

+ %{_bindir}/cheetah*

  

- %dir %{python_sitearch}/Cheetah-%{version}-*.egg-info

- %{python_sitearch}/Cheetah-%{version}-*.egg-info/PKG-INFO

- %{python_sitearch}/Cheetah-%{version}-*.egg-info/*.txt

+ %{python3_sitearch}/

  

  %changelog

  * Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.4.4-17