title: Python cli module import not found
body: <p>I am trying to run a packaged cli, which does dynamic imports. When I run the code through the main cli script it works as expected. However after I package the code up using <code>setup.py sdist</code>and then install the dist tar with pip. The cli itself gives an import error <code>ImportError: No module named</code>. All of the modules are in the same folder as the <code>cli.py</code> file.</p>
  
  <p>This is how I have created my main called <code>cli.py</code></p>
  
  <pre><code>def main():
      args = docopt(__doc__, version="1.0")
      argv = [args['&lt;command&gt;']] + args['&lt;args&gt;']
      module = importlib.import_module(args['&lt;command&gt;'])
      print(docopt(module.__doc__, argv=argv))
  
  if __name__ == '__main__':
      main()
  </code></pre>
  
  <p>And my setup.py looks like this</p>
  
  <pre><code>from setuptools import setup
  setup(
      name='testing-cli',
      version='0.0.1',
      packages=['testing']
      entry_points = {
          'console_scripts': ['testing-cli = testing.cli:main'],
      }
  )
  </code></pre>
  
  <p>Any ideas as to why when packaged I get an import error when it is packaged but when running like <code>./cli.py &lt;arg&gt;</code> it imports fine?</p>