[Erp5-report] r17062 - /spec/mandriva/2007.1/python2.4/
nobody at svn.erp5.org
nobody at svn.erp5.org
Sat Oct 20 22:45:36 CEST 2007
Author: kazuhiko
Date: Sat Oct 20 22:45:36 2007
New Revision: 17062
URL: http://svn.erp5.org?rev=17062&view=rev
Log:
* Wed Oct 17 2007 Kazuhiko Shiozaki <kazuhiko at nexedi.com> 2.4.4-5.1mdv2007.1
- import 2.4.4-5mdv2008.0
- disable test_sax because it will fail if pyxml is installed
- apply a patch for tarfile
Added:
spec/mandriva/2007.1/python2.4/Python-2.4.3-tarfile.py.patch
Modified:
spec/mandriva/2007.1/python2.4/python2.4.spec
Added: spec/mandriva/2007.1/python2.4/Python-2.4.3-tarfile.py.patch
URL: http://svn.erp5.org/spec/mandriva/2007.1/python2.4/Python-2.4.3-tarfile.py.patch?rev=17062&view=auto
==============================================================================
--- spec/mandriva/2007.1/python2.4/Python-2.4.3-tarfile.py.patch (added)
+++ spec/mandriva/2007.1/python2.4/Python-2.4.3-tarfile.py.patch Sat Oct 20 22:45:36 2007
@@ -1,0 +1,243 @@
+--- Python-2.4.3/Lib/tarfile.py-python2.4.3 2005-10-28 08:00:51.000000000 +0200
++++ Python-2.4.3/Lib/tarfile.py 2005-03-04 00:15:03.000000000 +0100
+@@ -688,11 +688,6 @@
+ tarinfo.devmajor = tarinfo.devmajor = 0
+ tarinfo.prefix = buf[345:500]
+
+- # Some old tar programs represent a directory as a regular
+- # file with a trailing slash.
+- if tarinfo.isreg() and tarinfo.name.endswith("/"):
+- tarinfo.type = DIRTYPE
+-
+ # The prefix field is used for filenames > 100 in
+ # the POSIX standard.
+ # name = prefix + '/' + name
+@@ -700,7 +695,7 @@
+ tarinfo.name = normpath(os.path.join(nts(tarinfo.prefix), tarinfo.name))
+
+ # Directory names should have a '/' at the end.
+- if tarinfo.isdir():
++ if tarinfo.isdir() and tarinfo.name[-1:] != "/":
+ tarinfo.name += "/"
+ return tarinfo
+
+@@ -1108,8 +1103,7 @@
+ stmd = statres.st_mode
+ if stat.S_ISREG(stmd):
+ inode = (statres.st_ino, statres.st_dev)
+- if not self.dereference and \
+- statres.st_nlink > 1 and inode in self.inodes:
++ if inode in self.inodes and not self.dereference:
+ # Is it a hardlink to an already
+ # archived file?
+ type = LNKTYPE
+@@ -1138,16 +1132,17 @@
+
+ # Fill the TarInfo object with all
+ # information we can get.
+- tarinfo.name = arcname
+- tarinfo.mode = stmd
+- tarinfo.uid = statres.st_uid
+- tarinfo.gid = statres.st_gid
+- if stat.S_ISREG(stmd):
+- tarinfo.size = statres.st_size
++ tarinfo.name = arcname
++ tarinfo.mode = stmd
++ tarinfo.uid = statres.st_uid
++ tarinfo.gid = statres.st_gid
++ if stat.S_ISDIR(stmd):
++ # For a directory, the size must be 0
++ tarinfo.size = 0
+ else:
+- tarinfo.size = 0L
++ tarinfo.size = statres.st_size
+ tarinfo.mtime = statres.st_mtime
+- tarinfo.type = type
++ tarinfo.type = type
+ tarinfo.linkname = linkname
+ if pwd:
+ try:
+@@ -1238,15 +1233,16 @@
+ self.addfile(tarinfo, f)
+ f.close()
+
+- elif tarinfo.isdir():
++ if tarinfo.type in (LNKTYPE, SYMTYPE, FIFOTYPE, CHRTYPE, BLKTYPE):
++ tarinfo.size = 0L
++ self.addfile(tarinfo)
++
++ if tarinfo.isdir():
+ self.addfile(tarinfo)
+ if recursive:
+ for f in os.listdir(name):
+ self.add(os.path.join(name, f), os.path.join(arcname, f))
+
+- else:
+- self.addfile(tarinfo)
+-
+ def addfile(self, tarinfo, fileobj=None):
+ """Add the TarInfo object `tarinfo' to the archive. If `fileobj' is
+ given, tarinfo.size bytes are read from it and added to the archive.
+@@ -1378,7 +1374,7 @@
+ # stream of tar blocks.
+ raise StreamError, "cannot extract (sym)link as file object"
+ else:
+- # A (sym)link's file object is its target's file object.
++ # A (sym)link's file object is it's target's file object.
+ return self.extractfile(self._getmember(tarinfo.linkname,
+ tarinfo))
+ else:
+@@ -1633,6 +1629,10 @@
+ # Skip the following data blocks.
+ self.offset += self._block(tarinfo.size)
+
++ if tarinfo.isreg() and tarinfo.name[:-1] == "/":
++ # some old tar programs don't know DIRTYPE
++ tarinfo.type = DIRTYPE
++
+ self.members.append(tarinfo)
+ return tarinfo
+
+--- Python-2.4.3/Lib/test/test_tarfile.py-2.4.3 2005-10-28 08:00:51.000000000 +0200
++++ Python-2.4.3/Lib/test/test_tarfile.py 2004-10-25 05:19:41.000000000 +0200
+@@ -134,30 +134,6 @@
+ "readlines() after seek failed")
+ fobj.close()
+
+- def test_old_dirtype(self):
+- """Test old style dirtype member (bug #1336623).
+- """
+- # Old tars create directory members using a REGTYPE
+- # header with a "/" appended to the filename field.
+-
+- # Create an old tar style directory entry.
+- filename = tmpname()
+- tarinfo = tarfile.TarInfo("directory/")
+- tarinfo.type = tarfile.REGTYPE
+-
+- fobj = file(filename, "w")
+- fobj.write(tarinfo.tobuf())
+- fobj.close()
+-
+- # Test if it is still a directory entry when
+- # read back.
+- tar = tarfile.open(filename)
+- tarinfo = tar.getmembers()[0]
+- tar.close()
+-
+- self.assert_(tarinfo.type == tarfile.DIRTYPE)
+- self.assert_(tarinfo.name.endswith("/"))
+-
+ class ReadStreamTest(ReadTest):
+ sep = "|"
+
+@@ -232,40 +208,6 @@
+ else:
+ self.dst.addfile(tarinfo, f)
+
+-class WriteSize0Test(BaseTest):
+- mode = 'w'
+-
+- def setUp(self):
+- self.tmpdir = dirname()
+- self.dstname = tmpname()
+- self.dst = tarfile.open(self.dstname, "w")
+-
+- def tearDown(self):
+- self.dst.close()
+-
+- def test_file(self):
+- path = os.path.join(self.tmpdir, "file")
+- file(path, "w")
+- tarinfo = self.dst.gettarinfo(path)
+- self.assertEqual(tarinfo.size, 0)
+- file(path, "w").write("aaa")
+- tarinfo = self.dst.gettarinfo(path)
+- self.assertEqual(tarinfo.size, 3)
+-
+- def test_directory(self):
+- path = os.path.join(self.tmpdir, "directory")
+- os.mkdir(path)
+- tarinfo = self.dst.gettarinfo(path)
+- self.assertEqual(tarinfo.size, 0)
+-
+- def test_symlink(self):
+- if hasattr(os, "symlink"):
+- path = os.path.join(self.tmpdir, "symlink")
+- os.symlink("link_target", path)
+- tarinfo = self.dst.gettarinfo(path)
+- self.assertEqual(tarinfo.size, 0)
+-
+-
+ class WriteStreamTest(WriteTest):
+ sep = '|'
+
+@@ -374,53 +316,6 @@
+ if e.errno == errno.ENOENT:
+ self.fail("hardlink not extracted properly")
+
+-class CreateHardlinkTest(BaseTest):
+- """Test the creation of LNKTYPE (hardlink) members in an archive.
+- In this respect tarfile.py mimics the behaviour of GNU tar: If
+- a file has a st_nlink > 1, it will be added a REGTYPE member
+- only the first time.
+- """
+-
+- def setUp(self):
+- self.tar = tarfile.open(tmpname(), "w")
+-
+- self.foo = os.path.join(dirname(), "foo")
+- self.bar = os.path.join(dirname(), "bar")
+-
+- if os.path.exists(self.foo):
+- os.remove(self.foo)
+- if os.path.exists(self.bar):
+- os.remove(self.bar)
+-
+- file(self.foo, "w").write("foo")
+- self.tar.add(self.foo)
+-
+- def test_add_twice(self):
+- # If st_nlink == 1 then the same file will be added as
+- # REGTYPE every time.
+- tarinfo = self.tar.gettarinfo(self.foo)
+- self.assertEqual(tarinfo.type, tarfile.REGTYPE,
+- "add file as regular failed")
+-
+- def test_add_hardlink(self):
+- # If st_nlink > 1 then the same file will be added as
+- # LNKTYPE.
+- os.link(self.foo, self.bar)
+- tarinfo = self.tar.gettarinfo(self.foo)
+- self.assertEqual(tarinfo.type, tarfile.LNKTYPE,
+- "add file as hardlink failed")
+-
+- tarinfo = self.tar.gettarinfo(self.bar)
+- self.assertEqual(tarinfo.type, tarfile.LNKTYPE,
+- "add file as hardlink failed")
+-
+- def test_dereference_hardlink(self):
+- self.tar.dereference = True
+- os.link(self.foo, self.bar)
+- tarinfo = self.tar.gettarinfo(self.bar)
+- self.assertEqual(tarinfo.type, tarfile.REGTYPE,
+- "dereferencing hardlink failed")
+-
+
+ # Gzip TestCases
+ class ReadTestGzip(ReadTest):
+@@ -471,14 +366,12 @@
+ ReadTest,
+ ReadStreamTest,
+ WriteTest,
+- WriteSize0Test,
+ WriteStreamTest,
+ WriteGNULongTest,
+ ]
+
+ if hasattr(os, "link"):
+ tests.append(ExtractHardlinkTest)
+- tests.append(CreateHardlinkTest)
+
+ if gzip:
+ tests.extend([
Modified: spec/mandriva/2007.1/python2.4/python2.4.spec
URL: http://svn.erp5.org/spec/mandriva/2007.1/python2.4/python2.4.spec?rev=17062&r1=17061&r2=17062&view=diff
==============================================================================
--- spec/mandriva/2007.1/python2.4/python2.4.spec (original)
+++ spec/mandriva/2007.1/python2.4/python2.4.spec Sat Oct 20 22:45:36 2007
@@ -3,18 +3,18 @@
%define lib_major %{dirver}
%define lib_name_orig libpython
-%define lib_name %mklibname %{name}
+%define lib_name %mklibname python %{lib_major}
Summary: An interpreted, interactive object-oriented programming language
-Name: python%{lib_major}
-Version: 2.4.3
-Release: %mkrel 4.2
+Name: python2.4
+Version: 2.4.4
+Release: %mkrel 5.1
License: Modified CNRI Open Source License
Group: Development/Python
Source: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.bz2
Source1: http://www.python.org/ftp/python/doc/%{docver}/html-%{docver}.tar.bz2
-Source2: python-2.4-base.list.bz2
+Source2: python-2.4-base.list
Source3: exclude.py
Source4: python-mode-1.0.tar.bz2
@@ -22,7 +22,7 @@
Patch3: Python-2.3-no-local-incpath.patch.bz2
# Support */lib64 convention on x86_64, sparc64, etc.
-Patch4: Python-2.4.1-lib64.patch.bz2
+Patch4: Python-2.4.4-lib64.patch
# Do handle <asm-XXX/*.h> headers in h2py.py
# FIXME: incomplete for proper bi-arch support as #if/#else/#endif
@@ -33,17 +33,17 @@
Patch6: Python-2.4.1-gdbm.patch.bz2
Patch7: python-2.4.3-fix-buffer_overflow_with_glibc2.3.5.diff
-Patch8: python-2.4.3-CVE-2006-4980.patch
-Patch9: Python-2.4.3-tarfile.py.patch
-
+Patch8: python-2.4.4-parallel.patch
+Patch100: Python-2.4.3-tarfile.py.patch
URL: http://www.python.org/
-Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
-Conflicts: tkinter%{lib_major} < %{version}
+Conflicts: tkinter < %{version}
Requires: %{lib_name} = %{version}
Requires: %{name}-base = %{version}
-Provides: python = %{version}
+provides: python = %{version}
BuildRequires: XFree86-devel
-BuildRequires: db4-devel
+BuildRequires: blt
+BuildRequires: db2-devel, db4-devel
+BuildRequires: emacs-bin
BuildRequires: expat-devel
BuildRequires: gdbm-devel
BuildRequires: gmp-devel
@@ -53,9 +53,12 @@
BuildRequires: termcap-devel
BuildRequires: tcl tcl-devel
BuildRequires: tk tk-devel
+BuildRequires: tcl tk tix
BuildRequires: tix
BuildRequires: autoconf2.5
BuildRequires: bzip2-devel
+Provides: python = %{version}-%{release}
+Buildroot: %{_tmppath}/%{name}-%{version}
%description
Python is an interpreted, interactive, object-oriented programming
@@ -90,9 +93,10 @@
Group: Development/Python
Requires: %{name} = %version
Requires: %{lib_name} = %{version}
-Obsoletes: %{name}%{lib_major}-devel
-Provides: %{name}%{lib_major}-devel = %{version}-%{release}
-Provides: %{lib_name_orig}%{lib_major}-devel = %{version}-%{release}
+Obsoletes: %{name}-devel
+Provides: %{name}-devel = %{version}-%{release}
+Provides: %{lib_name_orig}-devel = %{version}-%{release}
+Provides: python-devel = %{version}-%{release}
%description -n %{lib_name}-devel
The Python programming language's interpreter can be extended with
@@ -107,7 +111,7 @@
%package docs
Summary: Documentation for the Python programming language
-Requires: python%{lib_major} = %version
+Requires: python = %version
Group: Development/Python
%description docs
@@ -118,14 +122,13 @@
Install the python-docs package if you'd like to use the documentation
for the Python language.
-%package -n tkinter%{lib_major}
+%package -n tkinter2.4
Summary: A graphical user interface for the Python scripting language
Group: Development/Python
-Requires: python%{lib_major} = %version
-Requires: tcl tk
-Provides: tkinter%{lib_major} = %{version}-%{release}
-
-%description -n tkinter%{lib_major}
+Requires: %{name} = %version
+Requires: tcl tk
+
+%description -n tkinter2.4
The Tkinter (Tk interface) program is an graphical user interface for
the Python scripting language.
@@ -154,10 +157,10 @@
%patch6 -p1
# fix some crash du to a buffer overflow
%patch7 -p0
-%patch8 -p0
-
-%patch9 -p1
-
+# allow parallel usage with main python
+%patch8 -p1
+# fix a bug of tarfile
+%patch100 -p1
autoconf
mkdir html
@@ -175,7 +178,13 @@
OPT="$RPM_OPT_FLAGS -g"
export OPT
-%configure2_5x --with-threads --with-cycle-gc --with-cxx=g++ --without-libdb --enable-ipv6 --enable-shared
+%configure2_5x \
+ --with-threads \
+ --with-cycle-gc \
+ --with-cxx=g++ \
+ --without-libdb \
+ --enable-ipv6 \
+ --enable-shared
# fix build
perl -pi -e 's/^(LDFLAGS=.*)/$1 -lstdc++/' Makefile
@@ -190,72 +199,85 @@
# (misc) test_minidom is not working for the moment
# tested on 2.4.1 (mdk), on ubuntu, on debian, on freebsd and gentoo
# should be reenabled for 2.4.3
-make test TESTOPTS="-l -x test_linuxaudiodev -x test_nis -x test_minidom"
+TESTOPTS="-l -x test_linuxaudiodev -x test_nis -x test_minidom -x test_socket -x test_sax"
+%ifarch x86_64
+TESTOPTS="$TESTOPTS -x test_pwd"
+%endif
+make test TESTOPTS="$TESTOPTS"
%install
-rm -rf $RPM_BUILD_ROOT
-mkdir -p $RPM_BUILD_ROOT%{_prefix}
+rm -rf %{buildroot}
+mkdir -p %{buildroot}%{_prefix}
# fix Makefile to get rid of reference to distcc
perl -pi -e "/^CC=/ and s/distcc/gcc/" Makefile
# set the install path
echo '[install_scripts]' >setup.cfg
-echo 'install_dir='"${RPM_BUILD_ROOT}/usr/bin" >>setup.cfg
+echo 'install_dir='"%{buildroot}/usr/bin" >>setup.cfg
# python is not GNU and does not know fsstd
-mkdir -p $RPM_BUILD_ROOT%{_mandir}
+mkdir -p %{buildroot}%{_mandir}
%makeinstall_std
-(cd $RPM_BUILD_ROOT%{_libdir}; ln -sf libpython%{lib_major}.so.* libpython%{lib_major}.so)
+# remove unversioned binary
+rm -f %{buildroot}%{_bindir}/python
+mv %{buildroot}%{_bindir}/pydoc %{buildroot}%{_bindir}/pydoc2.4
+mv %{buildroot}%{_bindir}/idle %{buildroot}%{_bindir}/idle2.4
+
+(cd %{buildroot}%{_libdir}; ln -sf libpython%{lib_major}.so.* libpython%{lib_major}.so)
# Provide a libpython%{dirver}.so symlink in /usr/lib/puthon*/config, so that
# the shared library could be found when -L/usr/lib/python*/config is specified
-(cd $RPM_BUILD_ROOT%{_libdir}/python%{dirver}/config; ln -sf ../../libpython%{lib_major}.so .)
+(cd %{buildroot}%{_libdir}/python%{dirver}/config; ln -sf ../../libpython%{lib_major}.so .)
+
+# emacs, I use it, I want it
+mkdir -p %{buildroot}%{_datadir}/emacs/site-lisp
+install -m 644 Misc/python-mode.el %{buildroot}%{_datadir}/emacs/site-lisp/python2.4-mode.el
+emacs -batch -f batch-byte-compile %{buildroot}%{_datadir}/emacs/site-lisp/python2.4-mode.el
+
+install -d %{buildroot}%{_sysconfdir}/emacs/site-start.d
+cat <<EOF >%{buildroot}%{_sysconfdir}/emacs/site-start.d/%{name}.el
+(setq auto-mode-alist (cons '("\\\\.py$" . python-mode) auto-mode-alist))
+(autoload 'python-mode "python-mode" "Mode for python files." t)
+EOF
# smtpd proxy
-mv -f $RPM_BUILD_ROOT%{_bindir}/smtpd.py $RPM_BUILD_ROOT%{_libdir}/python%{dirver}/
-
-# idle
-cp Tools/scripts/idle $RPM_BUILD_ROOT%{_bindir}/idle
-perl -pi -e "s,/usr/bin/env python$,/usr/bin/env python2.4," $RPM_BUILD_ROOT%{_bindir}/idle
+mv -f %{buildroot}%{_bindir}/smtpd.py %{buildroot}%{_libdir}/python%{dirver}/
# modulator
-cat << EOF > $RPM_BUILD_ROOT%{_bindir}/modulator
+cat << EOF > %{buildroot}%{_bindir}/modulator2.4
#!/bin/bash
exec %{_libdir}/python%{dirver}/site-packages/modulator/modulator.py
EOF
-cp -r Tools/modulator $RPM_BUILD_ROOT%{_libdir}/python%{dirver}/site-packages/
+cp -r Tools/modulator %{buildroot}%{_libdir}/python%{dirver}/site-packages/
# pynche
-cat << EOF > $RPM_BUILD_ROOT%{_bindir}/pynche
+cat << EOF > %{buildroot}%{_bindir}/pynche2.4
#!/bin/bash
exec %{_libdir}/python%{dirver}/site-packages/pynche/pynche
EOF
rm -f Tools/pynche/*.pyw
-cp -r Tools/pynche $RPM_BUILD_ROOT%{_libdir}/python%{dirver}/site-packages/
-
-chmod 755 $RPM_BUILD_ROOT%{_bindir}/{idle,modulator,pynche}
-mv $RPM_BUILD_ROOT%{_bindir}/idle $RPM_BUILD_ROOT%{_bindir}/idle2.4
-mv $RPM_BUILD_ROOT%{_bindir}/modulator $RPM_BUILD_ROOT%{_bindir}/modulator2.4
-mv $RPM_BUILD_ROOT%{_bindir}/pynche $RPM_BUILD_ROOT%{_bindir}/pynche2.4
+cp -r Tools/pynche %{buildroot}%{_libdir}/python%{dirver}/site-packages/
+
+chmod 755 %{buildroot}%{_bindir}/{idle,modulator,pynche}2.4
ln -f Tools/modulator/README Tools/modulator/README.modulator
ln -f Tools/pynche/README Tools/pynche/README.pynche
rm -f modules-list.full
-for n in $RPM_BUILD_ROOT%{_libdir}/python%{dirver}/*; do
+for n in %{buildroot}%{_libdir}/python%{dirver}/*; do
[ -d $n ] || echo $n
done >> modules-list.full
-for mod in $RPM_BUILD_ROOT%{_libdir}/python%{dirver}/lib-dynload/* ; do
+for mod in %{buildroot}%{_libdir}/python%{dirver}/lib-dynload/* ; do
[ `basename $mod` = _tkinter.so ] || echo $mod
done >> modules-list.full
-sed -e "s|$RPM_BUILD_ROOT||g" < modules-list.full > modules-list
-
-
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
-cat > $RPM_BUILD_ROOT%{_datadir}/applications/mandriva-tkinter2.4.desktop << EOF
+sed -e "s|%{buildroot}||g" < modules-list.full > modules-list
+
+
+mkdir -p %{buildroot}%{_datadir}/applications
+cat > %{buildroot}%{_datadir}/applications/mandriva-tkinter2.4.desktop << EOF
[Desktop Entry]
Encoding=UTF-8
Name=IDLE
@@ -268,7 +290,7 @@
EOF
-cat > $RPM_BUILD_ROOT%{_datadir}/applications/mandriva-%{name}-docs.desktop << EOF
+cat > %{buildroot}%{_datadir}/applications/mandriva-%{name}-docs.desktop << EOF
[Desktop Entry]
Encoding=UTF-8
Name=Python documentation
@@ -281,10 +303,11 @@
EOF
rm -f include.list main.list
-bzcat %{SOURCE2} | sed 's@%%{_libdir}@%{_libdir}@' > include.list
+sed 's@%%{_libdir}@%{_libdir}@' < %{SOURCE2} > include.list
cat >> modules-list << EOF
%{_bindir}/python2.4
-%{_bindir}/pydoc
+%{_bindir}/pydoc2.4
+%{_mandir}/man1/python*
%{_libdir}/python*/bsddb/
%{_libdir}/python*/curses/
%{_libdir}/python*/distutils/
@@ -297,38 +320,39 @@
%{_libdir}/python*/hotshot/
%{_libdir}/python*/site-packages/README
%{_libdir}/python*/plat-linux2/
-EOF
-
-LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_bindir}/python %{SOURCE3} $RPM_BUILD_ROOT include.list modules-list > main.list
+%{_datadir}/emacs/site-lisp/python2.4-mode.el*
+EOF
+
+LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}%{_bindir}/python2.4 %{SOURCE3} %{buildroot} include.list modules-list > main.list
# fix non real scripts
-chmod 644 $RPM_BUILD_ROOT%{_libdir}/python*/test/test_{binascii,grp,htmlparser}.py*
+chmod 644 %{buildroot}%{_libdir}/python*/test/test_{binascii,grp,htmlparser}.py*
# fix python library not stripped
-chmod u+w $RPM_BUILD_ROOT%{_libdir}/libpython2.4.so.1.0
-
-
-mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/
-
-cat > $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/python.sh << EOF
+chmod u+w %{buildroot}%{_libdir}/libpython2.4.so.1.0
+
+
+mkdir -p %{buildroot}%{_sysconfdir}/profile.d/
+
+cat > %{buildroot}%{_sysconfdir}/profile.d/python2.4.sh << EOF
#!/bin/sh
-if [ -f \$HOME/.pythonrc.py ] ; then
- export PYTHONSTARTUP=\$HOME/.pythonrc.py
+if [ -f \$HOME/.python2.4rc.py ] ; then
+ export PYTHONSTARTUP=\$HOME/.python2.4rc.py
else
- export PYTHONSTARTUP=/etc/pythonrc.py
+ export PYTHONSTARTUP=/etc/python2.4rc.py
fi
EOF
-cat > $RPM_BUILD_ROOT/%{_sysconfdir}/profile.d/python.csh << EOF
-if ( -f \${HOME}/.pythonrc.py ) then
- setenv PYTHONSTARTUP \${HOME}/.pythonrc.py
+cat > %{buildroot}/%{_sysconfdir}/profile.d/python2.4.csh << EOF
+if ( -f \${HOME}/.python2.4rc.py ) then
+ setenv PYTHONSTARTUP \${HOME}/.python2.4rc.py
else
- setenv PYTHONSTARTUP /etc/pythonrc.py
+ setenv PYTHONSTARTUP /etc/python2.4rc.py
endif
EOF
-cat > $RPM_BUILD_ROOT%{_sysconfdir}/pythonrc.py << EOF
+cat > %{buildroot}%{_sysconfdir}/python2.4rc.py << EOF
try:
# this add completion to python interpreter
import readline
@@ -338,13 +362,13 @@
readline.parse_and_bind("tab: complete")
except:
pass
-# you can place a file .pythonrc.py in your home to overrides this one
+# you can place a file .python2.4rc.py in your home to overrides this one
# but then, this file will not be sourced
EOF
-chmod ugo+rx $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/*
-
-cat > README.mdk << EOF
+chmod ugo+rx %{buildroot}%{_sysconfdir}/profile.d/*
+
+cat > README.mdv << EOF
Python interpreter support readline completion by default.
This is only used with the interpreter. In order to remove it,
you can :
@@ -353,30 +377,30 @@
3) change /etc/pythonrc.py
EOF
-# Remove files which should not conflict with existing python 2.5
-rm -f $RPM_BUILD_ROOT/usr/bin/python
-mv $RPM_BUILD_ROOT/usr/share/man/man1/python.1 $RPM_BUILD_ROOT/usr/share/man/man1/python24.1
-
-%multiarch_includes $RPM_BUILD_ROOT/usr/include/python*/pyconfig.h
+# Rename files which conflict with existing python 2.5
+mv %{buildroot}%{_mandir}/man1/python.1 %{buildroot}%{_mandir}/man1/python2.4.1
+
+%multiarch_includes %{buildroot}/usr/include/python*/pyconfig.h
%clean
-rm -rf $RPM_BUILD_ROOT
+rm -rf %{buildroot}
rm -f modules-list main.list
%files -f main.list
-%defattr(-, root, root, 755)
-%doc README.mdk
+%defattr(-,root,root)
+%doc README.mdv
%dir %{_libdir}/python*/lib-dynload
%dir %{_libdir}/python*/site-packages
-%{_sysconfdir}/profile.d/python.*
-%config(noreplace) %{_sysconfdir}/pythonrc.py
+%config(noreplace) %{_sysconfdir}/emacs/site-start.d/%{name}.el
+%{_sysconfdir}/profile.d/python2.4.*
+%config(noreplace) %{_sysconfdir}/python2.4rc.py
%files -n %{lib_name}
%defattr(-,root,root)
%{_libdir}/libpython*.so.1*
%files -n %{lib_name}-devel
-%defattr(-, root, root, 755)
+%defattr(-,root,root)
%{_libdir}/libpython*.so
%dir %{_includedir}/python*
%multiarch %multiarch_includedir/python*/pyconfig.h
@@ -386,12 +410,12 @@
%files docs
-%defattr(-,root,root,755)
+%defattr(-,root,root)
%doc html/*/*
%{_datadir}/applications/mandriva-%{name}-docs.desktop
-%files -n tkinter%{lib_major}
-%defattr(-, root, root, 755)
+%files -n tkinter2.4
+%defattr(-,root,root)
%dir %{_libdir}/python*/lib-tk
%{_libdir}/python*/lib-tk/*.py*
%{_libdir}/python*/lib-dynload/_tkinter.so
@@ -404,42 +428,47 @@
%{_datadir}/applications/mandriva-tkinter2.4.desktop
%files base -f include.list
-%defattr(-, root, root, 755)
+%defattr(-,root,root)
%dir %{_libdir}/python*
-%{_mandir}/man1/python24.1.bz2
%post -n %{lib_name} -p /sbin/ldconfig
%postun -n %{lib_name} -p /sbin/ldconfig
-%post -n tkinter%{lib_major}
+%post -n tkinter2.4
%update_menus
-%postun -n tkinter%{lib_major}
+%postun -n tkinter2.4
%clean_menus
+
+
%changelog
-* Tue Jul 31 2007 Kazuhiko Shiozaki <kazuhiko at nexedi.com> 2.4.3-4.2mdv2007.1
-- rename binaries in tkinter2.4 package to avoid conflicts with tkinter
- package
-
-* Tue May 29 2007 Kazuhiko Shiozaki <kazuhiko at nexedi.com> 2.4.3-4.1mdv2007.1
-- python2.4 provides python and python2.4-base provides python-base
-
-* Sun May 13 2007 Jean-Paul Smets <jp at nexedi.com> 2.4.3-4mdv2007.0
-- port of python 2.4 to future mandriva releases so that
- applications based on python2.4 such as ERP5 may still run
-- Renames packages from python-xxx to python2.4-xxx
-- Do not install emacs mode (since it is already provided by default python)
-- Rename man (since it is already provided by default python)
-- Do not install /usr/bin/python and removed it from include.list
- (since it is already provided by default python)
-- TODO: rename of remove tkinter
-
-* Tue Jan 30 2007 Kevin Deldycke <kevin at nexedi.com> 2.4.3-4mdv2007.0
-- P9: tarfile.py is broken in 2.4.3 release of python, revert it to 2.4.1 python release
-
-* Fri Oct 06 2006 Vincent Danen <vdanen at mandriva.com> 2.4.3-3.1mdv2007.0
-- P8: security fix for CVE-2006-4980
+* Wed Oct 17 2007 Kazuhiko Shiozaki <kazuhiko at nexedi.com> 2.4.4-5.1mdv2007.1
+- import 2.4.4-5mdv2008.0
+- disable test_sax because it will fail if python2.4-pyxml is already installed
+- apply a patch for tarfile
+
+* Sat Sep 15 2007 Guillaume Rousse <guillomovitch at mandriva.org> 2.4.4-5mdv2008.0
++ Revision: 86240
+- finally provide exact version and release in python virtual package
+
+* Sat Sep 15 2007 Guillaume Rousse <guillomovitch at mandriva.org> 2.4.4-4mdv2008.0
++ Revision: 85927
+- make devel package provide python-devel
+
+* Thu Sep 13 2007 Guillaume Rousse <guillomovitch at mandriva.org> 2.4.4-3mdv2008.0
++ Revision: 84937
+- fix conflict with python package
+
+* Mon Sep 10 2007 Guillaume Rousse <guillomovitch at mandriva.org> 2.4.4-2mdv2008.0
++ Revision: 84144
+- fix libraries and tkinter packages names
+- unused anymore
+
+* Mon Sep 10 2007 Guillaume Rousse <guillomovitch at mandriva.org> 2.4.4-1mdv2008.0
++ Revision: 84010
+- import python2.4
+
* Mon Sep 18 2006 Gwenole Beauchesne <gbeauchesne at mandriva.com> 2.4.3-3mdv2007.0
- Rebuild
@@ -496,7 +525,7 @@
* Tue May 10 2005 Michael Scherer <misc at mandriva.org> 2.4.1-1mdk
- New release 2.4.1
-- use %check
+- use %%check
- remove patch 6, applied upstream
* Sat Feb 12 2005 Frederic Lepied <flepied at mandrakesoft.com> 2.4-5mdk
More information about the Erp5-report
mailing list