title: How to install a dependency from a submodule in Python?
body: <p>I have a Python project with the following structure (irrelevant source files omitted for simplicity):</p>
  
  <pre><code>myproject/
      mysubmodule/
          setup.py
      setup.py
  </code></pre>
  
  <p>The file <code>myproject/setup.py</code> uses <code>distutils.core.setup</code> to install the module <code>myproject</code> and the relevant sources. However, <code>myproject</code> requires <code>mysubmodule</code> to be installed (this is a git submodule). So what I am doing right now is:</p>
  
  <pre><code>myproject/$ cd mysubmodule
  myproject/mysubmodule/$ python setup.py install
  myproject/mysubmodule/$ cd ..
  myproject/$ python setup.py install
  </code></pre>
  
  <p>This is too tedious for customers, especially if the project will be extended by further submodules in the future. </p>
  
  <p>Is there a way to automate the installation of <code>mysubmodule</code> when calling <code>myproject/setup.py</code>?</p>