在 setup.py 中安装另一个源分发版?
Installing another source distribution in setup.py?
我有一个不在 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
我有一个不在 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