title: Create editable package setup.py in the same root folder as __init__.py
body: <p>An existing project is setup in a way that the repository has an <code>__init__.py</code> in at the root folder. I would like to create a <code>setup.py</code> in the repository so this would be the resulting project structure:</p>
  
  <pre><code>project-master/
  ├── __init__.py
  ├── setup.py
  └── submodule1
      ├── code.py
      └── __init__.py
  └── submodule2
      ├── code.py
      └── __init__.py
  </code></pre>
  
  <p>and you should be able to:</p>
  
  <pre><code>git clone project.url
  cd project-master
  pip install -e .
  from project.submodule1 import ...
  </code></pre>
  
  <p>I tried the hacky solution of temporarily copying the contents in a subfolder so that <code>setup.py</code> is one level up from the package folder and installing from there. This works well if I <code>pip install .</code> but unfortunately this solution doesn't work in editable mode because I delete the temporary folder after installing.</p>
  
  <p><strong>Question</strong>: What is the right way to create a proper <code>setup.py</code> that works in editable mode and lives in the same root folder as the package's <code>__init__.py</code>?</p>