How to write setup.py to include a git repo as a dependency

I am trying to write setup.py for my package. My package needs to specify a dependency on another git repo.

This is what I have so far:

    from setuptools import setup, find_packages

    setup(
        name='abc',
        packages=find_packages(),
        url='https://github.abc.com/abc/myabc',
        description='This is a description for abc',
        long_description=open('README.md').read(),
        install_requires=[
            "requests==2.7.0",
            "SomePrivateLib>=0.1.0",
            ],
        dependency_links = [
         "git+git://github.abc.com/abc/SomePrivateLib.git#egg=SomePrivateLib",
        ],
        include_package_data=True,
    )

When I run:

    pip install -e https://github.abc.com/abc/myabc.git#egg=analyse

I get

Could not find a version that satisfies the requirement SomePrivateLib>=0.1.0 (from analyse) (from versions: ) No matching distribution found for SomePrivateLib>=0.1.0 (from analyse)

What am I doing wrong ?

You can find the right way to do it here.

    dependency_links=['http://github.com/user/repo/tarball/master#egg=package-1.0']

The key is not to give a link to a git repository, but a link to a tarball. Github creates a tarball of the master branch for you if you append /tarball/master as shown above.

From: stackoverflow.com/q/32688688