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

前端 未结 6 1960
感情败类
感情败类 2020-12-02 10:16

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:



        
6条回答
  •  情话喂你
    2020-12-02 10:39

    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.

提交回复
热议问题