开发者

How can I speed-up the build/install of lxml?

We use Hudson-CI for out Continuous Integration server for Python projects, all of which use Buildout to manage dependencies. Almost all our projects use lxml which, because of Buildout, must be built/installed during each test-run and because it takes so long it reduces the number of builds we can run per day.

Is there any way to speed-up the build of lxml when using Buildout? Maybe some environment variables can be set to help the build use both cores on the server? Or something to reduce the amount of optimization done?开发者_Go百科


My solution is to create an egg myself and keep that egg version-controlled with my buildout. I recreate the egg each time I need to upgrade lxml. You can almost always create a binary egg of any Python project by throwing an import setuptools into the top of its setup.py and then saying python setup.py bdist_egg. And as long as the machines you install the egg on are roughly similar binary-wise (such as all being the same Linux distro), you should not have a terrible lot of trouble. Read up on building lxml with "static deps", as the call them, if you want your egg to not depend on libxml being installed on the box.


You can create a buildout defaults file and define an eggs-directory to share eggs between multiple builds.

This post sums it up nicely: http://plone.org/documentation/manual/developer-manual/managing-projects-with-buildout/creating-a-buildout-defaults-file

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜