(...), thus being rather maintenance-robust.
Maintenance is not my main concern. The problem is that we provide an
incomplete interface here, so it's "kinda compatible, but not quite", which I
consider worse than "no string methods there". I fear that the choice of
methods may look too arbitrary to understand.
But as I said, feel free to convince me.
Stefan
From tseaver at palladion.com Wed Sep 27 20:25:59 2006
From: tseaver at palladion.com (Tres Seaver)
Date: Wed, 27 Sep 2006 14:25:59 -0400
Subject: [lxml-dev] Building Problems
In-Reply-To: <451A9FF6.3010108@gkec.informatik.tu-darmstadt.de>
References: <87fyed4lpq.fsf@hirschmanngmbh.com>
<451A9FF6.3010108@gkec.informatik.tu-darmstadt.de>
Message-ID: <451AC237.9090204@palladion.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Stefan Behnel wrote:
> Hi Achim,
>
> Achim Kern wrote:
>> during googeling on how to write easier xml datastores with python I
>> just found our project. Especialy the objectify modules impressed
>> me. So to test things I wanted to install it. Unfortunatly I can not
>> use the provided debian package as there is only one for version 1.03
>> not including the objectify extension. So I downloaded the source of
>> 1.1.1 from codespeak.net extracted it and that's what it did.
>>
>> # tar -xzf lxml-1.1.1.tgz
>> # ce lxml-1.1.1
>> # make clean test.
>> python setup.py build_ext -i
>> Building lxml version 1.1
>
> 1.1? Not 1.1.1?
>
>
>> running build_ext
>> python test.py -p -v
>
> You did build it, right? I assume this is a second try after already having
> built it once.
>
> Did you do "make clean" in between? That removes the ".c" files, which means
> you need a special Pyrex version to rebuild it.
That sounds as thought it should be the result of 'make distclean';
make clean should remove .o files, etc., but leave the tree in a state
in which 'make' can be re-run safely.
Tres.
- --
===================================================================
Tres Seaver +1 202-558-7113 tseaver at palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD4DBQFFGsI3+gerLs4ltQ4RAhcYAJY28BThKHuNMa7cp0hIezmNIcgFAJwLxi+1
3Lw3DNsAokeEkyT/EZRBmw==
=JlHg
-----END PGP SIGNATURE-----
From behnel_ml at gkec.informatik.tu-darmstadt.de Thu Sep 28 08:51:37 2006
From: behnel_ml at gkec.informatik.tu-darmstadt.de (Stefan Behnel)
Date: Thu, 28 Sep 2006 08:51:37 +0200
Subject: [lxml-dev] Building Problems
In-Reply-To: <451AC237.9090204@palladion.com>
References: <87fyed4lpq.fsf@hirschmanngmbh.com> <451A9FF6.3010108@gkec.informatik.tu-darmstadt.de>
<451AC237.9090204@palladion.com>
Message-ID: <451B70F9.3070703@gkec.informatik.tu-darmstadt.de>
Hi Tres,
Tres Seaver wrote:
> Stefan Behnel wrote:
>> Did you do "make clean" in between? That removes the ".c" files, which means
>> you need a special Pyrex version to rebuild it.
>
> That sounds as though it should be the result of 'make distclean';
> make clean should remove .o files, etc., but leave the tree in a state
> in which 'make' can be re-run safely.
Well, it can be re-run safely, if you have Pyrex installed.
The thing is, as long as you don't modify anything in the sources, there is
not much of a reason to run "make clean", but if you do changes, you need
Pyrex anyway to regenerate the ".c" files. So there is much to win from
distinguishing "make clean" and "make distclean".
Stefan
From faassen at infrae.com Thu Sep 28 13:16:08 2006
From: faassen at infrae.com (Martijn Faassen)
Date: Thu, 28 Sep 2006 13:16:08 +0200
Subject: [lxml-dev] a buildout for lxml
Message-ID: <451BAEF8.1020101@infrae.com>
Hi there,
I've just created what's called a "buildout" for lxml. Buildout is a new
system for constructing Python applications and its constituent parts.
More information can be found here:
http://cheeseshop.python.org/pypi/zc.buildout/
Now before you read all that (it's fairly technical), let me explain
what problem the lxml buildout tries to solve.
Yesterday I tried using lxml's XMLSchema validator against an XML file
and a schema. It gave a validation error, but to the best of my
knowledge, the XML file should've been valid. Thinking it might perhaps
be a bug that was fixed in more recent versions of libxml2, I set out to
build and install libxml2 and libxslt locally, compiled lxml against it,
and confirmed it: the document does validate against the schema with the
most recent release of libxml2.
Now downloading, building and installing libxml2 and libxslt and linking
lxml against it is quite a bit of work. Buildout to the rescue! Now it's
just this:
$ svn co https://infrae.com/svn/buildout/lxml-recent/trunk lxml-recent
$ cd lxml-recent
$ python bootstrap/bootstrap.py
$ bin/buildout
and then wait. It'll download, configure and compile libxml2, libxslt,
will downoad the lxml source and compile it against the libraries.
In the end you end up with a script that invokes the Python interpreter
with the right paths, so you can import the new lxml:
$ bin/lxmlpython
Though you can also manipulate the PYTHONPATH yourself in your scripts
to put the lxml development egg on it, and then you can use the regular
Python you used to run bootstrap.py with.
To see how this works, you can take a look at buildout.cfg. This
specifies how things are put together.
Note that 'zc.recipe.cmmi' is a 'buildout recipe'. Recipes are
components responsible for deployment of particular bits of an application.
If zc.recipe.cmmi were released as an egg onto the cheeseshop, buildout
would go out and download and install the recipe from there. Since it's
not on the cheeseshop yet, I've installed it as a development-egg and
included it as an svn:external, but this can be fixed by wrapping that
into an egg.
Many buildout recipes exist: this one does 'configure; make; make
install', hence 'cmmi'. There are also recipes that build and install
Zope 3, recipes to build tricky Python modules that don't work as an egg
yet, and so on. New recipes can be developed. At Infrae's we've created
recipes that can deploy OpenOffice in server mode, so that it can be
used through UNO for document conversion purposes. This expanding pool
of recipes will allow us to put together extremely complicated
applications in a reproducable fashion. The idea of buildout is to have
control - to know exactly what is installed and not to have to install
everything into site-packages.
buildout uses setuptools and easy_install internally, so the whole egg
story just works; it expands on that.
I think this way of building lxml has more benefits than just my single
case. It'll allow one to deploy lxml against a known-good version of
libxml2 and libxslt, at least on a linux system. It should also help
testing and developing lxml - it becomes a lot more easy to test and
develop against different versions of libxml2.
I've placed this buildout in infrae.com SVN for now (checkout command
above), but if people think this is interesting, I can integrate this
into the lxml trunk. This can be done without harming the current way of
working, but it'll allow someone to test against any version of libxml2
and libxslt a lot more easily than one can do now.
Comments?
Regards,
Martijn
From behnel_ml at gkec.informatik.tu-darmstadt.de Thu Sep 28 19:51:20 2006
From: behnel_ml at gkec.informatik.tu-darmstadt.de (Stefan Behnel)
Date: Thu, 28 Sep 2006 19:51:20 +0200
Subject: [lxml-dev] Stylesheet Processing Instruction
In-Reply-To: <20060925200751.GJ4356@cotia>
References: <20060919003021.GQ3853@cotia> <20060919020239.GR3853@cotia>
<450F90CA.6060902@gkec.informatik.tu-darmstadt.de>
<450FC62B.2070905@infrae.com> <20060919132042.GU3853@cotia>
<450FF3B3.1060004@infrae.com>
<4510174C.3010209@gkec.informatik.tu-darmstadt.de>
<4511A415.9080705@gkec.informatik.tu-darmstadt.de>
<20060921134349.GR3853@cotia>
<451413E7.5010205@gkec.informatik.tu-darmstadt.de>
<20060925200751.GJ4356@cotia>
Message-ID: <451C0B98.4030308@gkec.informatik.tu-darmstadt.de>
Hi Sidnei,
Sidnei da Silva wrote:
> On Fri, Sep 22, 2006 at 06:48:39PM +0200, Stefan Behnel wrote:
> | I committed an implementation of the above to the SVN trunk, please check it
> | out to see if it fits your expectations.
>
> Looks like you only wrote tests for the embedded id inclusion. Would
> be nice to add a test for filename/url inclusion just to make
> sure.
Added now, which made me reconsider the return value. As it resembles the
parse() function/method, parseXSL() will now always return an ElementTree,
regardless of the source of the stylesheet.
Stefan
From cabraham at openplans.org Fri Sep 29 17:03:51 2006
From: cabraham at openplans.org (Chris Abraham)
Date: Fri, 29 Sep 2006 11:03:51 -0400
Subject: [lxml-dev] lxml replace() deletes tail
Message-ID: <451D35D7.4040306@openplans.org>
Hi,
We have a question about the etree.replace() function. We found that it
doesn't preserve the tail text from the replaced node when inserting a
new node. Perhaps this is the intended behavior, but, to us, it was
unexpected. In the example below, notice how the "tail" text is deleted
when the is replaced:
>>> tree = etree.HTML("
text
beforetextin
tail")
>>> newel = etree.HTML("new
")
>>> tree[0].replace(tree[0][0], newel[0][0])
>>> etree.tostring(tree)
'text beforenew
'
Any ideas or comments? Thanks.
Luke Tucker & Chris Abraham