I'm trying to build a custom RPM with a standalone Python 2.4.4 in the /opt directory to keep it isolated from the stock version of Python in CentOS 4.4. The end goal is to use it in conjunction with yet-to-be-built RPMS of the current versions of Zope and Plone.
The spec file I've constructed allows me to build a RPM successfully, but when I try to install the RPM, it complains:
error: Failed dependencies: /usr/local/bin/python is needed by python24-2.4.4-0.i386
I'm not sure if this is more of a Python or RPM issue. So, I'm hoping someone on the list knows enough about both to help me out.
Here is my spec file:
%define optdir /opt/Python-2.4.4
Summary: An interpreted, interactive, object-oriented programming language. Name: python24 Version: 2.4.4 Release: 0 License: PSF - see LICENSE Group: Development/Languages URL: http://www.python.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root
Source: http://www.python.org/ftp/python/%%7Bversion%7D/Python-%%7Bversion%7D.tar.bz...
%description <SNIPPED>
%prep %setup -q -n Python-%{version}
%build ./configure \ --prefix=%{optdir} \ --exec-prefix=%{optdir} \ --with-readline \ --with-zlib make
%install rm -rf %{buildroot} make \ prefix=%{optdir} \ exec_prefix=%{optdir} \ bindir=%{optdir}/bin \ includedir=%{optdir}/include \ libdir=%{optdir}/lib \ mandir=%{optdir}/man \ install DESTDIR=%{buildroot}
%clean rm -rf %{buildroot}
%files %defattr(-,root,root) /opt/*
Thanks!
See how the Unified Installer does it. In fact, an RPM of the Unified Installer from Plone.org might be better than just the standalone packages. -- Lamar Owen Chief Information Officer Pisgah Astronomical Research Institute 1 PARI Drive Rosman, NC 28772 828-862-5554 www.pari.edu
See how the Unified Installer does it. In fact, an RPM of the Unified Installer from Plone.org might be better than just the standalone packages.
Actually, the Unified Installer is what got me started down this road. An RPM of the installer would be cool, but then I thought it would be even better if I had separate RPMs for each component. That way, I wouldn't have to rebuild the whole thing to update Python, Zope, or Plone. The Unified Installer script starts with zlib. There's a stock RPM already available for that, so I didn't bother. Python 2.4 is the next step and the install script looked so simple that I didn't think building an RPM would be too hard. Now, after working on it for two days, I'm thinking otherwise. I'm guessing I'm just making a dumb mistake somewhere though.
See how the Unified Installer does it. In fact, an RPM of the Unified Installer from Plone.org might be better than just the standalone packages.
Actually, the Unified Installer is what got me started down this road. An RPM of the installer would be cool, but then I thought it would be even better if I had separate RPMs for each component. That way, I wouldn't have to rebuild the whole thing to update Python, Zope, or Plone. The Unified Installer script starts with zlib. There's a stock RPM already available for that, so I didn't bother. Python 2.4 is the next step and the install script looked so simple that I didn't think building an RPM would be too hard. Now, after working on it for two days, I'm thinking otherwise. I'm guessing I'm just making a dumb mistake somewhere though.
Hmmm. Could be related to automatic dependency processing. There used to be alternaive Python RPM's available for CentOS 4, IIRC, but I don't rememebr right off where they were.. lessee... look at http://rpm.pbone.net/index.php3/stat/4/idpl/2246271/com/python24-2.4.2-10.el... and its parent, http://www.python.org/pyvault/
This may be a base to work from, although it looks like on first blush to want to replace the existing python.
As one who runs Unified Installer-installed Plone sites, I can understand the issues. As one who maintained the PostgreSQL RPMset for five years, I can understand those issues, too, even though it's been three years now since I gave those up.
At this time I just build the UI from source, and run with it, as it's very self-contained. -- Lamar Owen CHief Information Officer Pisgah Astronomical Research Institute 1 PARI Drive Rosman, NC 28772 828-862-5554 www.pari.edu
Del Stoliker wrote:
error: Failed dependencies: /usr/local/bin/python is needed by python24-2.4.4-0.i386
There's probably some documentation or example script which references /usr/local/bin/python in the shebang. This might get pulled in as a dependency during the automatic requirement processing.
You might have to remove this reference. There was a problem like that with perl-Config-General in rpmforge, where some documentation triggered a dependency on perl(Carp::Heavy).
Cheers,
Ralph
error: Failed dependencies: /usr/local/bin/python is needed by python24-2.4.4-0.i386
There's probably some documentation or example script which references /usr/local/bin/python in the shebang. This might get pulled in as a dependency during the automatic requirement processing.
You might have to remove this reference. There was a problem like that with perl-Config-General in rpmforge, where some documentation triggered a dependency on perl(Carp::Heavy).
Cheers,
Ralph
I found it! The file /pythonroot/lib/python2.4/cgi.py starts with "#! /usr/local/bin/python" and goes on to say in the comments that it's not a mistake. I found that in the stock CentOS Python 2.3, the file is also there, but was patched to point at the installed Python. So, I just did a substitution in my install section of the spec file and the RPM will now install.
Thanks everyone for your replies!
Del
Del Stoliker wrote:
I'm trying to build a custom RPM with a standalone Python 2.4.4 in the /opt directory to keep it isolated from the stock version of Python in CentOS 4.4. The end goal is to use it in conjunction with yet-to-be-built RPMS of the current versions of Zope and Plone.
The spec file I've constructed allows me to build a RPM successfully, but when I try to install the RPM, it complains:
error: Failed dependencies: /usr/local/bin/python is needed by python24-2.4.4-0.i386
I'm not sure if this is more of a Python or RPM issue. So, I'm hoping someone on the list knows enough about both to help me out.
Here is my spec file:
%define optdir /opt/Python-2.4.4
I've previously used a modified version of the RPMs found at:
http://www.python.org/download/releases/2.4/rpms/
and they worked great on CentOS 4.4. They also installed alongside the python 2.3.4 that comes with CentOS 4.
-Greg