Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: Dev

lxml is hard to install (was Re: How to test changes to ZTK packages?)

 

 

Zope dev RSS feed   Index | Next | Previous | View Threaded


jim at zope

Jun 30, 2009, 1:35 PM

Post #1 of 3 (418 views)
Permalink
lxml is hard to install (was Re: How to test changes to ZTK packages?)

On Jun 30, 2009, at 2:35 PM, Tres Seaver wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Tim Hoffman wrote:
>> I have to chime in here too
>>
>> lxml is a real pain and seems to be problematic to get a
>> straightforward
>> build for packages other than ZTK as well. I have had varying
>> success
>> building lxml even under ubuntu - success seems to be dependant on
>> the type
>> of build defined.
>
> While I know that Mac people often report problems building lxml, I
> never have issues building lxml on Linux: the '--static-deps'
> option is
> a sufficient workaround for variants with too-old versions of
> libxml2 /
> libxslt.


I'm not familiar with the static-deps option. To what? Its setup.py?

It didn't install cleanly for me on Centos 4. (I've generally had
difficulty with libxml2 and libxslt on Red Hat based systems,) I'm
sure if I screwed around with it, I could get it to work. I don't
want to screw around with it just to work on ZTK libraries, which
don't actually depend on it. I will if I have to. I ended up using
an Ubuntu VM to work on it. I'd prefer not to have to.

I'm sad to say this. I think lxml is a worthy project. It's a shame
that the system installs of libxml2 and libxslt are such a PITA. I
wonder if it would be better for lxml to include it's own copies of
these libraries that it built and linked against statically.

Will lxml look somewhere in /usr/local? I wonder if hand-built libxml2
and libxslt libraries in /usr/local would make lxml easier to deal with.

Jim

--
Jim Fulton
Zope Corporation


_______________________________________________
Zope-Dev maillist - Zope-Dev[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


tseaver at palladion

Jun 30, 2009, 1:51 PM

Post #2 of 3 (384 views)
Permalink
Re: lxml is hard to install (was Re: How to test changes to ZTK packages?) [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jim Fulton wrote:

> I'm not familiar with the static-deps option. To what? Its setup.py?

$ wget http://pypi.python.org/packages/source/l/lxml/lxml-2.2.2.tar.gz
...
$ tar xzf lxml-2.2.2.tar.gz
$ cd lxml-2.2.2
$ /path/to/python setup.py bdist_egg --static-deps

> It didn't install cleanly for me on Centos 4. (I've generally had
> difficulty with libxml2 and libxslt on Red Hat based systems,) I'm
> sure if I screwed around with it, I could get it to work. I don't
> want to screw around with it just to work on ZTK libraries, which
> don't actually depend on it. I will if I have to. I ended up using
> an Ubuntu VM to work on it. I'd prefer not to have to.
>
> I'm sad to say this. I think lxml is a worthy project. It's a shame
> that the system installs of libxml2 and libxslt are such a PITA. I
> wonder if it would be better for lxml to include it's own copies of
> these libraries that it built and linked against statically.

That is what --static-deps' does: it downloads and builds libxml2 /
libxslt from source, and links them statically into the .so / .dll /
.pyd file for lxml.

> Will lxml look somewhere in /usr/local? I wonder if hand-built libxml2
> and libxslt libraries in /usr/local would make lxml easier to deal with.

I would just use --static-deps (works well for me on CentOS4, for instance).



Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 tseaver[at]palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFKSnrU+gerLs4ltQ4RAi1PAJ9PquHRAFIzvFYpnRayUE9CLDFJvwCeMHKH
wr03NK/PQIEX6EmbuvGTPaE=
=LB9x
-----END PGP SIGNATURE-----

_______________________________________________
Zope-Dev maillist - Zope-Dev[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


jim at zope

Jun 30, 2009, 2:49 PM

Post #3 of 3 (385 views)
Permalink
Re: lxml is hard to install (was Re: How to test changes to ZTK packages?) [In reply to]

On Jun 30, 2009, at 4:51 PM, Tres Seaver wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Jim Fulton wrote:
>
>> I'm not familiar with the static-deps option. To what? Its setup.py?
>
> $ wget http://pypi.python.org/packages/source/l/lxml/lxml-2.2.2.tar.gz
> ...
> $ tar xzf lxml-2.2.2.tar.gz
> $ cd lxml-2.2.2
> $ /path/to/python setup.py bdist_egg --static-deps
>
>> It didn't install cleanly for me on Centos 4. (I've generally had
>> difficulty with libxml2 and libxslt on Red Hat based systems,) I'm
>> sure if I screwed around with it, I could get it to work. I don't
>> want to screw around with it just to work on ZTK libraries, which
>> don't actually depend on it. I will if I have to. I ended up using
>> an Ubuntu VM to work on it. I'd prefer not to have to.
>>
>> I'm sad to say this. I think lxml is a worthy project. It's a shame
>> that the system installs of libxml2 and libxslt are such a PITA. I
>> wonder if it would be better for lxml to include it's own copies of
>> these libraries that it built and linked against statically.
>
> That is what --static-deps' does: it downloads and builds libxml2 /
> libxslt from source, and links them statically into the .so / .dll /
> .pyd file for lxml.

Ah cool. I could then stuff that in my egg cache.

This seems to work for me on Mac OS X. I'm not sure how to run the
tests. Unfortunately, the tests aren't included in the egg. Running
tests.py in the distro root doesn't work either.

>> Will lxml look somewhere in /usr/local? I wonder if hand-built
>> libxml2
>> and libxslt libraries in /usr/local would make lxml easier to deal
>> with.
>
> I would just use --static-deps (works well for me on CentOS4, for
> instance).


This is a good work around. Thanks!

It would be nice to automate this a bit more.

Jim

--
Jim Fulton
Zope Corporation


_______________________________________________
Zope-Dev maillist - Zope-Dev[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Zope dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.