title: python importing src/package.module in setup.py
body: <p>I have following directory structure of a python package i want to build (python3.4)</p>
  
  <pre><code>```
  /project/src/mypackage/__init__.py
  /project/src/mypackage/module.py
  /project/src/mypackage/setup_utils.py
  /project/setup.py
  ```
  </code></pre>
  
  <p>I have some useful code within <code>setup_utils.py</code> that i want to import at the top of <code>setup.py</code>. If I don't add <code>sys.path.append('src')</code>, I get <code>ImportError</code></p>
  
  <pre><code>```
  
  $ cat setup.py
  
  from setuptools import setup
  from mypackage import setup_utils
  cmdclass = setup_utils.cmdcass
  ...
  
  $ python setup.py install
  ...
  ImportError: No module named 'mypackage'
  ...
  ```
  </code></pre>
  
  <p>Now, If I do add <code>sys.path.append('src')</code>, I don't get coverage <code>Coverage.py warning: Module mypackage was previously imported, but not measured.</code></p>
  
  <pre><code>```
  $ cat setup.py
  
  import sys
  sys.path.append('src')
  from setuptools import setup
  from mypackage import setup_utils
  cmdclass = setup_utils.cmdcass
  ...
  
  $ python setup.py install
  $ coverage ...
  Coverage.py warning: Module mypackage was previously imported, but not measured.
  
  ```
  </code></pre>
  
  <p>So, what is the right approach to fix this?</p>