为私有仓库提供的简单setup.py辅助工具
项目描述
此python包提供了围绕Distribute的简单包装,以处理私有项目。它主要用于包的setup.py脚本中。
它提供以下功能
在执行python setup.py install时使用私有包索引来获取包依赖项
限制register和upload命令到私有包索引,或完全禁用它们
在访问索引时,易于支持认证URL。
兼容性
restricted_pkg包需要Distribute,并支持Python 2.6及更高版本(包括Python3)。
用法
在您的setup.py脚本中,确保您有以下行
from setuptools import find_packages from restricted_pkg import setup setup( ..., private_repository="https://@myrepo.example.tld/path/to/repo", install_requires=[ "distribute", "restricted_pkg", ], )