title: Configure setup.py to install requirement from repository URL
body: <p>I am creating a module and need to prepare my <code>setup.py</code> file to have some requirements. One of the requirements is a fork of one package that is already in PyPI so I want to reference my GitHub repository directly.</p>
  
  <p>I tried two configurations, the first one is:</p>
  
  <pre class="lang-py prettyprint-override"><code>setup(
      'name': 'mymodule',
      # other arguments
      install_requires=[
          'myrequirement',  # The dependency name
      ],
      dependency_links=[
          'https://github.com/ihhcarus/myrequirement.git#egg=myrequirement',  # This is my repository location
      ]
  )
  </code></pre>
  
  <p>I create a local distribution of my module using <code>python setup.py sdist</code> and when I run <code>pip install path/to/module/dist/mymodule-0.1.tar.gz</code> it ends up installing the version on PyPI and not my repository.</p>
  
  <p>The other configuration, I tried to change the requirement name to force searching for a dependency link like so:</p>
  
  <pre class="lang-py prettyprint-override"><code>setup(
      'name': 'mymodule',
      # other arguments
      install_requires=[
          'myrequirement_alt',  # The dependency name with a suffix
      ],
      dependency_links=[
          'https://github.com/ihhcarus/myrequirement.git#egg=myrequirement_alt',  # This is my repository location
      ]
  )
  </code></pre>
  
  <p>But with this, I only end up getting an error that <code>myrequirement_alt</code> is not found...</p>
  
  <p>So I ask, what is the right way to achieve this without using PyPI?</p>