[lxml-dev] lxml Mac installation idea

Paul Everitt paul at agendaless.com
Tue Nov 4 15:13:22 CET 2008


On Nov 3, 2008, at 2:35 PM, Ian Bicking wrote:

> Paul Everitt wrote:
>>> Ian Bicking wrote:
>>>> Stefan Behnel wrote:
>>>> but I'd like it to work without buildout, and there's also several
>>>> buildout recipes and configurations out there and not one clear
>>>> canonical way to build lxml.
>>>
>>> I wouldn't mind to ship lxml with a buildout recipe. I think the  
>>> current
>>> problem is that if we wait to find one that works well for as many  
>>> people as
>>> possible, we'll wait forever. So I'm fine with adding any script  
>>> that's
>>> somewhat tested and in use. Even a set of scripts that you can try  
>>> is better
>>> than none if people can't manage to build lxml themselves.
>> FWIW, we have a very lean buildout that only focuses on the problem  
>> of building lxml.  I could contribute it if you'd like.
>
> How does this compare to plone.recipe.lxml (http://pypi.python.org/pypi/plone.recipe.lxml)? 
>   I notice that package just had a release.  Is this the config  
> you've been using? https://svn.plone.org/svn/plone/PloneOrg/sandbox/xdv/new.plone.org/osx.cfg 
>  (if so, in your run-deliverance script, it'd be best to use exec to  
> avoid the intermediate shell process and make it easier to kill the  
> script)

Here's the buildout.cfg that we've used:

[libxml2]
recipe = zc.recipe.cmmi
url = http://somecustomer.agendaless.com/indexes/karl/cmmi/libxml2-2.6.32.tar.gz
extra_options = --without-python

[libxslt]
recipe = zc.recipe.cmmi
url = http://somecustomer.agendaless.com/indexes/karl/cmmi/libxslt-1.1.24.tar.gz
extra_options = --with-libxml-prefix=${libxml2:location}
                  --without-python

[lxml-environment]
XSLT_CONFIG=${buildout:directory}/parts/libxslt/bin/xslt-config
XML2_CONFIG=${buildout:directory}/parts/libxml2/bin/xml2-config

[lxml]
recipe = zc.recipe.egg:custom
egg = lxml
include-dirs = ${libxml2:location}/include/libxml2
                ${libxslt:location}/include
library-dirs = ${libxml2:location}/lib
                ${libxslt:location}/lib
rpath = ${libxml2:location}/lib
         ${libxslt:location}/lib
environment = lxml-environment

> One problem with buildout recipes is that they aren't, AFAIK, very  
> compatible with other systems.  That is, they can build the egg, but  
> the egg isn't on the path of any interpreter, so unless you use  
> buildout entirely you'll have to do some further manipulation to  
> make lxml available.

Right.  On one hand, I'm reluctant to put all lxml's eggs in the  
buildout basket [wink] for that reason.  lxml is much bigger than the  
world of Zope.  Being confronted with something you didn't know  
(buildout) just to get to the thing you wanted (lxml) is a pain.

OTOH, I wonder if the solution is to simply provide a number of  
options.  We're really only talking about Mac users, so it isn't as  
big of a decision.  And for them, perhaps the answer is to ensure  
there are a number of choices (MacPorts and fink kept up-to-date,  
easier to build by hand with Stefan's XML2_CONFIG support, etc.)

> I think I've also seen some reports that even using the macports  
> lxml build, DYLD_LIBRARY_PATH can matter.  I don't remember where I  
> saw that now... maybe actually as part of another recipe?

I think I saw something in another recipe, perhaps Martin's  
Deliverance one.  My guess is that some of these are false blips from  
the time before XML2_CONFIG.

--Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/lxml-dev/attachments/20081104/e8faa4b8/attachment-0001.htm 


More information about the lxml-dev mailing list