astropy/astropy — pull request #960 by embray (2013-11-27 19:25:42+00:00)
Title: Should astropy work with py2exe?

This may be outside the scope of the project, but I'm trying to make a standalone Windows application (with py2exe) that uses astropy. I don't get very far, as trying to import astropy triggers complaints about configuration.

Here's a simple version of the problem:

in main.py:
```python
import astropy
```

in setup.py
```
import sys
from distutils.core import setup
import py2exe
import numpy

#directory within WinSxS containing MSVCP90.dll - system dependent
sys.path.append('C:\\Windows\\WinSxS\\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f91')

setup(console=['main.py'],
options={'py2exe':{'excludes':['zmq']}},
)
```

This is enough to run `python setup.py py2exe` and create dist/main.exe on my machine, but running it gives:
```
Traceback (most recent call last):
File "main.py", line 1, in
File "astropy\__init__.pyc", line 109, in
File "astropy\logger.pyc", line 15, in
File "astropy\utils\console.pyc", line 35, in
File "astropy\config\configuration.pyc", line 128, in __init__
RuntimeError: Cannot automatically determine get_config module, because it is not called from inside a valid module
```