setup.py and installing a python project
<p>I've looked through the setup.py documentation and am still having some difficulties with what I feel should be pretty basic.</p>

<p>I've broken this down to a simple example project that I'm trying to get running, my project's directory layout is as follows:</p>

<pre><code>myproject
  setup.py
  src\
    main.py
      extern\
      __init__.py
      mytest.py
</code></pre>

<p><strong>myproject/setup.py:</strong></p>

<pre><code>#!/usr/bin/env python
from distutils.core import setup

setup(name = "myproject",
      package_dir = {'':"src"},
      packages = ["extern"],
      scripts = ["src/main.py"],
      )
</code></pre>

<p><strong>myproject/src/main.py:</strong></p>

<pre><code>#! /usr/bin/env python
import extern.mytest as mytest

mytest.print_test()
</code></pre>

<p><strong>myproject/src/extern/mytest.py:</strong></p>

<pre><code>#!/usr/bin/env python
def print_test():
    print "YAY"
</code></pre>

<p><strong>myproject/src/extern/_<em>init</em>_.py is blank.</strong></p>

<p>I'm running setup.py as:</p>

<pre><code>setup.py install --prefix ~/local
</code></pre>

<p>setup.py will complete with no errors and move main.py to ~/local/bin however when I run it I get the following error:</p>

<pre><code>ImportError: No module named extern.mytest
</code></pre>

<p>Any idea what I'm doing wrong? Thanks!</p>
