diff --git a/pypy-r72073-fix-build-on-python-2.6.5.patch b/pypy-r72073-fix-build-on-python-2.6.5.patch new file mode 100644 index 0000000..de4fe47 --- /dev/null +++ b/pypy-r72073-fix-build-on-python-2.6.5.patch @@ -0,0 +1,45 @@ +Index: module/posix/test/test_posix2.py +=================================================================== +--- module/posix/test/test_posix2.py (revision 72072) ++++ module/posix/test/test_posix2.py (revision 72073) +@@ -195,6 +195,11 @@ + f = posix.fdopen(fd, "r") + f.close() + ++ def test_getcwd(self): ++ assert isinstance(self.posix.getcwd(), str) ++ assert isinstance(self.posix.getcwdu(), unicode) ++ assert self.posix.getcwd() == self.posix.getcwdu() ++ + def test_listdir(self): + pdir = self.pdir + posix = self.posix +Index: module/posix/__init__.py +=================================================================== +--- module/posix/__init__.py (revision 72072) ++++ module/posix/__init__.py (revision 72073) +@@ -50,6 +50,7 @@ + 'unlink' : 'interp_posix.unlink', + 'remove' : 'interp_posix.remove', + 'getcwd' : 'interp_posix.getcwd', ++ 'getcwdu' : 'interp_posix.getcwdu', + 'chdir' : 'interp_posix.chdir', + 'mkdir' : 'interp_posix.mkdir', + 'rmdir' : 'interp_posix.rmdir', +Index: module/posix/interp_posix.py +=================================================================== +--- module/posix/interp_posix.py (revision 72072) ++++ module/posix/interp_posix.py (revision 72073) +@@ -315,6 +315,12 @@ + return space.wrap(cur) + getcwd.unwrap_spec = [ObjSpace] + ++def getcwdu(space): ++ """Return the current working directory as a unicode string.""" ++ # XXX ascii encoding for now ++ return space.call_method(getcwd(space), 'decode') ++getcwdu.unwrap_spec = [ObjSpace] ++ + def chdir(space, path): + """Change the current working directory to the specified path.""" + try: diff --git a/pypy.spec b/pypy.spec index 7d8e4ed..e70fdf5 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,6 +1,6 @@ Name: pypy Version: 1.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Implementation of the Python language, using Python itself Group: Development/Languages @@ -132,6 +132,10 @@ Source0: %{name}-%{version}-src.tar.bz2 Patch1: pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch +# Cherrypick r72073 from upstream SVN in order to fix the build on Python 2.6.5 +# https://codespeak.net/viewvc/?view=rev&revision=72073 +Patch2: pypy-r72073-fix-build-on-python-2.6.5.patch + # Build-time requirements: BuildRequires: python-devel @@ -203,6 +207,9 @@ Build of PyPy with support for micro-threads for massive concurrency %prep %setup -q %patch1 -p1 -b .suppress-mandelbrot-set-during-tty-build +pushd pypy +%patch2 -p0 +popd # Replace /usr/local/bin/python shebangs with /usr/bin/python: find -name "*.py" -exec \ @@ -389,6 +396,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue May 4 2010 David Malcolm - 1.2-2 +- cherrypick r72073 from upstream SVN in order to fix the build against +python 2.6.5 (patch 2) + * Wed Apr 28 2010 David Malcolm - 1.2-1 - initial packaging