astropy/astropy — pull request #1877 by taldcroft (2013-12-08 12:54:35+00:00)
Title: Import fails on Python 3 if setup.py exists in current directory

The `__init__.py` test of whether the user is in the astropy source directory just checks for the existence of `setup.py`. This can easily have false positives, as first noted in #1875.
```
if sys.version_info[0] >= 3 and os.path.exists('setup.py'):
_rollback_import(
"You appear to be trying to import astropy from within a source "
"checkout. This is currently not possible using Python 3 due to "
"the reliance of 2to3 to convert some of Astropy's subpackages "
"for Python 3 compatibility.")
```