creating a python 2.5.4 rpm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm trying to create a rpm for python 2.5.4 to install it on a CentOS 5.2 box.
I'm not looking to replace python 2.4 that ships currently with
CentOS, rather I want to make python 2.5.4 available under
/opt/python25/bin, this I have done it successfully by compiling and
installing the software manually.

All I had to do was a simple

./configure --prefix=/opt/python25
make
make install

I went ahead and created my python.spec and I'm running into a wall
with the rpmbuild -ba python.spec

I'm pasting my spec file and the error I get when doing the build

[dan@localhost SPECS]$ cat python.spec
Name: Python25
Version: 2.5.4
Release: 1
URL: http://www.python.org/
Summary: RPM Package for Python25
License: GPL
Group: Development/Languages

Buildroot: %{_tmppath}/%{name}-%{version}-root
Source: http://www.python.org/ftp/python/%{version}/Python-%{version}.tgz
BuildPrereq: readline-devel, openssl-devel, gmp-devel
BuildPrereq: ncurses-devel, gdbm-devel, zlib-devel, expat-devel
BuildPrereq: libGL-devel tk tix gcc-c++ libX11-devel glibc-devel
BuildPrereq: bzip2 tar /usr/bin/find pkgconfig tcl-devel tk-devel
BuildPrereq: tix-devel bzip2-devel sqlite-devel
BuildPrereq: autoconf
BuildPrereq: db4-devel >= 4.3

%description
Python is an interpreted, interactive, object-oriented programming
language often compared to Tcl, Perl, Scheme or Java. Python includes
modules, classes, exceptions, very high level dynamic data types and
dynamic typing. Python supports interfaces to many system calls and
libraries, as well as to various windowing systems (X11, Motif, Tk,
Mac and MFC).

%prep

%setup -q

%build
autoconf

%configure --prefix=/opt/python25

%install
#[ -d $RPM_BUILD_ROOT ] && rm -fr $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/opt $RPM_BUILD_ROOT%{_mandir}
make install DESTDIR=$RPM_BUILD_ROOT

%clean
rm -fr $RPM_BUILD_ROOT

#%post libs -p /sbin/ldconfig

#%postun libs -p /sbin/ldconfig

[dan@localhost SPECS]$

This are the last lines of the build and the content of the file that
rpmbuild says
Listing /home/dan/rpmbuild/TMP/Python-2.5.4-root/opt/python25/lib/python2.5/xml/sax
...
Compiling /home/dan/rpmbuild/TMP/Python-2.5.4-root/opt/python25/lib/python2.5/xml/sax/__init__.py
...
Compiling /home/dan/rpmbuild/TMP/Python-2.5.4-root/opt/python25/lib/python2.5/xml/sax/_exceptions.py
...
Compiling /home/dan/rpmbuild/TMP/Python-2.5.4-root/opt/python25/lib/python2.5/xml/sax/expatreader.py
...
Compiling /home/dan/rpmbuild/TMP/Python-2.5.4-root/opt/python25/lib/python2.5/xml/sax/handler.py
...
Compiling /home/dan/rpmbuild/TMP/Python-2.5.4-root/opt/python25/lib/python2.5/xml/sax/saxutils.py
...
Compiling /home/dan/rpmbuild/TMP/Python-2.5.4-root/opt/python25/lib/python2.5/xml/sax/xmlreader.py
...
Compiling /home/dan/rpmbuild/TMP/Python-2.5.4-root/opt/python25/lib/python2.5/xmllib.py
...
Compiling /home/dan/rpmbuild/TMP/Python-2.5.4-root/opt/python25/lib/python2.5/xmlrpclib.py
...
Compiling /home/dan/rpmbuild/TMP/Python-2.5.4-root/opt/python25/lib/python2.5/zipfile.py
...
make: *** [libinstall] Error 1
error: Bad exit status from /home/dan/rpmbuild/TMP/rpm-tmp.87944 (%install)


RPM build errors:
    Bad exit status from /home/dan/rpmbuild/TMP/rpm-tmp.87944 (%install)
[dan@localhost SPECS]$ cat /home/dan/rpmbuild/TMP/rpm-tmp.87944
#!/bin/sh

  RPM_SOURCE_DIR="/home/dan/rpmbuild/SOURCES"
  RPM_BUILD_DIR="/home/dan/rpmbuild/BUILD"
  RPM_OPT_FLAGS="-O2 -g"
  RPM_ARCH="x86_64"
  RPM_OS="linux"
  export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS
  RPM_DOC_DIR="/usr/share/doc"
  export RPM_DOC_DIR
  RPM_PACKAGE_NAME="Python"
  RPM_PACKAGE_VERSION="2.5.4"
  RPM_PACKAGE_RELEASE="1"
  export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE
  RPM_BUILD_ROOT="/home/dan/rpmbuild/TMP/Python-2.5.4-root"
  export RPM_BUILD_ROOT


  set -x
  umask 022
  cd /home/dan/rpmbuild/BUILD
cd Python-2.5.4
#[ -d $RPM_BUILD_ROOT ] && rm -fr $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/opt $RPM_BUILD_ROOT/usr/share/man
make install DESTDIR=$RPM_BUILD_ROOT





    /usr/lib/rpm/brp-compress
    /usr/lib/rpm/brp-strip
    /usr/lib/rpm/brp-strip-static-archive
    /usr/lib/rpm/brp-strip-comment-note

[dan@localhost SPECS]$


Any comments would be appreciated.

Best regards,
-- 
Dan Bahena
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux