MySQL Forums
Forum List  »  Connector/Python

Re: Problems in building 1.2.2 on Mac OS 10.5
Posted by: M Hess
Date: December 29, 2008 02:09AM

I'm running 10.5.6 on a PowerBook G4 (ppc obviously), and I was able to get things running without a hitch by combining parts from a couple of the aforementioned strategies:

1. Comment out those infamous lines 37-39 in _mysql.c

2. Then, also comment out the duplicate uint line 92 in /usr/include/sys/types.h

3. (Optional) Update the __init__.py and converters.py files (in MySQLdb subdir) for 'sets' module deprecation. This is mainly so you don't get those annoying "deprecated module" messages. See diffs at end of the post.

4. easy_install in source dir

5. Make sure you change back the types.h file when you're done (i'm not exactly what this header file does in the grand scheme of things; hence the reverting).

Hopefully that will work for more people than just me...

-matt


Here are the diffs:


__init__.py

(the code's a little clumsy here because there's no abstract BaseSet parent class for the set and frozenset types)

34,35c34
< from sets import ImmutableSet
< class DBAPISet(ImmutableSet):
---
> class DBAPISet(frozenset):
41,42c40
< from sets import BaseSet
< if isinstance(other, BaseSet):
---
> if isinstance(other, set) or isinstance(other, frozenset):
48,49c46
< from sets import BaseSet
< if isinstance(other, BaseSet):
---
> if isinstance(other, set) or isinstance(other, frozenset):


converters.py

37d36
< from sets import BaseSet, Set
45c44
< return Set([ i for i in s.split(',') if i ])
---
> return set([ i for i in s.split(',') if i ])
121a121
> types.SetType: Set2Str,

Options: ReplyQuote


Subject
Written By
Posted
Re: Problems in building 1.2.2 on Mac OS 10.5
December 29, 2008 02:09AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.