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/%{version}/Python-%{version}.tar.bz2 %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
Del Stoliker wrote:> error: Failed dependencies: > /usr/local/bin/python is needed by python24-2.4.4-0.i386There'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 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: <http://lists.centos.org/pipermail/centos/attachments/20070506/91f81d7f/attachment-0001.sig>
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
> > 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, > > RalphI 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