簡體   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