From: Arkadiusz Miśkiewicz Date: Thu, 10 Dec 2009 08:30:52 +0000 (+0000) Subject: - use 1.2.3c1 instead of 1.2.2 + branch patch X-Git-Tag: auto/th/python-MySQLdb-1_2_3-0_c1_1 X-Git-Url: http://git.pld-linux.org/?a=commitdiff_plain;h=c2d29effef1d8039cff4d743415907bc95ac5642;p=packages%2Fpython-MySQLdb.git - use 1.2.3c1 instead of 1.2.2 + branch patch Changed files: python-MySQLdb-branch.patch -> 1.2 python-MySQLdb.spec -> 1.56 --- diff --git a/python-MySQLdb-branch.patch b/python-MySQLdb-branch.patch deleted file mode 100644 index cccd54d..0000000 --- a/python-MySQLdb-branch.patch +++ /dev/null @@ -1,244 +0,0 @@ -Index: MySQLdb/setup.py -=================================================================== ---- MySQLdb/setup.py (.../tags/MySQLdb-1.2.2) (wersja 560) -+++ MySQLdb/setup.py (.../branches/MySQLdb-1.2) (wersja 560) -@@ -2,11 +2,10 @@ - - import os - import sys --import ez_setup; ez_setup.use_setuptools() - from setuptools import setup, Extension - - if sys.version_info < (2, 3): -- raise Error, "Python-2.3 or newer is required" -+ raise Error("Python-2.3 or newer is required") - - if os.name == "posix": - from setup_posix import get_config -Index: MySQLdb/README -=================================================================== ---- MySQLdb/README (.../tags/MySQLdb-1.2.2) (wersja 560) -+++ MySQLdb/README (.../branches/MySQLdb-1.2) (wersja 560) -@@ -21,6 +21,10 @@ - - Make sure you have the Python development headers and libraries - (python-devel). - -++ setuptools -+ -+ * http://pypi.python.org/pypi/setuptools -+ - + MySQL 3.23.32 or higher - - * http://www.mysql.com/downloads/ -@@ -35,11 +39,22 @@ - - * MySQL-4.0 is supported, but not tested and slightly discouraged. - -- * MySQL-4.1 is supported and tested. The prepared statements API is not -- supported, and won't be until MySQLdb-1.3 or 2.0. -+ * MySQL-4.1 is supported. The prepared statements API is not -+ supported, and won't be until MySQLdb-1.3 or 2.0, if ever. - - * MySQL-5.0 is supported and tested, including stored procedures. - -+ * MySQL-5.1 is supported (currently a release candidate) but untested. -+ It should work. -+ -+ * MySQL-6.0 is sorta-kinda-supported (currently alpha) but untested. -+ It should work. -+ -+ * Drizzle is a fork of MySQL. So far -+ the C API looks really similar except everything is renamed. -+ Drizzle support probably won't happen in 1.2. There may be have to -+ be an entirely different module, but still using DB-API. -+ - * MaxDB, formerly known as SAP DB (and maybe Adabas D?), is a - completely different animal. Use the sapdb.sql module that comes - with MaxDB. -@@ -94,7 +109,6 @@ - .. _Cygwin: http://www.cygwin.com/ - - -- - Building and installing - ----------------------- - -@@ -213,8 +227,7 @@ - Gentoo Linux - ............ - --Packaged as `mysql-python`_. Gentoo is also my preferred development platform, --though I have also done some with Ubuntu lately. :: -+Packaged as `mysql-python`_. :: - - # emerge sync - # emerge mysql-python -Index: MySQLdb/MySQLdb/converters.py -=================================================================== ---- MySQLdb/MySQLdb/converters.py (.../tags/MySQLdb-1.2.2) (wersja 560) -+++ MySQLdb/MySQLdb/converters.py (.../branches/MySQLdb-1.2) (wersja 560) -@@ -34,15 +34,19 @@ - - from _mysql import string_literal, escape_sequence, escape_dict, escape, NULL - from constants import FIELD_TYPE, FLAG --from sets import BaseSet, Set - from times import * - import types - import array - -+try: -+ set -+except NameError: -+ from sets import Set as set -+ - def Bool2Str(s, d): return str(int(s)) - - def Str2Set(s): -- return Set([ i for i in s.split(',') if i ]) -+ return set([ i for i in s.split(',') if i ]) - - def Set2Str(s, d): - return string_literal(','.join(s), d) -@@ -126,7 +130,7 @@ - types.BooleanType: Bool2Str, - DateTimeType: DateTime2literal, - DateTimeDeltaType: DateTimeDelta2literal, -- Set: Set2Str, -+ set: Set2Str, - FIELD_TYPE.TINY: int, - FIELD_TYPE.SHORT: int, - FIELD_TYPE.LONG: long, -Index: MySQLdb/MySQLdb/__init__.py -=================================================================== ---- MySQLdb/MySQLdb/__init__.py (.../tags/MySQLdb-1.2.2) (wersja 560) -+++ MySQLdb/MySQLdb/__init__.py (.../branches/MySQLdb-1.2) (wersja 560) -@@ -31,25 +31,20 @@ - from MySQLdb.times import Date, Time, Timestamp, \ - DateFromTicks, TimeFromTicks, TimestampFromTicks - --from sets import ImmutableSet --class DBAPISet(ImmutableSet): -+try: -+ frozenset -+except NameError: -+ from sets import ImmutableSet as frozenset - -+class DBAPISet(frozenset): -+ - """A special type of set for which A == x is true if A is a - DBAPISet and x is a member of that set.""" - -- def __ne__(self, other): -- from sets import BaseSet -- if isinstance(other, BaseSet): -- return super(DBAPISet.self).__ne__(self, other) -- else: -- return other not in self -- - def __eq__(self, other): -- from sets import BaseSet -- if isinstance(other, BaseSet): -- return super(DBAPISet, self).__eq__(self, other) -- else: -- return other in self -+ if isinstance(other, DBAPISet): -+ return not self.difference(other) -+ return other in self - - - STRING = DBAPISet([FIELD_TYPE.ENUM, FIELD_TYPE.STRING, -@@ -65,6 +60,18 @@ - DATETIME = TIMESTAMP - ROWID = DBAPISet() - -+def test_DBAPISet_set_equality(): -+ assert STRING == STRING -+ -+def test_DBAPISet_set_inequality(): -+ assert STRING != NUMBER -+ -+def test_DBAPISet_set_equality_membership(): -+ assert FIELD_TYPE.VAR_STRING == STRING -+ -+def test_DBAPISet_set_inequality_membership(): -+ assert FIELD_TYPE.DATE != STRING -+ - def Binary(x): - return str(x) - -Index: MySQLdb/MySQLdb/cursors.py -=================================================================== ---- MySQLdb/MySQLdb/cursors.py (.../tags/MySQLdb-1.2.2) (wersja 560) -+++ MySQLdb/MySQLdb/cursors.py (.../branches/MySQLdb-1.2) (wersja 560) -@@ -6,7 +6,14 @@ - """ - - import re --insert_values = re.compile(r"\svalues\s*(\(((?= 4.0.10 BuildRequires: python-devel >= 1:2.5 @@ -31,8 +30,7 @@ języka Python. Projekt jest tworzony z myślą o: - przyjaznością dla wątków (wątki nie zablokują się nawzajem). %prep -%setup -q -n MySQL-python-%{version} -%patch0 -p1 +%setup -q -n MySQL-python-%{version}c1 %build env CFLAGS="%{rpmcflags} -DHAVE_OPENSSL=1" %{_bindir}/python setup.py build