[reportlab-users] 2.5 tests-preinstall failures

Phil Dumont phil at solidstatescientific.com
Tue Nov 9 11:46:27 EST 2010


After a little more investigation, I found out several things:

- I don't need to go get sgmlop. The 'build' and 'install' parts of
reportlab's setup.py build and
install it for you.
- After reportlab builds and installs sgmlop, the 'tests-preinstall'
command of setup.py pass.
(Which makes me think the name for the tests is a little off.)
- I didn't find all this out until after I found a stand-alone sgmlop,
packaged it into an RPM,
packaged reportlab into an RPM, and tried to install them both. The
attempted installation
of the reportlab RPM failed with a complaint that its sgmlop.so
conflicted with the sgmlop.so
in the sgmlop RPM.

All of this came up because my attempt at a reportlab RPM was failing to
build because I was running tests-preinstall in the %prep section of the
.spec file, and it was failing because sgmlop wasn't there yet. I can avoid
this simply by *not* running tests-preinstall. Or maybe (despite the name)
postponing tests-preinstall until after install.

On Mon, Nov 8, 2010 at 10:00 AM, Phil Dumont
<phil at solidstatescientific.com>wrote:


> I've recently grabbed the version 2.5 tarball. Before installing, I'm

> running 'python setup.py tests-preinstall'. I'm getting several test

> failures.

>

> I've done a little debugging of one of them -- the first one. (The rest

> look like they might be similar.) I've got this far with it:

>

> tests.test_platypus_index.IndexTestCase.test0 is handing the parser some

> text with three "index" tags in it, each of which has an "item" attribute.

> In one of the item attribute values, there is an ampersand character

> reference ('&amp;'). In each of the other two, there is a plain old

> ampersand, all by itself, not part of an entity or character reference. It

> looks as though it's expected that the plain ampersand in the tag attribute

> values are ok. But the parser balks on them (specifically, when

> reportlab.lib.xmllib.SlowXmlParser.parse_starttag() hands the attribute

> value to translate_references()).

>

> So, should ampersands be allowed in attribute values or not? If so, why is

> the parser complaining? If not, why is there a test that tries to put them

> there?

>

> Yeah, I saw the attempt to import sgmlop. (Do the tests work with it?)

> And no, sgmlop is not currently installed on my machine. I can if I have

> to. But I'd like to trim my dependency tree a bit. I understand the

> reportlab's home-grown parser is expected to be slower (I don't think I

> care, yet), but it should work the way reportlab's tests expect it to,

> n'est-ce pas?

>

> Thanks.

>

> phil dumont

>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20101109/3e04b3f6/attachment.htm>


More information about the reportlab-users mailing list