[python-sprox/el5/master] - Apply a patch from upstream bitbucket ticket #30 to get Sprox running on Python 2.4 for bz#59676
Luke Macken
lmacken at fedoraproject.org
Thu Jan 20 21:25:29 UTC 2011
commit bed659885e674ab6c4513bc038d6edd3854aca8c
Author: Luke Macken <lmacken at redhat.com>
Date: Thu Jan 20 16:24:40 2011 -0500
- Apply a patch from upstream bitbucket ticket #30 to get Sprox running on
Python 2.4 for bz#596768
py2.4_fix_datetime.diff | 26 ++++++++++++++++++++++++++
python-sprox.spec | 8 +++++++-
2 files changed, 33 insertions(+), 1 deletions(-)
---
diff --git a/py2.4_fix_datetime.diff b/py2.4_fix_datetime.diff
new file mode 100644
index 0000000..01ee6e5
--- /dev/null
+++ b/py2.4_fix_datetime.diff
@@ -0,0 +1,26 @@
+diff -r 99ac3dd68c38 sprox/saormprovider.py
+--- a/sprox/saormprovider.py Fri Jan 22 21:43:51 2010 -0700
++++ b/sprox/saormprovider.py Mon Apr 26 13:05:39 2010 -0500
+@@ -28,6 +28,7 @@
+ from sqlalchemy.orm.exc import UnmappedClassError, NoResultFound, UnmappedInstanceError
+ from sprox.iprovider import IProvider
+ from cgi import FieldStorage
++import time
+ from datetime import datetime, timedelta
+ from warnings import warn
+
+@@ -379,10 +380,12 @@
+ if key in mapper.c and value is not None:
+ field = mapper.c[key]
+ if hasattr(field, 'type') and isinstance(field.type, DateTime) and not isinstance(value, datetime):
+- dt = datetime.strptime(value[:19], '%Y-%m-%d %H:%M:%S')
++ format = '%Y-%m-%d %H:%M:%S'
++ dt = datetime(*time.strptime(value[:19], format)[:6])
+ params[key] = dt
+ if hasattr(field, 'type') and isinstance(field.type, Date) and not isinstance(value, datetime):
+- dt = datetime.strptime(value, '%Y-%m-%d')
++ format = '%Y-%m-%d'
++ dt = datetime(*time.strptime(value, format)[:6])
+ params[key] = dt
+ if hasattr(field, 'type') and isinstance(field.type, Interval) and not isinstance(value, timedelta):
+ d = re.match(
diff --git a/python-sprox.spec b/python-sprox.spec
index 9853a33..e94e560 100644
--- a/python-sprox.spec
+++ b/python-sprox.spec
@@ -2,7 +2,7 @@
Name: python-sprox
Version: 0.6.10
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: A package for creation of web widgets directly from database schema
Group: Development/Languages
@@ -10,6 +10,7 @@ License: MIT
URL: http://sprox.org
Source0: http://pypi.python.org/packages/source/s/sprox/sprox-%{version}.tar.gz
+Patch0: py2.4_fix_datetime.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -32,6 +33,7 @@ other content with customizable data.
%prep
%setup -q -n sprox-%{version}
+%patch0 -p1 -b .py24
%build
@@ -58,6 +60,10 @@ rm -rf %{buildroot}
%changelog
+* Thu Jan 20 2011 Luke Macken <lmacken at redhat.com> - 0.6.10-2
+- Apply a patch from upstream bitbucket ticket #30 to get Sprox running on
+ Python 2.4 for bz#596768
+
* Wed May 05 2010 Luke Macken <lmacken at redhat.com> - 0.6.10-1
- Update to 0.6.10
More information about the scm-commits
mailing list