[TurboGears/el6/master] Handle the porting file in the spec file

Toshio くらとみ toshio at fedoraproject.org
Tue Jan 18 01:40:08 UTC 2011


commit 889751c326e94c54fd54132c54cd921754d612d5
Author: Toshio Kuratomi <toshio at fedoraproject.org>
Date:   Mon Jan 17 17:39:47 2011 -0800

    Handle the porting file in the spec file

 TurboGears.spec     |    3 +++
 porting-1.0-1.1.txt |    7 ++++++-
 2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/TurboGears.spec b/TurboGears.spec
index ebabeee..1a62121 100644
--- a/TurboGears.spec
+++ b/TurboGears.spec
@@ -11,6 +11,7 @@ Group:          Development/Languages
 License:        MIT
 URL:            http://www.turbogears.org
 Source0:        http://pypi.python.org/packages/source/T/%{name}/%{name}-%{version}.tar.gz
+Source1:        porting-1.0-1.1.txt
 Patch0:         %{name}-1.0.8-cherrypyreq.patch
 # Reported upstream http://trac.turbogears.org/ticket/2419
 Patch1: turbogears-sqlcreate.patch
@@ -112,6 +113,8 @@ TurboGears is easy to use for a wide range of web applications.
 %patch100 -p1 -b .deps
 %endif
 
+cp -p %{SOURCE1} .
+
 %build
 %{__python} setup.py build
 
diff --git a/porting-1.0-1.1.txt b/porting-1.0-1.1.txt
index 402e7c9..3110783 100644
--- a/porting-1.0-1.1.txt
+++ b/porting-1.0-1.1.txt
@@ -7,7 +7,12 @@ IdentityWrapper has moved
 
 turbogears.identity has been reorganized.  In particular,
 turbogears.identity.IdentityWrapper has been moved to
-turbogears.identity.base.IdentityWrapper
+turbogears.identity.base.IdentityWrapper.  You can use code like this to work
+with both 1.0 and 1.1::
+    try:
+        from turbogears.identity import IdentityWrapper
+    except ImportError:
+        from turbogears.identity.base import IdentityWrapper
 
 Widget Change
 =============


More information about the scm-commits mailing list