Re: Building rpm-python from scratch?
Paul Nasrat <[email protected]> Fri, 10 Mar 2006 11:45:01 -0500
| Newsgroups | gmane.linux.redhat.rpm.python |
|---|---|
| Organization | Red Hat, Inc. |
| Message-ID | <[email protected]> |
On Fri, 2006-03-10 at 11:32 -0500, Brad Smith wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello folks,
>
> My webhost is currently running python2.2 on RHEL3 and the project I'm doing requires 2.4, so I'm
> having to build everything from scratch in my home directory. Python2.4 built fine, but rpm-python
> is a different story. I've tried two methods of getting it, neither of which has panned out:
You might want to check out Jeff Pitman's work on making rpm-python
build out of tree http://symbiont.mn.sabren.com/rpm-python.html
> Method 1: Compiling from source...
> Despite googling high and low, I can't seem to find an official source distribution or even a
> homesite for the project.
It's part of rpm.
> The best I could do was look in the source package for the version of rpm
> shipped with fc4 (since that version of fedora uses python4.2).
That's probably the most authoratitive source ath the time.
> I installed the package on my
> laptop, did an rpmbuild -bp on it and uploaded the build directory to the RHEL3 system. Although
> running ./configure works fine (I was hoping that would catch any missing dependencies), running
> make in the python directory produces a slew of errors (same if I try making the rpm directory first).
What happens if you take the appropriate RHEL3 rpm srpm and install
that, changing the spec appropriately hint:
%define with_python_version 2.2%{nil}
Bump release and rpmbuild -bb. Obviously you'll have to track updating
rpm manually, but it seems you can't really be caring about it being a
supported RHEL instance if you just upgrade python.
> Method 2: Using the existing module...
> Getting desperate I tried just copying /usr/lib/python2.2/site-packages/rpmmodule.so into my 2.4
> site-packages directory, but attempting to import it produces
>
> ImportError: ./rpmmodule.so: undefined symbol: PyDictIter_Type
You can't assume the python C ABI is the same between 2.2 and 2.4.
Paul