[python-storm] Split off Twisted support and add two bugfix patches
Aurelien Bompard
abompard at fedoraproject.org
Wed Jul 10 07:18:06 UTC 2013
commit e9cead0ea3384a83e66595e794edf18588bf9d69
Author: Aurélien Bompard <aurelien at bompard.org>
Date: Wed Jul 10 09:16:28 2013 +0200
Split off Twisted support and add two bugfix patches
python-storm-maxint.patch | 17 +++++++++++++++++
python-storm.spec | 29 ++++++++++++++++++++++++++++-
storm-0.20-exclude-tests.patch | 11 +++++++++++
3 files changed, 56 insertions(+), 1 deletions(-)
---
diff --git a/python-storm-maxint.patch b/python-storm-maxint.patch
new file mode 100644
index 0000000..5969062
--- /dev/null
+++ b/python-storm-maxint.patch
@@ -0,0 +1,17 @@
+diff -up ./storm/databases/sqlite.py.maxint ./storm/databases/sqlite.py
+--- ./storm/databases/sqlite.py.maxint 2013-07-10 08:30:08.645141067 +0200
++++ ./storm/databases/sqlite.py 2013-07-10 08:37:17.063999847 +0200
+@@ -48,12 +48,7 @@ compile = compile.create_child()
+ @compile.when(Select)
+ def compile_select_sqlite(compile, select, state):
+ if select.offset is not Undef and select.limit is Undef:
+- if sys.platform.startswith('darwin'):
+- # On OS X sqlite doesn't like maxint as LIMIT. See also
+- # https://lists.ubuntu.com/archives/storm/2013-June/001492.html
+- select.limit = sys.maxint - 1
+- else:
+- select.limit = sys.maxint
++ select.limit = sys.maxint - 1
+ statement = compile_select(compile, select, state)
+ if state.context is SELECT:
+ # SQLite breaks with (SELECT ...) UNION (SELECT ...), so we
diff --git a/python-storm.spec b/python-storm.spec
index f50e992..14bc17c 100644
--- a/python-storm.spec
+++ b/python-storm.spec
@@ -11,7 +11,13 @@ URL: https://storm.canonical.com/
Source0: https://launchpad.net/storm/trunk/%{version}/+download/storm-%{version}.tar.bz2
Source1: README-Django.Fedora
+# https://lists.ubuntu.com/archives/storm/2013-June/001492.html
+Patch0: python-storm-maxint.patch
+# https://bugs.launchpad.net/storm/+bug/1199578
+Patch1: storm-0.20-exclude-tests.patch
+
BuildRequires: python2-devel python-setuptools
+BuildRequires: python-fixtures
Provides: %{name}-sqlite = %{version}-%{release}
Obsoletes: %{name}-sqlite < %{version}-%{release}
@@ -64,9 +70,20 @@ Requires: python-zope-interface python-transaction
The %{name}-zope package provides Zope integration for %{name}.
+%package twisted
+Summary: Twisted integration for %{name}
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: python-twisted-core
+
+%description twisted
+The %{name}-twisted package provides Twisted integration for %{name}.
+
+
%prep
%setup -q -n storm-%{version}
-#patch0 -p1
+%patch0 -p1
+%patch1 -p1
cp -p %{SOURCE1} .
@@ -90,6 +107,7 @@ cp -p %{SOURCE1} .
%exclude %{python_sitearch}/storm/cextensions.c
%exclude %{python_sitearch}/storm/databases/mysql.*
%exclude %{python_sitearch}/storm/databases/postgres.*
+%exclude %{python_sitearch}/storm/twisted
%{python_sitearch}/storm*
%files django
@@ -109,7 +127,16 @@ cp -p %{SOURCE1} .
%defattr(-,root,root,-)
%{python_sitearch}/storm/databases/postgres.*
+%files twisted
+%defattr(-,root,root,-)
+%{python_sitearch}/storm/twisted
+
+
%changelog
+* Wed Jul 10 2013 Aurelien Bompard <abompard at fedoraproject.org> - 0.20-1
+- Split off the twisted support files (RHBZ#963158)
+- Add to bugfix patches, already reported upstream
+
* Thu Jul 4 2013 Michel Salim <salimma at fedoraproject.org> - 0.20-1
- Update to 0.20
diff --git a/storm-0.20-exclude-tests.patch b/storm-0.20-exclude-tests.patch
new file mode 100644
index 0000000..f3c44cc
--- /dev/null
+++ b/storm-0.20-exclude-tests.patch
@@ -0,0 +1,11 @@
+--- a/setup.py
++++ b/setup.py
+@@ -32,7 +32,7 @@
+ license="LGPL",
+ url="https://storm.canonical.com",
+ download_url="https://launchpad.net/storm/+download",
+- packages=find_packages(),
++ packages=find_packages(exclude=['tests', 'tests.*']),
+ package_data={"": ["*.zcml"]},
+ classifiers=[
+ "Development Status :: 5 - Production/Stable",
More information about the scm-commits
mailing list