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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章