Okay, there's going to be a patch-level release soon (see http://sourceforge.net/forum/forum.php?forum_id=559852), but it would be seriously nice to have this -- it has some good improvements (character encoding). I will attach a very basic ebuild (based on 1.2.0-r1).
Created attachment 84669 [details, diff] New ebuild for 1.2.1.
*** Bug 132351 has been marked as a duplicate of this bug. ***
There's been an updated version from upstream, 1.2.1_p2, which fixes some compatibility problems with MySQL versions < 4.1. I've copied my ebuild, seems to work (attaching).
Created attachment 86206 [details, diff] New ebuild for new MySQLdb.
Using the mysqlclient enviroment variable no longer does anything in 1.2.1 and newer. If you have to change any build options, just overwrite site.cfg. By default, it will use the threadsafe (mysqlclient_r) libraries, which should not be an issue for Gentoo. You should be able to remove the src_compile() function. You may want to reexamine src_install() because there are no HTML docs included anymore; you need to generate them with docutils. Everything in doc is .txt (actually ReStructured Text). You could DEPEND="... ?doc ( dev-python/docutils )" and then use doc && rst2html.py to generate the HTML. Minimum supported MySQL version is 4.0, but there are no known issues with 3.23. Most of the testing was with 5.0 on amd64, with some on 4.1 on x86 (actually Ubuntu), and not very much (none, really, that's why there's the p2 release) on 4.0. Gentoo is still my primary development environment for MySQLdb, so the default settings should work fine. I'm watching this bug but you can mail me off-bug if you have questions/problems.
I think having the ReST-docs is just fine, instead of the HTML-version (but then I never much used the docs myself, I don't usually enable the doc useflag). Thanks for the comments, though! I incorporated them in the new version I'm about to attach.
Created attachment 86597 [details, diff] New version, incorporated comments from adustman.
I tested the ebuild and it works fine for me. More over, the 1.2.1 version has fixed utf8 support so just upgrading from 1.2.0-r1 enabled me to pass unicode data to mysql-python driver which automatically converts that to the utf8 charset, as specified by the mysql column definition. Very nice. The Decimal patch is incorporated in 1.2.1 release so I don't see a reason why this should not be injected into portage. Please mark stable on ~x86. Thanks. ;)
Thanks for the ebuild, it is now in portage and 1.2.0-r1 is now the stable in x86 as it should be.