title: How to install my custom Python package with its custom dependencies?
body: <p>I would like to find a way to install my own python package which depends on other custom python packages.</p>
  <p>I followed this guide to create my own python packages: <a href="https://python-packaging.readthedocs.iao/en/latest/" rel="nofollow noreferrer">https://python-packaging.readthedocs.iao/en/latest/</a></p>
  <p>For all packages, the minimal structure is:</p>
  <pre><code>myOwnPackage/
      myOwnPackage/
          __init__.py
      setup.py
  </code></pre>
  <p>Now, I created a package which depends on other custom packages. Its structure is:</p>
  <pre><code>myOwnPackage/
      dependencies/
          packageA
          packageB
      myOwnPackage/
          __init__.py
      setup.py
  </code></pre>
  <p>My question is: How to easily install <code>myOwnPackage</code> and its custom dependencies with pip ?</p>
  <p>For the above example, I would like to install myOwnPackage, packageA and packageB when I call pip like that: <code>pip install myOwnPackage</code></p>
  <p>I did not find a way to include dependency names in setup.py like I can do for official python packages like <code>numpy</code>, pyqt5 etc.</p>
  <p>I find a way to solve my problem partially by using a requirements.txt with pip:</p>
  <p><code>pip install -r requirements.txt myOwnPackage</code></p>
  <p>and here is how I wrote the requirement file:</p>
  <pre><code>./dependencies/packageA
  ./dependencies/packageB
  </code></pre>
  <p>I works well, but not when I have recursive dependencies like that:</p>
  <pre><code>myOwnPackage/
      dependencies/
          packageA/
              dependencies/
                  packageC
              packageA/
                  __init__.py
              setup.py
              requirements.txt
          packageB
      myOwnPackage/
          __init__.py
      setup.py
      requirements.txt
  </code></pre>
  <p>pip with the top-level requirements.txt will install myOwnPackage, packageA and packageB but it does not know that it has to install packageC which is a packageA dependency.</p>
  <p>Any idea?</p>