title: Using python 3.6 + py2app: why are pyc files generated?
body: <p>I've written a GUI that I want to turn into a standalone OS X app with py2app. Py2app has succesfully generated a standalone OS X bundle with the following commands:</p>
  
  <pre><code>$ py2applet --make-setup superGui.py
  $ python3 setup.py py2app
  </code></pre>
  
  <p>My setup.py looks like this:</p>
  
  <pre><code>from setuptools import setup
  
  APP = ['/Users/username/PycharmProjects/gui/superGui.py']
  DATA_FILES = []
  OPTIONS = {'argv_emulation': True,
      'plist': {'LSUIElement': True,},
      'includes':['rumps'],}
  
  setup(
      app=APP,
      data_files=DATA_FILES,
      options={'py2app': OPTIONS},
      setup_requires=['py2app'],
  )
  </code></pre>
  
  <p>I've added the rumps package and LSUIElement based on <a href="http://rumps.readthedocs.io/en/latest/creating.html" rel="nofollow noreferrer">this documentation</a>. I have the same error with or without them though.</p>
  
  <p>However when I try to run the app with:</p>
  
  <pre><code>$ open dist/superGui.app
  </code></pre>
  
  <p>I get the following error message in my log:</p>
  
  <pre><code>06/01/17 12:42:51,321 superGui[55597]:   File "&lt;frozen importlib._bootstrap&gt;", line 961, in _find_and_load
  06/01/17 12:42:51,322 superGui[55597]:   File "&lt;frozen importlib._bootstrap&gt;", line 950, in _find_and_load_unlocked
  06/01/17 12:42:51,322 superGui[55597]:   File "&lt;frozen importlib._bootstrap&gt;", line 646, in _load_unlocked
  06/01/17 12:42:51,322 superGui[55597]:   File "&lt;frozen importlib._bootstrap&gt;", line 616, in _load_backward_compatible
  06/01/17 12:42:51,322 superGui[55597]:   File "scrapy/__init__.pyc", line 10, in &lt;module&gt;
  06/01/17 12:42:51,322 superGui[55597]:   File "pkgutil.pyc", line 616, in get_data
  06/01/17 12:42:51,322 superGui[55597]:   File "importlib/util.pyc", line 83, in find_spec
  06/01/17 12:42:51,322 superGui[55597]: AttributeError: 'NoneType' object has no attribute 'startswith'
  </code></pre>
  
  <p>I have the following questions:</p>
  
  <ol>
  <li><p>How do I fix this issue?</p></li>
  <li><p>The error seems occur when looking in find_spec in "importlib/util.pyc". I don't understand why py2app works with pyc files since I'm using Python 3.6. Python 3.6 doesn't use pyc files any longer right? Does this happen because py2app for some reason uses 2.7 paths? (I also have Python 2.7 installed) </p></li>
  <li><p>I can't open "importlib/util.pyc" with IDLE 3.6 (again since from what I understand Python 3.6 doesn't support pyc files anymore), but when I open it with IDLE 2.7 I just get a window with a white screen. How can I open this file successfully to understand the error better?</p></li>
  </ol>
  
  <p>Thanks in advance!</p>