How do I tell buildout to ignore a binary distribution and build from source instead?

旧城冷巷雨未停 提交于 2019-12-01 13:38:25

There you go:

[buildout]
parts = getit

# used to show which download was fetched
download-cache = .

[getit]
recipe = zc.recipe.egg
# this is the first key: ignore using the pypi index
index = .
# this is the second key: provide a direct link to the sdist
find-links = https://pypi.python.org/packages/source/h/hachoir-core/hachoir-core-1.3.3.tar.gz
eggs = hachoir-core==1.3.3

And to do this only for some OS using conditional sections (disclaimer, I wrote this) with the latest version of buildout:

[buildout]
parts = getit
download-cache = .

[getit: macosx]
recipe = zc.recipe.egg
index = .
find-links = https://pypi.python.org/packages/source/h/hachoir-core/hachoir-core-1.3.3.tar.gz
eggs = hachoir-core==1.3.3

[getit: not macosx]
recipe = zc.recipe.egg
# use pypi alright
eggs = hachoir-core==1.3.3

after running this, check the dist dir, it will have a copy of the fetched archive for verification: no prebuilt eggs in there ;)

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!