Reference requirements.txt for the install_requires kwarg in setuptools setup.py file

问题:

I have a requirements.txt file that I'm using with Travis-CI.我有一个与 Travis-CI 一起使用的requirements.txt文件。 It seems silly to duplicate the requirements in both requirements.txt and setup.py , so I was hoping to pass a file handle to the install_requires kwarg in setuptools.setup .requirements.txtsetup.py复制需求似乎很愚蠢,所以我希望将文件句柄传递给 setuptools.setup 中的install_requires setuptools.setup

Is this possible?这可能吗? If so, how should I go about doing it?如果是这样,我应该如何去做?

Here is my requirements.txt file:这是我的requirements.txt文件:

guessit>=0.5.2
tvdb_api>=1.8.2
hachoir-metadata>=1.3.3
hachoir-core>=1.3.3
hachoir-parser>=1.3.4

解决方案:

参考一: https://en.stackoom.com/question/yPyY
参考二: https://stackoom.com/question/yPyY
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章