Python setuptools: How can I list a private repository under install_requires?

前端 未结 8 1473
南旧
南旧 2020-12-04 15:07

I am creating a setup.py file for a project which depends on private GitHub repositories. The relevant parts of the file look like this:

from s         


        
8条回答
  •  余生分开走
    2020-12-04 15:43

    I found a (hacky) workaround:

    #!/usr/bin/env python
    
    from setuptools import setup
    import os
    
    os.system('pip install git+https://github-private.corp.com/user/repo.git@master')
    
    setup( name='original-name'
         , ...
         , install_requires=['repo'] )
    

    I understand that there are ethical issues with having a system call in a setup script, but I can't think of another way to do this.

提交回复
热议问题