astropy/package-template — pull request #83 by mwcraig (2014-06-13 19:22:33+00:00)
Title: Add detail to __init__.py

In ccdproc I ran into an issue with the latest ``.travis.yml`` in the ``egg_info`` builds. They were failing because ``ccdproc`` imports numpy (as most affiliated packages will). A bit of poking around revealed that the top-level package imports are usually wrapped with

```python
if not _ASTROPY_SETUP_:
from packagename import *
```

This PR adds this to ``__init.py`` and adds an ``import numpy`` at the top of ``example_mod.py`` to make sure ``egg_info`` builds will break if the imports are not in a conditional (the other tempting route was to remove the ``$SETUP_CMD != egg_info`` conditionals from the installs of numpy).