MySQLdb install vs. "setuptools"

John Nagle nagle at animats.com
Sun May 30 12:49:35 EDT 2010


David Cournapeau wrote:
> On Sun, May 30, 2010 at 3:56 PM, John Nagle <nagle at animats.com> wrote:
>>   MySQLdb won't install as non-root on Python 2.6 because
>> its "setup.py" file requires "setuptools".  "setuptools",
>> unlike "distutils", isn't part of the Python 2.6 distribution.
>>
>>   IMPORTANT PACKAGES SHOULD NOT USE "setuptools".  Use the
>> standard "distutils".  "setuptools" and "eggs" create more
>> problems than they solve.  "setuptools" has many built-in
>> assumptions about where things are supposed to be, and they're
>> usually wrong.
> 
> Yes, setuptools is often a pain.
> 
> The magic incantation you want is something like python setup.py
> install --prefix=someprefix --single-version-externally-managed
> --record=/dev/null. I myself have a small script which detects whether
> setup.py uses setuptools or not, and add the necessary options in
> setuptools case for a sane behavior.
> 
> David

     The "setup.py" file for MySQLdb has, as its first Python
line, "from setuptools import ...".  No combination of options will
get around that.

				John Nagle



More information about the Python-list mailing list