[python-cheetah/f21] fix license handling

Tom Callaway spot at fedoraproject.org
Thu Jul 31 14:16:27 UTC 2014


commit d4503c2969ad0bc26017bb86eeb89be8c180e332
Author: Tom Callaway <spot at fedoraproject.org>
Date:   Thu Jul 31 10:16:21 2014 -0400

    fix license handling

 cheetah-optional-deps.patch |   16 ++++++++++++++++
 python-cheetah.spec         |   15 +++++++++++++--
 2 files changed, 29 insertions(+), 2 deletions(-)
---
diff --git a/cheetah-optional-deps.patch b/cheetah-optional-deps.patch
new file mode 100644
index 0000000..5d113ad
--- /dev/null
+++ b/cheetah-optional-deps.patch
@@ -0,0 +1,16 @@
+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'
diff --git a/python-cheetah.spec b/python-cheetah.spec
index 967ee7d..459b3af 100644
--- a/python-cheetah.spec
+++ b/python-cheetah.spec
@@ -1,6 +1,6 @@
 Name:           python-cheetah
 Version:        2.4.4
-Release:        7%{?dist}
+Release:        9%{?dist}
 Summary:        Template engine and code generator
 
 Group:          Development/Libraries
@@ -9,6 +9,7 @@ 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)
 
@@ -28,6 +29,7 @@ Java, SQL, form emails and even Python code.
 %prep
 %setup -q -n Cheetah-%{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
@@ -49,7 +51,9 @@ rm -rf %{buildroot}
 
 %files
 %defattr(-,root,root,-)
-%doc CHANGES LICENSE README.markdown TODO
+%{!?_licensedir:%global license %%doc}
+%license LICENSE
+%doc CHANGES README.markdown TODO
 
 %{_bindir}/cheetah
 %{_bindir}/cheetah-analyze
@@ -81,6 +85,13 @@ rm -rf %{buildroot}
 %{python_sitearch}/Cheetah-%{version}-*.egg-info/*.txt
 
 %changelog
+* Thu Jul 31 2014 Tom Callaway <spot at fedoraproject.org> - 2.4.4-9
+- fix license handling
+
+* Mon Jul 21 2014 Toshio Kuratomi <toshio at fedoraproject.org> - 2.4.4-8
+- Since we're leaving out the dep on markdown in the rpm requirements we need
+  to leave it out of egginfo as well otherwise pkg_resources using code breaks
+
 * Thu Jun 19 2014 Matthew Miller <mattdm at fedoraproject.org> - 2.4.4-7
 - remove python-markdown and python-pygments hard dependencies
 


More information about the scm-commits mailing list