How can I tell buildout to ignore the binary distribution and build from the source code?

I include an egg ( jsonlib ) in the buildout that uses the C extensions. There is a precompiled blob on pypi. But it is incompatible with my environment: I get an undefined symbol: PyUnicodeUCS4_FromEncodedObject error undefined symbol: PyUnicodeUCS4_FromEncodedObject . I know this is due to different environments at compile time and runtime. To solve this problem, buildout should compile the package instead of using the pre-built one.

How to tell buildout to compile a package (all packages will be good too) no matter what precompiled egg files it finds on pypi?

+1
buildout
source share
1 answer

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 for this, only for some OS using conditional sections (disclaimer, I wrote this) with the latest buildout version:

 [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 doing this, check the distribution, it will have a copy of the extracted archive for verification: there are no pre-built eggs;)

+1
source share

All Articles