title: Py2app ImportError for user-created module
body: <p>So I have a directory tree like this:</p>
  
  <pre><code>/
    setup.py
    src/
      ui.py
      load.py
      search.py
      parser.py
      img.py
      obj.py
      #..etc
    res/
      img.py
  </code></pre>
  
  <p>Setup.py looks like this:</p>
  
  <pre><code>#!/usr/bin/env python
  
  import os
  import shutil
  import sys
  import subprocess
  import copy
  
  from distutils.core import setup
  
  if "py2app" in sys.argv:
      ## Move the setup script to the src/ folder, then re-run it
      shutil.copy("setup.py", "src")
      newArgv = copy.copy(sys.argv)
      newArgv[newArgv.index("py2app")] = "rerun"
      os.chdir("src")
      subprocess.call(["python"] + newArgv)
  elif "rerun" in sys.argv:
      import py2app
      sys.argv[sys.argv.index("rerun")] = "py2app"
  
      setup(
          options={
              "py2app": {
                  "packages": "wx",
                  "site_packages": True
              },
          },
          app=["ui.py"],
          package_dir={"": "."})
  
      ## Go back up a directory level and copy the build and dist folders up as well
      os.chdir('..')
      for fldr in ["build", "dist"]:
          if os.path.exists(fldr):
              shutil.rmtree(fldr)
          shutil.move(os.path.join("src", fldr), ".")
  
      ## Copy the necessary data directories to their relevant locations in the app file
      for fldr in ["xml", "templates", "data"]:
          print "Copying %s..." % fldr
          shutil.copytree(fldr, os.path.join("dist/ui.app/Contents/", fldr))
      os.remove(os.path.join("src", sys.argv[0]))
  </code></pre>
  
  <p>(The reason I do the weird subprocess.call forky thing is because of a requirement to have setup.py in the root of the tree, but all the source in src/)</p>
  
  <p>When I run <code>python setup.py py2app</code>, it finishes completely, but when I open ui.app, it gives the following error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "/Users/smith/Code/digital-directory/dist/ui.app/Contents/Resources/__boot__.py", line 127, in &lt;module&gt;
      _run()
    File "/Users/smith/Code/digital-directory/dist/ui.app/Contents/Resources/__boot__.py", line 122, in _run
      exec(compile(source, path, 'exec'), globals(), globals())
    File "/Users/smith/Code/digital-directory/dist/ui.app/Contents/Resources/ui.py", line 14, in &lt;module&gt;
      import load
  ImportError: No module named load
  </code></pre>