Re: some try-ark suggestions
Jonathan Hogg <[email protected]> Sun, 10 Jun 2001 14:39:21 +0100
| Newsgroups | gmane.comp.sysutils.ark.devel |
|---|---|
| Message-ID | <[email protected]> |
On 10/6/01 0:28, [email protected] wrote: >This is what I have installed: > >[berto@localhost ark]$ rpm -q python PyXML >python-2.0-9mdk >PyXML-0.6.5-1 OK. Where did the PyXML come from? Was it part of the Mandrake install or did you go get it? >How do I "bootstrap with ARK" in the sense you mean here? Use ARK to install >anew these versions of Python and PyXML, right? Sorry, yes. I just mean that once I had ARK running I used it to build and install the latest versions of Python and PyXML. I keep the old and the new around so I can check that any changes I'm making will work with both. A shame because there are cool new features in Python 2 that I'd like to take advantage of, but I think it will be a while before we can assume that people have the latest version. [Aside: while checking into RPMs I discovered that RedHat 7.1, the very latest release, still ships with 1.5.2 - I can't begin to understand why as that's not even the most recent version of Python 1 (1.6).] >Here's what I get: > >[berto@localhost ark]$ python >Python 2.0 (#1, Apr 11 2001, 19:18:08) >[GCC 2.96 20000731 (Linux-Mandrake 8.0 2.96-0.48mdk)] on linux-i386 >Type "copyright", "credits" or "license" for more information. > >>>> import xml.dom.core >Traceback (most recent call last): > File "<stdin>", line 1, in ? >ImportError: No module named core > >>>> import xml.dom.ext.reader.Sax >Traceback (most recent call last): > File "<stdin>", line 1, in ? >ImportError: No module named ext.reader.Sax > >>>> > [...] > >>>> import xml > >>>> xml.version_info >Traceback (most recent call last): > File "<stdin>", line 1, in ? >AttributeError: version_info > >Yikes!! Maybe I place too much faith in Mandrakesoft to Do Things Right? This is starting to make some more sense. I suspect that your PyXML install is not being picked up at all. The 'xml' package you're picking up is the basic one included in Python 2. This takes me back to my earlier question about where the PyXML rpm came from. I'm not familiar with the Mandrake distribution, but I found the python rpm you have (python-2.0-9mdk) on rpmfind.net. Listing the contents I get: $ python -qlp python-2.0-9mdk.i586.rpm /etc/emacs/site-start.d/python.el /usr/bin/python /usr/lib/python2.0 [...] /usr/lib/python2.0/xml/__init__.py /usr/lib/python2.0/xml/__init__.pyc /usr/lib/python2.0/xml/__init__.pyo /usr/lib/python2.0/xml/dom /usr/lib/python2.0/xml/dom/__init__.py [...] I also found an rpm named like yours (PyXML-0.6.5-1.i386.rpm) which contains: $ rpm -qlp PyXML-0.6.5-1.i386.rpm /usr/local/bin/xmlproc_parse /usr/local/bin/xmlproc_val /usr/local/lib/python2.0/site-packages/_xmlplus/__init__.py [...] However, note that this rpm installs into /usr/*local*/lib not /usr/lib which is where your Python appears to be installed. I tried downloading the latest rpm from pyxml.sourceforge.net (PyXML-0.6.5-2.0.i386.rpm) and it also installs into /usr/local/lib. Now I don't know of any standard Linux distribution that ships with Python in /usr/local, so I don't know what the package maintainers for the PyXML project are playing at. >(Bear in mind, I know very little about Python internals or what tricks >to try.) > >Or maybe I should do a special upgrade of my Python to 2.1 or ...? > >BTW, I've done a *full* install of Mandrake 8.0 on this system. I've done >nothing at all to muck with the Python subsystem since the installation. First off, if you can try the 'rpm -ql python PyXML' stuff as above and see if I'm right. If this is how your machine came after installing Mandrake 8.0 I'd have a shout at them. If you got PyXML from sourceforge, then I guess we should be asking them why they're using a non-standard (for Linux anyway) location for python. In the short term, I'm not sure what to suggest. You could try (and it's an ugly solution) ditching your /usr/lib/python2.0/xml directory and linking it to the /usr/local/lib/python2.0/xml one. >I know it will be hard, but you should try to discern and code around some >least common denominator. It would be a pity, wouldn't it, if you force >would-be users to become Python and XML experts in addition to mastering >Arusha itself? Or if you tell users of a quite recent Linux distribution >to have to seek out later-versioned Python (or ...) RPMS and install them. Yes, this is a bit of a mess. I've not looked closely at the XML stuff that comes with Python 2 (Will?), but perhaps we should try to accomodate that as well as Python >=1.5 + PyXML. >I'm trying to approach this thing as the typical user would, not as someone >with a special private line to you, or Will (or even Harlan!). I know it's not the answer you're looking for, but with the goal of the project (collaborative system administration) I would hope every user would have a private line to someone like me or Will (or Harlan ;-)). >I sort of agree with what Harlan wrote in a separate post: you need to >iron this out automatically in the code, and not force the user to pick up >that hot iron himself/herself. Gimme the afternoon ;-) :-j -- jonathan hogg, one good idea ltd, 131 queen margaret dr., glasgow g20 8pd http://www.onegoodidea.com/ tel:+44-(0)7976-614338 fax:+44-(0)7970-537451