2013-12-13 31 views
7

例如,下面是建立與bin/buildout -Nvv你怎麼知道哪個python egg在構建中強制執行約束?

... 
Getting required 'grokcore.component>=2.5' 
    required by five.grok 1.3.2. 
    required by grokcore.viewlet 1.11. 
Picked: grokcore.component = 2.5 
Getting required 'grokcore.annotation' 
    required by five.grok 1.3.2. 
Picked: grokcore.annotation = 1.3 
The constraint, 0.4, is not consistent with the requirement, 'five.localsitemanager>2.0dev'. 
While: 
    Installing instance. 
Error: Bad constraint 0.4 five.localsitemanager>2.0dev 

約束five.localsitemanager>2.0dev似乎並沒有被grokcore.annotation強制執行(見https://github.com/zopefoundation/grokcore.annotation/blob/master/setup.py),但我怎麼找出雞蛋實際執行呢?

+0

它是否仍然相關?如果沒有,也許是時候結束這個問題了...... –

+0

問題仍然會不時發生,所以問題可以保持開放。包改變了,但問題依然存在。 –

+0

檢查我的答案http://stackoverflow.com/questions/29827258/find-requirement-specs-in-a-plone-buildout-setup(eggdeps) – sunew

回答

6

我知道這是一個非常古老的問題,但昨天我遇到了同樣的問題,並找到了解決問題的方法my colleague。所以我想我不妨在這裏發佈。

您的所有生成雞蛋都位於項目的eggs文件夾或您的個人文件夾中的.buildout文件夾中,包括開發雞蛋。在每個蛋中,你會發現一個符合雞蛋要求的requires.txt文件。這意味着您可以在.buildout/eggs文件夾中執行find/grep查找特定約束,以確定哪個軟件包正在執行該文件夾。

所以你的情況我建議你去雞蛋目錄(在我的情況~/.buildout/eggs),然後執行:

find .|grep requires.txt|xargs grep 2.0dev 

這應該發現運作實施該約束的蛋。

在我的情況下,我升級到Django 1.7,並有一個約束'Django >= 1.4, < 1.7'包。所以執行find .|grep requires.txt|xargs grep 1.7發現有問題的雞蛋。

+0

另外:'〜/ .buildout/eggs /'文件夾僅在啓用它時才使用。否則,您必須查看項目目錄內的'eggs /'文件夾。 –

+0

第二點評論:'<1.7'可能會有問題,因爲它也可以被寫爲<1.7'(沒有空格)等等。在各種'EGG-INFO/requires.txt'文件中搜索包名是更快的。就像'找到。 | grep requires.txt | xargs grep -i-package-name' –

+1

感謝您的加入@ reinout-van-rees!我只是看着我的'.bash_history',這確實是你在我的'.buildout/eggs'文件夾中使用的命令。我想昨天我沒有足夠注意。我會更新我的答案。 – Heyl1

相關問題