title: Include pymssql in py2app
body: <p>I'm trying to package an app and include <code>pymssql</code> with it. </p>
  
  <p>Here's my setup.py:</p>
  
  <pre><code>"""
  This is a setup.py script generated by py2applet
  
  Usage:
      python setup.py py2app
  """
  
  from setuptools import setup
  
  APP = ['AppName.py']
  DATA_FILES = ['pic1.jpg', 'pic2.jpeg']
  OPTIONS = {'argv_emulation': True,
             'packages': ['tkinter', '_mssql', 'pymssql']
             }
  
  setup(
      app=APP,
      data_files=DATA_FILES,
      options={'py2app': OPTIONS},
      setup_requires=['py2app'],
  )
  </code></pre>
  
  <p>When I only include <code>_mssql</code> it gives this error:</p>
  
  <pre><code>error: cannot copy tree '/path_to_venv/lib/python3.4/site-packages/_mssql.so': not a directory
  </code></pre>
  
  <p>When I try with <code>pymssql</code> (or both) it gives this error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "setup.py", line 20, in &lt;module&gt;
      setup_requires=['py2app'],
    File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/path_to_venv/lib/python3.4/site-packages/py2app/build_app.py", line 659, in run
      self._run()
    File "/path_to_venv/lib/python3.4/site-packages/py2app/build_app.py", line 865, in _run
      self.run_normal()
    File "/path_to_venv/lib/python3.4/site-packages/py2app/build_app.py", line 939, in run_normal
      mf = self.get_modulefinder()
    File "/path_to_venv/lib/python3.4/site-packages/py2app/build_app.py", line 814, in get_modulefinder
      debug=debug,
    File "/path_to_venv/lib/python3.4/site-packages/modulegraph/find_modules.py", line 341, in find_modules
      find_needed_modules(mf, scripts, includes, packages)
    File "/path_to_venv/lib/python3.4/site-packages/modulegraph/find_modules.py", line 266, in find_needed_modules
      path = m.packagepath[0]
  TypeError: 'NoneType' object is not subscriptable
  </code></pre>
  
  <p>Another note:</p>
  
  <p>I can package the app fine without including either <code>pymssql</code> or <code>_mssql</code> in the setup file and when I try and run the app, here's the error I get in the OS Console:</p>
  
  <pre><code>1/12/16 10:00:48.618 AM AppName[72301]: Traceback (most recent call last):
  1/12/16 10:00:48.618 AM AppName[72301]:   File "/path_to_app/dist/AppName.app/Contents/Resources/__boot__.py", line 351, in &lt;module&gt;
  1/12/16 10:00:48.618 AM AppName[72301]:     _run()
  1/12/16 10:00:48.619 AM AppName[72301]:   File "/path_to_app/dist/AppName.app/Contents/Resources/__boot__.py", line 336, in _run
  1/12/16 10:00:48.619 AM AppName[72301]:     exec(compile(source, path, 'exec'), globals(), globals())
  1/12/16 10:00:48.619 AM AppName[72301]:   File "/path_to_app/dist/AppName.app/Contents/Resources/AppName.py", line 9, in &lt;module&gt;
  1/12/16 10:00:48.619 AM AppName[72301]:     import pymssql
  1/12/16 10:00:48.619 AM AppName[72301]:   File "_mssql.pxd", line 10, in init pymssql (pymssql.c:10984)
  1/12/16 10:00:48.619 AM AppName[72301]: ImportError: No module named '_mssql'
  </code></pre>