From af3c1197affa9ba68f123b17805356c7694557b5 Mon Sep 17 00:00:00 2001 From: Matej Stuchlik Date: Jul 29 2013 10:53:14 +0000 Subject: 2.0.2 --- diff --git a/.gitignore b/.gitignore index 4c551cc..63a65d6 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ /release-1.7.tar.bz2 /release-1.8.tar.bz2 /release-1.9.tar.bz2 +/release-2.0-beta-1.tar.bz2 +/release-2.0.2.tar.bz2 diff --git a/006-always-log-stdout.patch b/006-always-log-stdout.patch new file mode 100644 index 0000000..5d49335 --- /dev/null +++ b/006-always-log-stdout.patch @@ -0,0 +1,12 @@ +diff -rup pypy-pypy-f66246c46ca3/rpython/translator/platform/__init__.py pypy-pypy-f66246c46ca3/rpython/translator/platform/__init__.py +--- pypy-pypy-f66246c46ca3/rpython/translator/platform/__init__.py 2013-05-27 10:35:37.680237338 +0200 ++++ pypy-pypy-f66246c46ca3/rpython/translator/platform/__init__.py 2013-05-27 10:41:04.113098738 +0200 +@@ -138,6 +138,8 @@ class Platform(object): + self._handle_error(returncode, stdout, stderr, outname) + + def _handle_error(self, returncode, stdout, stderr, outname): ++ for line in stdout.splitlines(): ++ log.message(line) + if returncode != 0: + errorfile = outname.new(ext='errors') + errorfile.write(stderr, 'wb') diff --git a/007-remove-startup-message.patch b/007-remove-startup-message.patch new file mode 100644 index 0000000..1dddb69 --- /dev/null +++ b/007-remove-startup-message.patch @@ -0,0 +1,12 @@ +diff -rup pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py +--- pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py 2013-05-27 10:35:37.612236951 +0200 ++++ pypy-pypy-f66246c46ca3/lib_pypy/_pypy_interact.py 2013-05-27 10:37:25.602852747 +0200 +@@ -4,7 +4,7 @@ import sys + import os + + +-def interactive_console(mainmodule=None, quiet=False): ++def interactive_console(mainmodule=None, quiet=True): + # set sys.{ps1,ps2} just before invoking the interactive interpreter. This + # mimics what CPython does in pythonrun.c + if not hasattr(sys, 'ps1'): diff --git a/008-fix-dynamic-symbols-script.patch b/008-fix-dynamic-symbols-script.patch new file mode 100644 index 0000000..5b1d551 --- /dev/null +++ b/008-fix-dynamic-symbols-script.patch @@ -0,0 +1,15 @@ +diff --git a/pypy/translator/platform/posix.py b/pypy/translator/platform/posix.py +--- a/pypy/translator/platform/posix.py ++++ b/pypy/translator/platform/posix.py +@@ -48,8 +48,10 @@ + response_file = self._make_response_file("dynamic-symbols-") + f = response_file.open("w") + f.write("{\n") ++ f.write(" global:\n") + for sym in eci.export_symbols: +- f.write("%s;\n" % (sym,)) ++ f.write(" %s;\n" % (sym,)) ++ f.write(" local:*;\n") + f.write("};") + f.close() + diff --git a/config.patch b/config.patch index a11f397..bf81d7d 100644 --- a/config.patch +++ b/config.patch @@ -1,7 +1,7 @@ -diff -up pypy-pypy-2346207d9946/pypy/translator/platform/linux.py.configure-fedora pypy-pypy-2346207d9946/pypy/translator/platform/linux.py ---- pypy-pypy-2346207d9946/pypy/translator/platform/linux.py.configure-fedora 2012-02-09 13:27:19.000000000 -0500 -+++ pypy-pypy-2346207d9946/pypy/translator/platform/linux.py 2012-02-10 09:06:20.393066016 -0500 -@@ -31,13 +31,14 @@ class BaseLinux(BasePosix): +diff -rup pypy-pypy-f66246c46ca3/rpython/translator/platform/linux.py pypy-pypy-f66246c46ca3/rpython/translator/platform/linux.py +--- pypy-pypy-f66246c46ca3/rpython/translator/platform/linux.py 2013-05-27 10:35:37.679237332 +0200 ++++ pypy-pypy-f66246c46ca3/rpython/translator/platform/linux.py 2013-05-27 10:47:41.506354482 +0200 +@@ -32,19 +32,20 @@ class BaseLinux(BasePosix): return self._pkg_config("libffi", "--libs-only-L", ['/usr/lib/libffi']) @@ -9,15 +9,27 @@ diff -up pypy-pypy-2346207d9946/pypy/translator/platform/linux.py.configure-fedo - # places where we need to look for libffi.a - # XXX obscuuure! only look for libffi.a if run with translate.py - if 'translate' in sys.modules: -- return self.library_dirs_for_libffi() + ['/usr/lib'] +- if sys.maxint > 2**32: +- host = 'x86_64' +- else: +- host = 'x86' +- return self.library_dirs_for_libffi() + [ +- '/usr/lib', +- '/usr/lib/%s-linux-gnu/' % host] - else: - return [] -+ # Fedora, at least, has the shared version but not the static: ++ #Fedora, at least, has the shared version but not the static: + #def library_dirs_for_libffi_a(self): + # # places where we need to look for libffi.a + # # XXX obscuuure! only look for libffi.a if run with translate.py + # if 'translate' in sys.modules: -+ # return self.library_dirs_for_libffi() + ['/usr/lib'] ++ # if sys.maxint > 2**32: ++ # host = 'x86_64' ++ # else: ++ # host = 'x86' ++ # return self.library_dirs_for_libffi() + [ ++ # '/usr/lib', ++ # '/usr/lib/%s-linux-gnu/' % host] + # else: + # return [] diff --git a/pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch b/pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch index 257f60f..c97eaf3 100644 --- a/pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch +++ b/pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch @@ -1,7 +1,6 @@ -diff --git a/pypy/tool/ansi_print.py b/pypy/tool/ansi_print.py -index 3eff27c..fac4ba2 100644 ---- a/pypy/tool/ansi_print.py -+++ b/pypy/tool/ansi_print.py +diff -rup pypy-pypy-f66246c46ca3/rpython/tool/ansi_print.py pypy-pypy-f66246c46ca3/rpython/tool/ansi_print.py +--- pypy-pypy-f66246c46ca3/rpython/tool/ansi_print.py 2013-05-27 10:35:37.648237156 +0200 ++++ pypy-pypy-f66246c46ca3/rpython/tool/ansi_print.py 2013-05-28 10:15:58.200426205 +0200 @@ -25,7 +25,7 @@ class AnsiLog: self.kw_to_color = self.KW_TO_COLOR.copy() self.kw_to_color.update(kw_to_color) diff --git a/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch b/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch index 9071be5..2391f32 100644 --- a/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch +++ b/pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch @@ -1,6 +1,7 @@ ---- pypy-pypy-2346207d9946/lib-python/2.7/test/test_subprocess.py.orig 2012-02-09 13:27:19.000000000 -0500 -+++ pypy-pypy-2346207d9946/lib-python/2.7/test/test_subprocess.py 2012-02-10 09:14:08.312216221 -0500 -@@ -570,7 +570,7 @@ class ProcessTestCase(BaseTestCase): +diff -rup pypy-pypy-f66246c46ca3/lib-python/2.7/test/test_subprocess.py pypy-pypy-f66246c46ca3/lib-python/2.7/test/test_subprocess.py +--- pypy-pypy-f66246c46ca3/lib-python/2.7/test/test_subprocess.py 2013-05-27 10:35:37.762237806 +0200 ++++ pypy-pypy-f66246c46ca3/lib-python/2.7/test/test_subprocess.py 2013-05-28 10:13:03.182536196 +0200 +@@ -587,7 +587,7 @@ class ProcessTestCase(BaseTestCase): for i in range(1024): # Windows raises IOError. Others raise OSError. with self.assertRaises(EnvironmentError) as c: diff --git a/pypy.spec b/pypy.spec index 80b4039..eecce09 100644 --- a/pypy.spec +++ b/pypy.spec @@ -1,5 +1,7 @@ +%global alphatag b1 + Name: pypy -Version: 1.9 +Version: 2.0.2 Release: 1%{?dist} Summary: Python implementation with a Just-In-Time compiler @@ -121,7 +123,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %global pylibver 2.7 # We refer to this subdir of the source tree in a few places during the build: -%global goal_dir pypy/translator/goal +%global goal_dir pypy/goal # Turn off the brp-python-bytecompile postprocessing script @@ -130,7 +132,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') # Source and patches: -Source0: https://bitbucket.org/pypy/pypy/get/release-%{version}.tar.bz2 +Source0: https://bitbucket.org/pypy/pypy/get/release-2.0.2.tar.bz2 # Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -164,6 +166,18 @@ Patch4: more-readable-c-code.patch # Not yet sent upstream Patch5: pypy-1.6-fix-test-subprocess-with-nonreadable-path-dir.patch +# Patch pypy.translator.platform so that stdout from "make" etc gets logged, +# rather than just stderr, so that the command-line invocations of the compiler +# and linker are captured: +Patch6: 006-always-log-stdout.patch + +# Disable the printing of a quote from IRC on startup (these are stored in +# ROT13 form in lib_pypy/_pypy_irc_topic.py). Some are cute, but some could +# cause confusion for end-users (and many are in-jokes within the PyPy +# community that won't make sense outside of it). [Sorry to be a killjoy] +Patch7: 007-remove-startup-message.patch + + # Build-time requirements: # pypy's can be rebuilt using itself, rather than with CPython; doing so @@ -320,7 +334,7 @@ Build of PyPy with support for micro-threads for massive concurrency %prep -%setup -q -n pypy-pypy-341e1e3821ff +%setup -q -n pypy-pypy-f66246c46ca3 %patch0 -p1 -b .configure-fedora %patch1 -p1 -b .suppress-mandelbrot-set-during-tty-build @@ -358,6 +372,9 @@ Build of PyPy with support for micro-threads for massive concurrency # [translation:ERROR] AttributeError: 'Block' object has no attribute 'isstartblock' %patch5 -p1 +%patch6 -p1 +%patch7 -p1 + # Replace /usr/local/bin/python shebangs with /usr/bin/python: find -name "*.py" -exec \ @@ -375,9 +392,7 @@ find . -path '*/.svn*' -delete # Remove DOS batch files: find -name "*.bat"|xargs rm -f -# The "demo" directory gets auto-installed by virture of being listed in %doc -# Remove shebang lines from demo .py files, and remove executability from them: -for f in demo/bpnn.py ; do +for f in rpython/translator/goal/bpnn.py ; do # Detect shebang lines && remove them: sed -e '/^#!/Q 0' -e 'Q 1' $f \ && sed -i '1d' $f @@ -471,7 +486,7 @@ BuildPyPy() { # The generated C code leads to many thousands of warnings of the form: # warning: variable 'l_v26003' set but not used [-Wunused-but-set-variable] # Suppress them: - export CFLAGS=$(echo "$CFLAGS" -Wno-unused) + export CFLAGS=$(echo "$CFLAGS" -Wno-unused -fPIC) # If we're already built the JIT-enabled "pypy", then use it for subsequent # builds (of other configurations): @@ -489,15 +504,11 @@ BuildPyPy() { RPM_BUILD_ROOT= \ PYPY_USESSION_DIR=$(pwd) \ PYPY_USESSION_BASENAME=$ExeName \ - $INTERP translate.py \ -%if 0%{verbose_logs} - --translation-verbose \ -%endif - --cflags="$CFLAGS" \ - --batch \ + $INTERP ../../rpython/bin/rpython \ --output=$ExeName \ %{gcrootfinder_options} \ - $Options + $Options \ + targetpypystandalone echo "--------------------------------------------------------------" echo "--------------------------------------------------------------" @@ -526,7 +537,7 @@ BuildPyPy \ %endif %if %{with_emacs} -%{_emacs_bytecompile} pypy/jit/tool/pypytrace-mode.el +%{_emacs_bytecompile} rpython/jit/tool/pypytrace-mode.el %endif %install @@ -593,6 +604,10 @@ cp -a lib_pypy %{buildroot}/%{pypyprefix} # Remove a text file that documents which selftests fail on Win32: rm %{buildroot}/%{pypyprefix}/lib-python/win32-failures.txt +# Remove a text file containing upstream's recipe for syncing stdlib in +# their hg repository with cpython's: +rm %{buildroot}/%{pypyprefix}/lib-python/stdlib-upgrade.txt + # Remove shebang lines from .py files that aren't executable, and # remove executability from .py files that don't have a shebang line: find \ @@ -696,15 +711,31 @@ mkdir -p %{buildroot}%{pypy_debuginfo_dir} # copy over everything: cp -a pypy %{buildroot}%{pypy_debuginfo_dir} -# ...then delete files that aren't .py files: +# ...then delete files that aren't: +# - *.py files +# - the Makefile +# - typeids.txt +# - dynamic-symbols-* find \ - %{buildroot}%{pypy_debuginfo_dir} \ - \( -type f \ - -a \ - \! -name "*.py" \ - \) \ + %{buildroot}%{pypy_debuginfo_dir} \ + \( -type f \ + -a \ + \! \( -name "*.py" \ + -o \ + -name "Makefile" \ + -o \ + -name "typeids.txt" \ + -o \ + -name "dynamic-symbols-*" \ + \) \ + \) \ -delete +# Alternatively, we could simply keep everything. This leads to a ~350MB +# debuginfo package, but it makes it easy to hack on the Makefile and C build +# flags by rebuilding/linking the sources. +# To do so, remove the above "find" command. + # We don't need bytecode for these files; they are being included for reference # purposes. # There are some rpmlint warnings from these files: @@ -719,7 +750,7 @@ find \ # Install the JIT trace mode for Emacs: %if %{with_emacs} mkdir -p %{buildroot}/%{_emacs_sitelispdir} -cp -a pypy/jit/tool/pypytrace-mode.el* %{buildroot}/%{_emacs_sitelispdir} +cp -a rpython/jit/tool/pypytrace-mode.el* %{buildroot}/%{_emacs_sitelispdir} %endif # Install macros for rpm: @@ -855,7 +886,7 @@ rm -rf $RPM_BUILD_ROOT %files libs %defattr(-,root,root,-) -%doc LICENSE README demo +%doc LICENSE README.rst %dir %{pypyprefix} %dir %{pypyprefix}/lib-python @@ -871,7 +902,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) -%doc LICENSE README +%doc LICENSE README.rst %{_bindir}/pypy %{pypyprefix}/pypy @@ -884,12 +915,15 @@ rm -rf $RPM_BUILD_ROOT %if 0%{with_stackless} %files stackless %defattr(-,root,root,-) -%doc LICENSE README +%doc LICENSE README.rst %{_bindir}/pypy-stackless %endif %changelog +* Mon Jul 29 2013 Matej Stuchlik - 2.0.2-1 +- 2.0.2 + * Fri Jun 8 2012 David Malcolm - 1.9-1 - 1.9 diff --git a/sources b/sources index 2a64332..a37f747 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f92c0171a9578a3e4a0f74947ec596ab release-1.9.tar.bz2 +328a509c092b5477f99be8dd452d81c2 release-2.0.2.tar.bz2