astropy/astropy — pull request #589 by iguananaut (2013-01-03 00:08:24+00:00)
Title: pip install of astropy broken

Testing installation of the new 0.2b1 release with pip revealed a serious bug with installation with pip:

```
$ pip install -i http://testpypi.python.org/simple astropy
Downloading/unpacking astropy
Downloading astropy-0.2b1.tar.gz (4.4MB): 4.4MB downloaded
Running setup.py egg_info for package astropy

Requirement already satisfied (use --upgrade to upgrade): numpy in /bray/sc1/root/lib/python2.7/site-packages (from astropy)
Installing collected packages: astropy
Running setup.py install for astropy
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help

error: option --single-version-externally-managed not recognized
Complete output from command /bray/sc1/root/home/embray/.virtualenvs/astropy-release-test/bin/python2.7 -c "import setuptools;__file__='/bray/sc1/root/home/embray/.virtualenvs/astropy-release-test/build/astropy/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-lGI0kV-record/install-record.txt --single-version-externally-managed --install-headers /bray/sc1/root/home/embray/.virtualenvs/astropy-release-test/include/site/python2.7:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]

or: -c --help [cmd1 cmd2 ...]

or: -c --help-commands

or: -c cmd --help

error: option --single-version-externally-managed not recognized

----------------------------------------
Command /bray/sc1/root/home/embray/.virtualenvs/astropy-release-test/bin/python2.7 -c "import setuptools;__file__='/bray/sc1/root/home/embray/.virtualenvs/astropy-release-test/build/astropy/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-lGI0kV-record/install-record.txt --single-version-externally-managed --install-headers /bray/sc1/root/home/embray/.virtualenvs/astropy-release-test/include/site/python2.7 failed with error code 1 in /bray/sc1/root/home/embray/.virtualenvs/astropy-release-test/build/astropy
Storing complete log in /bray/sc1/root/home/embray/.pip/pip.log
```

This happens whether Astropy is installed from PyPI, an already downloaded tarball, a git clone, or any other method.

Needless to say this is terribly cryptic. But I think I know what the problem is, and it stems from the fact that some of our customized `setup.py` commands are inherting from the distutils versions of those commands and *not* from the setuptools versions. In particular `AstropyInstall` is probably causing this.