"sudo pip install -e ." seems to work in place of "python setup.py develop" too.
I'm pretty sure I managed to get "sudo python setup.py develop" to work out of the box on a fresh vm once by some magical sequence of installation of pip, python-setuptools (distribute), and some older version of setuptools:
It has something to do with distutils/core.py's Distribution class not being patched to setuptools.dist.Distribution in time during the dependency installation, because the "TypeError: dist must be a Distribution instance" that's being raised is from the distutils code is lazy importing distutils.dist.Distribution and gets setuptools.dist.Distribution, but the "dist" instance is checking is_subclass on is really a distutils.dist.Distribution - because it was instantiated as such back in the dependencies call to setuptools.setup (which I guess is *really* distutils.core.setup).
What's curious is that when I drop a pdb.set_trace() in distutils.core around line # 102 to catch the case where Distribution.__module__.startswith('distutils') - I find it's *only* distutils.core.Distribution that's un-patched. sys.modules['distutils'].dist.Distribution verifies that there it is in fact setuptools.dist.Distribution, but that must have happened after this module imported it. If I reload(sys.modules['setuptools.dist']) the side-effect monkey patching fixes everything and the install completes just fine.
"sudo pip install -e ." seems to work in place of "python setup.py develop" too.
I'm pretty sure I managed to get "sudo python setup.py develop" to work out of the box on a fresh vm once by some magical sequence of installation of pip, python-setuptools (distribute), and some older version of setuptools:
https:/ /pypi.python. org/packages/ source/ s/setuptools/
But I can't seem to duplicate that.
Everything in the commit log from 1.0 to 1.1 seems pretty innocuous:
https:/ /bitbucket. org/pypa/ setuptools/ commits/ all
It has something to do with distutils/core.py's Distribution class not being patched to setuptools. dist.Distributi on in time during the dependency installation, because the "TypeError: dist must be a Distribution instance" that's being raised is from the distutils code is lazy importing distutils. dist.Distributi on and gets setuptools. dist.Distributi on, but the "dist" instance is checking is_subclass on is really a distutils. dist.Distributi on - because it was instantiated as such back in the dependencies call to setuptools.setup (which I guess is *really* distutils. core.setup) .
What's curious is that when I drop a pdb.set_trace() in distutils.core around line # 102 to catch the case where Distribution. __module_ _.startswith( 'distutils' ) - I find it's *only* distutils. core.Distributi on that's un-patched. sys.modules[ 'distutils' ].dist. Distribution verifies that there it is in fact setuptools. dist.Distributi on, but that must have happened after this module imported it. If I reload( sys.modules[ 'setuptools. dist']) the side-effect monkey patching fixes everything and the install completes just fine.