繁体   English   中英

在setup.py中安装另一个源发行版?

[英]Installing another source distribution in setup.py?

我有一个不依赖PyPi的依赖PyPi ,但是我在源代码分发tar文件中有它。 无论如何,有没有让setup.py使用tar安装依赖项?

这不起作用,因为在项目进入sdist之后, dependency.tar.gz不可用:

from setuptools.command.install import install

class MyInstall(install):
    def run(self):
        os.system('pip install -U dependency.tar.gz')


setup(
      ...
      cmdclass={'install': MyInstall}
 )

Setuptools文档实际上涵盖了未在PyPI中注册的依赖项的安装。

http://pythonhosted.org/setuptools/setuptools.html#dependencies-that-aren-t-in-pypi

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM