Python 2.4, libxslt and MacPorts snafu

I struggled for quite a long time to get the MacPorts libxslt module for python 2.4 (required for a legacy project) to install. A lot of searching turned up many leads but no bug report, and this is a low-priority situation for port maintainers because python 2.4 is now very out of date. This is what I did.

Installed python24.

Installed py-libxslt.

At the end of the port install process for py-libxslt I received an error message. A read of the log said:

[…] :debug:activate activate phase started at Tue Jul 6 11:48:03 BST 2010 :debug:activate Executing org.macports.activate (py-libxslt) :error:activate Target org.macports.activate returned: Registry error: py-libxslt 2.6.210 not registered as installed. :debug:activate Backtrace: Registry error: py-libxslt 2.6.210 not registered as installed.

while executing

“registry::installed $name $v”

(procedure "_check_registry" line 38)
invoked from within

checkregistry $name $v”

(procedure "portimage::activate" line 58)
invoked from within

“registryactivate $name “${version}${revision}${portvariants}” [array get user_options]”

(procedure "portactivate::activate_main" line 6)
invoked from within

“$procedure $targetname” :info:activate Warning: the following items did not execute (for py-libxslt): org.macports.activate :notice:activate Log for py-libxslt is at: /opt/local/var/macports/logs/optlocalvarmacportssourcesrsync.macports.orgreleaseportspythonpy-libxslt/main.log </typo:code>

This indicated that everything was happily built, but the software was not installed in its correct directory for some reason (not evident in the log). I found it difficult to get my head around the way MacPorts works in the time available and establish what went wrong. So I short-circuited the problem by copying the software ( from the MacPorts build directory into the lib directory where it should have been put (/opt/local/lib/python2.4/site-packages).

This will mess up MacPorts’ information about what is installed, so other python 2.4 dependent things might conceivably not be installable. Equally it might be tricky to remove the /opt/local/lib/python2.4/site-packages directory using MacPorts commands without forcing it. But meanwhile I have a working python libxslt module and that’s what I needed.

Published on 06/07/2010 at 12:40 by Technophile, tags , ,

Powered by Publify – Thème Frédéric de Villamil | Photo Glenn