[lxml-dev] lxml Mac installation idea
Ian Bicking
ianb at colorstudy.com
Tue Oct 28 19:44:19 CET 2008
So... I hear that lxml installs better on a Mac if it's built along with
libxml2/libxslt. That's not what everyone would do, so I was unclear
how to enable something like that, and if setup.py would be the right
place. A number of attempts to get stuff setup have been tried before
external to lxml (like buildouts and now staticlxml).
While it's kind of lame, I wonder if enabling this static installation
via an environmental variable would be reasonable? It would be easier
to apply in a number of circumstances. I imagine it would mean
something like, on installation, if a variable like LXML_INSTALL_STATIC
(or INSTALL_LIBXML2 or something) was set, it'd download the libxml2 and
libxslt libraries, run configure/make/make install with a prefix inside
the lxml source directory itself, then build lxml using that library.
Another option would be simply a different tarball that contains the
libxml2/libxslt source, and its setup.py would always build those. It
could be versioned like 2.1static or something, which should keep it
from being implicitly used by easy_install, etc. (since 2.1static is
considered an earlier version than 2.1). This might be more reasonable?
staticlxml is kind of weird, because installing staticlxml installs
lxml, which can confuse tools. Maybe the two versions could be arranged
with some svn:externals, or just as a build script of some sort (e.g.,
drop a marker file in the source to make it "static", and have setup.py
look for that file and change the sdist/install commands appropriately).
One nuisance with any attempt to fix this is that I don't think either
myself nor Stefan have ready access to a Mac to test this stuff... are
there any Macs we can ssh into for testing? (Obviously patches are also
welcome, but this Mac thing has caused so many support problems for me
that I really want to get it resolved.)
--
Ian Bicking : ianb at colorstudy.com : http://blog.ianbicking.org
More information about the lxml-dev
mailing list