[python-sqlalchemy0.5/f14/master] Initial import for f14, fixed py2.7 issues

Martin Bacovsky mbacovsk at fedoraproject.org
Thu Nov 25 13:06:23 UTC 2010


commit e1cb9c23114f19afd3fba0fbfbb771358b2a2bb1
Author: Martin Bačovský <mbacovsk at redhat.com>
Date:   Thu Nov 25 14:05:28 2010 +0100

    Initial import for f14, fixed py2.7 issues

 .gitignore                      |    1 +
 python-sqlalchemy0.5-py27.patch |  122 ++++++++++++++++++++++++
 python-sqlalchemy0.5.spec       |  199 +++++++++++++++++++++++++++++++++++++++
 sources                         |    1 +
 4 files changed, 323 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..e000bb6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/SQLAlchemy-0.5.8.tar.gz
diff --git a/python-sqlalchemy0.5-py27.patch b/python-sqlalchemy0.5-py27.patch
new file mode 100644
index 0000000..9ce0824
--- /dev/null
+++ b/python-sqlalchemy0.5-py27.patch
@@ -0,0 +1,122 @@
+diff -up SQLAlchemy-0.5.8/test/aaa_profiling/test_pool.py.py27 SQLAlchemy-0.5.8/test/aaa_profiling/test_pool.py
+--- SQLAlchemy-0.5.8/test/aaa_profiling/test_pool.py.py27	2010-01-16 21:33:57.000000000 +0100
++++ SQLAlchemy-0.5.8/test/aaa_profiling/test_pool.py	2010-11-25 12:12:04.767955822 +0100
+@@ -15,7 +15,7 @@ class QueuePoolTest(TestBase, AssertsExe
+                          use_threadlocal=True)
+ 
+ 
+-    @profiling.function_call_count(54, {'2.4': 38})
++    @profiling.function_call_count(54, {'2.4': 38, '2.7': 49})
+     def test_first_connect(self):
+         conn = pool.connect()
+ 
+@@ -23,7 +23,7 @@ class QueuePoolTest(TestBase, AssertsExe
+         conn = pool.connect()
+         conn.close()
+ 
+-        @profiling.function_call_count(31, {'2.4': 21})
++        @profiling.function_call_count(31, {'2.4': 21, '2.7': 28})
+         def go():
+             conn2 = pool.connect()
+             return conn2
+diff -up SQLAlchemy-0.5.8/test/sql/test_generative.py.py27 SQLAlchemy-0.5.8/test/sql/test_generative.py
+--- SQLAlchemy-0.5.8/test/sql/test_generative.py.py27	2010-11-25 13:29:53.779086107 +0100
++++ SQLAlchemy-0.5.8/test/sql/test_generative.py	2010-11-25 13:36:10.777221875 +0100
+@@ -486,8 +486,18 @@ class ClauseAdapterTest(TestBase, Assert
+ 
+         t2alias = t2.alias('t2alias')
+         vis.chain(sql_util.ClauseAdapter(t2alias))
+-        self.assert_compile(vis.traverse(select(['*'], t1.c.col1==t2.c.col2)), "SELECT * FROM table1 AS t1alias, table2 AS t2alias WHERE t1alias.col1 = t2alias.col2")
+-        self.assert_compile(vis.traverse(select(['*'], t1.c.col1==t2.c.col2, from_obj=[t1, t2])), "SELECT * FROM table1 AS t1alias, table2 AS t2alias WHERE t1alias.col1 = t2alias.col2")
++        # for some reason in py2.7 tables in from caluse are sometimes swaped
++        # so we have to expect both variants
++        try:
++            self.assert_compile(vis.traverse(select(['*'], t1.c.col1==t2.c.col2)), "SELECT * FROM table1 AS t1alias, table2 AS t2alias WHERE t1alias.col1 = t2alias.col2")
++        except AssertionError:
++            self.assert_compile(vis.traverse(select(['*'], t1.c.col1==t2.c.col2)), "SELECT * FROM table2 AS t2alias, table1 AS t1alias WHERE t1alias.col1 = t2alias.col2")
++
++        try:
++            self.assert_compile(vis.traverse(select(['*'], t1.c.col1==t2.c.col2, from_obj=[t1, t2])), "SELECT * FROM table1 AS t1alias, table2 AS t2alias WHERE t1alias.col1 = t2alias.col2")
++        except AssertionError:
++            self.assert_compile(vis.traverse(select(['*'], t1.c.col1==t2.c.col2, from_obj=[t1, t2])), "SELECT * FROM table2 AS t2alias, table1 AS t1alias WHERE t1alias.col1 = t2alias.col2")
++
+         self.assert_compile(vis.traverse(select(['*'], t1.c.col1==t2.c.col2, from_obj=[t1, t2]).correlate(t1)), "SELECT * FROM table2 AS t2alias WHERE t1alias.col1 = t2alias.col2")
+         self.assert_compile(vis.traverse(select(['*'], t1.c.col1==t2.c.col2, from_obj=[t1, t2]).correlate(t2)), "SELECT * FROM table1 AS t1alias WHERE t1alias.col1 = t2alias.col2")
+ 
+@@ -636,15 +646,23 @@ class ClauseAdapterTest(TestBase, Assert
+             a.join(b).select().apply_labels(),
+             a.join(d).select().apply_labels()
+         ).alias()    
+-        
+-        self.assert_compile(
+-            sql_util.ClauseAdapter(u).traverse(select([c.c.bid]).where(c.c.bid==u.c.b_aid)),
+-            "SELECT c.bid "\
++       
++        expected_stmt = "SELECT c.bid "\
+             "FROM c, (SELECT a.id AS a_id, b.id AS b_id, b.aid AS b_aid "\
+             "FROM a JOIN b ON a.id = b.aid UNION SELECT a.id AS a_id, d.id AS d_id, d.aid AS d_aid "\
+             "FROM a JOIN d ON a.id = d.aid) AS anon_1 "\
+             "WHERE c.bid = anon_1.b_aid"
+-        )
++
++        # for some reason in py2.7 tables in from caluse are sometimes swaped
++        # so we have to expect both variants
++        try:
++            self.assert_compile(
++                sql_util.ClauseAdapter(u).traverse(select([c.c.bid]).where(c.c.bid==u.c.b_aid)),
++                expected_stmt)
++        except AssertionError:
++            self.assert_compile(
++                sql_util.ClauseAdapter(u).traverse(select([c.c.bid]).where(c.c.bid==u.c.b_aid)),
++                expected_stmt.replace('FROM c,', 'FROM').replace('AS anon_1', 'AS anon_1, c'))
+ 
+ class SpliceJoinsTest(TestBase, AssertsCompiledSQL):
+     @classmethod
+diff -up SQLAlchemy-0.5.8/test/sql/test_select.py.py27 SQLAlchemy-0.5.8/test/sql/test_select.py
+--- SQLAlchemy-0.5.8/test/sql/test_select.py.py27	2010-01-16 21:33:55.000000000 +0100
++++ SQLAlchemy-0.5.8/test/sql/test_select.py	2010-11-25 12:12:04.768955655 +0100
+@@ -68,8 +68,17 @@ class SelectTest(TestBase, AssertsCompil
+     def test_table_select(self):
+         self.assert_compile(table1.select(), "SELECT mytable.myid, mytable.name, mytable.description FROM mytable")
+ 
+-        self.assert_compile(select([table1, table2]), "SELECT mytable.myid, mytable.name, mytable.description, myothertable.otherid, \
+-myothertable.othername FROM mytable, myothertable")
++    
++        # for some reason in py2.7 tables in from caluse are sometimes swaped
++        # so we have to expect both variants
++        expected_stmt = "SELECT mytable.myid, mytable.name, mytable.description, myothertable.otherid, \
++myothertable.othername FROM mytable, myothertable"
++        try:
++            self.assert_compile(select([table1, table2]), expected_stmt)
++        except AssertionError:
++            self.assert_compile(select([table1, table2]), expected_stmt.replace(
++                'FROM mytable, myothertable', 'FROM myothertable, mytable'))
++
+ 
+     def test_from_subquery(self):
+         """tests placing select statements in the column clause of another select, for the
+@@ -1189,9 +1198,22 @@ UNION SELECT mytable.myid FROM mytable"
+                  {'myid_1':5, 'myid_2':6}, {'myid_1':5, 'myid_2':6}, [5,6]
+              ),
+              ]:
++                # for some reason in py2.7 tables in from caluse are sometimes swaped
++                # so we have to expect both variants
++                try:
++                    self.assert_compile(stmt, expected_named_stmt, params=expected_default_params_dict)
++                except AssertionError:
++                    self.assert_compile(stmt, expected_named_stmt.replace(
++                        'FROM mytable, myothertable WHERE', 'FROM myothertable, mytable WHERE'), 
++                        params=expected_default_params_dict)
++
++                try:    
++                    self.assert_compile(stmt, expected_positional_stmt, dialect=sqlite.dialect())
++                except AssertionError:
++                    self.assert_compile(stmt, expected_positional_stmt.replace(
++                        'FROM mytable, myothertable WHERE', 'FROM myothertable, mytable WHERE'), 
++                        dialect=sqlite.dialect())
+ 
+-                self.assert_compile(stmt, expected_named_stmt, params=expected_default_params_dict)
+-                self.assert_compile(stmt, expected_positional_stmt, dialect=sqlite.dialect())
+                 nonpositional = stmt.compile()
+                 positional = stmt.compile(dialect=sqlite.dialect())
+                 pp = positional.get_params()
diff --git a/python-sqlalchemy0.5.spec b/python-sqlalchemy0.5.spec
new file mode 100644
index 0000000..14fc2cc
--- /dev/null
+++ b/python-sqlalchemy0.5.spec
@@ -0,0 +1,199 @@
+%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
+%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%endif
+
+%global srcname SQLAlchemy
+
+Name:           python-sqlalchemy0.5
+Version:        0.5.8
+Release:        4%{?dist}
+Summary:        Modular and flexible ORM library for python
+
+Group:          Development/Libraries
+License:        MIT
+URL:            http://www.sqlalchemy.org/
+Source0:        http://pypi.python.org/packages/source/S/%{srcname}/%{srcname}-%{version}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch0:         python-sqlalchemy0.5-py27.patch
+
+BuildArch:      noarch
+BuildRequires:  python-devel
+%if 0%{?fedora} > 12 || 0%{?rhel} > 5
+BuildRequires: python-setuptools
+%else
+BuildRequires:  python-setuptools-devel >= 0.6c3
+%endif
+BuildRequires: python-nose
+
+%description
+SQLAlchemy is an Object Relational Mappper (ORM) that provides a flexible,
+high-level interface to SQL databases.  Database and domain concepts are
+decoupled, allowing both sides maximum flexibility and power. SQLAlchemy
+provides a powerful mapping layer that can work as automatically or as manually
+as you choose, determining relationships based on foreign keys or letting you
+define the join conditions explicitly, to bridge the gap between database and
+domain.
+
+%prep
+%setup -q -n %{srcname}-%{version}
+%patch0 -p1
+
+%build
+CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
+sed -i 's/\r//' examples/dynamic_dict/dynamic_dict.py
+
+%install
+rm -rf $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT%{python_sitelib}
+%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
+
+# remove unnecessary scripts for building documentation
+rm -rf doc/build
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%check
+export PYTHONPATH=.
+%{__python} setup.py develop -d .
+nosetests
+
+%files
+%defattr(-,root,root,-)
+%doc README LICENSE PKG-INFO CHANGES doc examples
+%{python_sitelib}/*
+
+%changelog
+* Thu Nov 25 2010 Martin Bacovsky <mbacovsk at redhat.com> - 0.5.8-4
+- rebuild as python-sqlalchemy0.5 
+- fixed python2.7 issues in tests
+
+* Tue Feb 2 2010 Toshio Kuratomi <toshio at fedoraproject.org> - 0.5.8-3
+- One last cleanup
+
+* Tue Feb 2 2010 Toshio Kuratomi <toshio at fedoraproject.org> - 0.5.8-2
+- just some cleanups to older styles of building packages.
+
+* Mon Feb 1 2010 Toshio Kuratomi <toshio at fedoraproject.org> - 0.5.8-1
+- Upstream bugfix release 0.5.8
+
+* Fri Aug 14 2009 Toshio Kuratomi <toshio at fedoraproject.org> - 0.5.5-2
+- Upstream bugfix release 0.5.5
+
+* Sun Jul 26 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.5.4-2.p2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
+
+* Fri Jun 12 2009 Toshio Kuratomi <toshio at fedoraproject.org> - 0.5.4-1.p2
+- Upstream bugfix release 0.5.4p2.
+
+* Thu Apr 16 2009 Toshio Kuratomi <toshio at fedoraproject.org> - 0.5.3-1
+- Upstream bugfix release.
+
+* Thu Feb 26 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.5.2-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+
+* Wed Feb 11 2009 Toshio Kuratomi <toshio at fedoraproject.org> - 0.5.2-1
+- Update to 0.5.2
+
+* Wed Jan 21 2009 Toshio Kuratomi <toshio at fedoraproject.org> - 0.5.1-1
+- Update to 0.5.1.
+
+* Mon Dec 1 2008 Toshio Kuratomi <toshio at fedoraproject.org> - 0.5-0.1.rc4
+- Update to 0.5.0rc4 which works with the new pysqlite
+- And update test cases to work with the new pysqlite
+
+* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm at gmail.com> - 0.4.7-2
+- Rebuild for Python 2.6
+
+* Sun Jul 27 2008 Toshio Kuratomi <toshio at fedoraproject.org> 0.4.7-1
+- Update to 0.4.7.
+
+* Sun Jun 1 2008 Toshio Kuratomi <toshio at fedoraproject.org> 0.4.6-1
+- Update to 0.4.6.
+
+* Tue Apr 8 2008 Toshio Kuratomi <toshio at fedoraproject.org> 0.4.5-1
+- Update to 0.4.5.
+
+* Fri Feb 22 2008 Toshio Kuratomi <toshio at fedoraproject.org> 0.4.3-1
+- Update to 0.4.3.
+
+* Tue Dec 11 2007 Toshio Kuratomi <a.badger at gmail.com> 0.4.2-1.p3
+- Update to 0.4.2p3.
+
+* Tue Dec 11 2007 Toshio Kuratomi <a.badger at gmail.com> 0.4.1-1
+- Update to 0.4.1.
+
+* Wed Oct 17 2007 Toshio Kuratomi <a.badger at gmail.com> 0.4.0-1
+- SQLAlchemy-0.4.0 final
+- Run the testsuite
+
+* Wed Oct  3 2007 Luke Macken <lmacken at redhat.com> 0.4.0-0.4.beta6
+- SQLAlchemy-0.4.0beta6
+
+* Tue Sep 11 2007 Toshio Kuratomi <a.badger at gmail.com> - 0.4.0-0.4.beta5
+- Update to 0.4beta5.
+
+* Fri Sep 06 2007 Toshio Kuratomi <a.badger at gmail.com> - 0.4.0-0.4.beta4
+- setuptools has been fixed.
+
+* Fri Aug 31 2007 Toshio Kuratomi <a.badger at gmail.com> - 0.4.0-0.3.beta4
+- setuptools seems to be broken WRT having an active and inactive version
+  of an egg.  Have to make both versions inactive and manually setup a copy
+  that can be started via import. (Necessary for the sqlalchemy0.3 compat
+  package.)
+
+* Tue Aug 28 2007 Toshio Kuratomi <a.badger at gmail.com> - 0.4.0-0.2.beta4
+- Modify setuptools to handle the -devel subpackage split in F-8.
+
+* Mon Aug 27 2007 Toshio Kuratomi <toshio at tiki-lounge.com> - 0.4.0-0.1.beta4
+- Update to 0.4 beta4.
+
+* Tue Jul 24 2007 Toshio Kuratomi <toshio at tiki-lounge.com> - 0.3.10-2
+- Remove python-abi Requires.  This is automatic since FC4+.
+
+* Tue Jul 24 2007 Toshio Kuratomi <toshio at tiki-lounge.com> - 0.3.10-1
+- Update to new upstream version 0.3.10
+
+* Fri Mar 23 2007 Toshio Kuratomi <toshio at tiki-lounge.com> - 0.3.6-1
+- Update to new upstream version 0.3.6
+
+* Sat Mar 10 2007 Toshio Kuratomi <toshio at tiki-lounge.com> - 0.3.5-1
+- Update to new upstream version 0.3.5
+- Simplify the files listing
+
+* Tue Jan 23 2007 Toshio Kuratomi <toshio at tiki-lounge.com> - 0.3.4-2
+- Remember to upload the source tarball to the lookaside cache.
+
+* Tue Jan 23 2007 Toshio Kuratomi <toshio at tiki-lounge.com> - 0.3.4-1
+- Update to new upstream version 0.3.4
+
+* Mon Jan 01 2007 Toshio Kuratomi <toshio at tiki-lounge.com> - 0.3.3-1
+- Update to new upstream version 0.3.3
+
+* Sat Dec 09 2006 Toshio Kuratomi <toshio at tiki-lounge.com> - 0.3.1-2
+- Bump and rebuild for python 2.5 on devel.
+- BuildRequire: python-devel as a header is missing otherwise.
+
+* Fri Nov 24 2006 Toshio Kuratomi <toshio at tiki-lounge.com> - 0.3.1-1
+- Update to new upstream version 0.3.1
+
+* Sat Sep 16 2006 Shahms E. King <shahms at shahms.com> 0.2.7-2
+- Rebuild for FC6
+
+* Thu Aug 17 2006 Shahms E. King <shahms at shahms.com> 0.2.7-1
+- Update to new upstream version
+
+* Fri Aug 11 2006 Shahms E. King <shahms at shahms.com> 0.2.6-2
+- Include, don't ghost .pyo files per new guidelines
+
+* Tue Aug 08 2006 Shahms E. King <shahms at shahms.com> 0.2.6-1
+- Update to new upstream version
+
+* Fri Jul 07 2006 Shahms E. King <shahms at shahms.com> 0.2.4-1
+- Update to new upstream version
+
+* Mon Jun 26 2006 Shahms E. King <shahms at shahms.com> 0.2.3-1
+- Update to new upstream version
+
+* Wed May 31 2006 Shahms E. King <shahms at shahms.com> 0.2.1-1
+- Update to new upstream version
diff --git a/sources b/sources
index e69de29..190ba61 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+11292211f2634151d240025d58791210  SQLAlchemy-0.5.8.tar.gz


More information about the scm-commits mailing list