Dave Malcolm <dmalc...@redhat.com> added the comment: The approach Nick suggests seems reasonable, but rpm.expandMacro isn't usable: there's no guarantee that the machine has Python bindings for rpm installed (especially not for the version of Python that we've just built).
However, we can get at the macro by shelling out to the "rpm" command: subprocess.getoutput('rpm --eval %{__os_install_post}') I'm attaching a patch which does this; works on my RHEL 6.3 test box. ---------- Added file: http://bugs.python.org/file26157/fix-14443.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14443> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com