f756cfc
Name:           pypy
Matej Stuchlik 2cbecfd
Version:        2.2.1
Matej Stuchlik febbbdb
Release:        1%{?dist}
f756cfc
Summary:        Python implementation with a Just-In-Time compiler
f756cfc
f756cfc
Group:          Development/Languages
f756cfc
# LGPL and another free license we'd need to ask spot about are present in some
f756cfc
# java jars that we're not building with atm (in fact, we're deleting them
f756cfc
# before building).  If we restore those we'll have to work out the new
f756cfc
# licensing terms
f756cfc
License:        MIT and Python and UCD
f756cfc
URL:            http://pypy.org/
f756cfc
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
f756cfc
f756cfc
# High-level configuration of the build:
f756cfc
f756cfc
# PyPy consists of an implementation of an interpreter (with JIT compilation)
f756cfc
# for the full Python language  written in a high-level language, leaving many
f756cfc
# of the implementation details as "pluggable" policies.
f756cfc
#
f756cfc
# The implementation language is then compiled down to .c code, from which we
f756cfc
# obtain a binary.
f756cfc
#
f756cfc
# This allows us to build a near-arbitrary collection of different
f756cfc
# implementations of Python with differing tradeoffs
f756cfc
#
f756cfc
# (As it happens, the implementation language is itself Python, albeit a
f756cfc
# restricted subset "RPython", chosen to making it amenable to being compiled.
f756cfc
# The result implements the full Python language though)
f756cfc
f756cfc
# We could build many different implementations of Python.
f756cfc
# For now, let's focus on the implementation that appears to be receiving the
f756cfc
# most attention upstream: the JIT-enabled build, with all standard
f756cfc
# optimizations
f756cfc
f756cfc
# Building a configuration can take significant time:
f756cfc
f756cfc
# A build of pypy (with jit) on i686 took 77 mins:
f756cfc
#  [Timer] Timings:
f756cfc
#  [Timer] annotate                       ---  583.3 s
f756cfc
#  [Timer] rtype_lltype                   ---  760.9 s
f756cfc
#  [Timer] pyjitpl_lltype                 ---  567.3 s
f756cfc
#  [Timer] backendopt_lltype              ---  375.6 s
f756cfc
#  [Timer] stackcheckinsertion_lltype     ---   54.1 s
f756cfc
#  [Timer] database_c                     ---  852.2 s
f756cfc
#  [Timer] source_c                       --- 1007.3 s
f756cfc
#  [Timer] compile_c                      ---  419.9 s
f756cfc
#  [Timer] ===========================================
f756cfc
#  [Timer] Total:                         --- 4620.5 s
f756cfc
#
f756cfc
# A build of pypy (nojit) on x86_64 took about an hour:
f756cfc
#  [Timer] Timings:
f756cfc
#  [Timer] annotate                       ---  537.5 s
f756cfc
#  [Timer] rtype_lltype                   ---  667.3 s
f756cfc
#  [Timer] backendopt_lltype              ---  385.4 s
f756cfc
#  [Timer] stackcheckinsertion_lltype     ---   42.5 s
f756cfc
#  [Timer] database_c                     ---  625.3 s
f756cfc
#  [Timer] source_c                       --- 1040.2 s
f756cfc
#  [Timer] compile_c                      ---  273.9 s
f756cfc
#  [Timer] ===========================================
f756cfc
#  [Timer] Total:                         --- 3572.0 s
f756cfc
#
f756cfc
#
f756cfc
# A build of pypy-stackless on i686 took about 87 mins:
f756cfc
#  [Timer] Timings:
f756cfc
#  [Timer] annotate                       ---  584.2 s
f756cfc
#  [Timer] rtype_lltype                   ---  777.3 s
f756cfc
#  [Timer] backendopt_lltype              ---  365.9 s
f756cfc
#  [Timer] stackcheckinsertion_lltype     ---   39.3 s
f756cfc
#  [Timer] database_c                     --- 1089.6 s
f756cfc
#  [Timer] source_c                       --- 1868.6 s
f756cfc
#  [Timer] compile_c                      ---  490.4 s
f756cfc
#  [Timer] ===========================================
f756cfc
#  [Timer] Total:                         --- 5215.3 s
f756cfc
f756cfc
3ca83f1
# We will build a "pypy" binary.
3ca83f1
#
3ca83f1
# Unfortunately, the JIT support is only available on some architectures.
3ca83f1
#
f756cfc
# pypy-1.4/pypy/jit/backend/detect_cpu.py:getcpuclassname currently supports the
f756cfc
# following options:
f756cfc
#  'i386', 'x86'
f756cfc
#  'x86-without-sse2':
f756cfc
#  'x86_64'
f756cfc
#  'cli'
f756cfc
#  'llvm'
3ca83f1
#
3ca83f1
# We will only build with JIT support on those architectures, and build without
3ca83f1
# it on the other archs.  The resulting binary will typically be slower than
3ca83f1
# CPython for the latter case.
3ca83f1
#
f756cfc
%ifarch %{ix86} x86_64
f756cfc
# FIXME: is there a better way of expressing "intel" here?
f756cfc
%global with_jit 1
f756cfc
%else
f756cfc
%global with_jit 0
f756cfc
%endif
f756cfc
f756cfc
# Should we build a "pypy-stackless" binary?
f756cfc
%global with_stackless 0
f756cfc
2d36a5e
# Should we build the emacs JIT-viewing mode?
2d36a5e
%if 0%{?rhel} == 5 || 0%{?rhel} == 6
2d36a5e
%global with_emacs 0
2d36a5e
%else
2d36a5e
%global with_emacs 1
2d36a5e
%endif
f756cfc
f756cfc
# Easy way to enable/disable verbose logging:
f756cfc
%global verbose_logs 0
f756cfc
416c353
# Forcibly use the shadow-stack option for detecting GC roots, rather than
416c353
# relying on hacking up generated assembler with regexps:
416c353
%global shadow_stack 1
416c353
3a2c2ec
# Easy way to turn off the selftests:
3a2c2ec
%global run_selftests 1
3a2c2ec
f756cfc
%global pypyprefix %{_libdir}/pypy-%{version}
169de85
%global pylibver 2.7
f756cfc
f756cfc
# We refer to this subdir of the source tree in a few places during the build:
Matej Stuchlik c3a10ad
%global goal_dir pypy/goal
f756cfc
f756cfc
f756cfc
# Turn off the brp-python-bytecompile postprocessing script
f756cfc
# We manually invoke it later on, using the freshly built pypy binary
f756cfc
%global __os_install_post \
f756cfc
  %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
f756cfc
f756cfc
# Source and patches:
Matej Stuchlik 2cbecfd
Source0:	https://bitbucket.org/pypy/pypy/downloads/pypy-2.2.1-src.tar.bz2
f756cfc
afabd9d
# Supply various useful RPM macros for building python modules against pypy:
afabd9d
#  __pypy, pypy_sitelib, pypy_sitearch
Matej Stuchlik febbbdb
Source2: macros.pypy
f756cfc
f756cfc
# By default, if built at a tty, the translation process renders a Mandelbrot
f756cfc
# set to indicate progress.
f756cfc
# This obscures useful messages, and may waste CPU cycles, so suppress it, and
f756cfc
# merely render dots:
Matej Stuchlik febbbdb
Patch0: pypy-1.2-suppress-mandelbrot-set-during-tty-build.patch
00e57e7
26f6230
# Patch pypy.translator.platform so that stdout from "make" etc gets logged,
26f6230
# rather than just stderr, so that the command-line invocations of the compiler
26f6230
# and linker are captured:
Matej Stuchlik febbbdb
Patch1: 006-always-log-stdout.patch
26f6230
26f6230
# Disable the printing of a quote from IRC on startup (these are stored in
26f6230
# ROT13 form in lib_pypy/_pypy_irc_topic.py).  Some are cute, but some could
26f6230
# cause confusion for end-users (and many are in-jokes within the PyPy
26f6230
# community that won't make sense outside of it).  [Sorry to be a killjoy]
Matej Stuchlik febbbdb
Patch2: 007-remove-startup-message.patch
26f6230
26f6230
f756cfc
# Build-time requirements:
f756cfc
00e57e7
# pypy's can be rebuilt using itself, rather than with CPython; doing so
00e57e7
# halves the build time.
00e57e7
#
00e57e7
# Turn it off with this boolean, to revert back to rebuilding using CPython
00e57e7
# and avoid a cycle in the build-time dependency graph:
c225b1c
Matej Stuchlik 66ffb91
%global use_self_when_building 0
00e57e7
%if 0%{use_self_when_building}
00e57e7
BuildRequires: pypy
00e57e7
%global bootstrap_python_interp pypy
00e57e7
%else
009aeb1
009aeb1
# Python 2.6 or later is needed, so on RHEL5 (2.4) we need to use the alternate
009aeb1
# python26 rpm:
009aeb1
%if 0%{?rhel} == 5
009aeb1
BuildRequires: python26-devel
009aeb1
%global bootstrap_python_interp python26
009aeb1
%else
00e57e7
BuildRequires: python-devel
00e57e7
%global bootstrap_python_interp python
00e57e7
%endif
00e57e7
009aeb1
%endif
00e57e7
f756cfc
BuildRequires:  libffi-devel
Matej Stuchlik a79a105
BuildRequires:  tcl-devel
Matej Stuchlik a79a105
BuildRequires:  tk-devel
Matej Stuchlik a79a105
Matej Stuchlik a79a105
BuildRequires:  sqlite-devel
f756cfc
f756cfc
BuildRequires:  zlib-devel
f756cfc
BuildRequires:  bzip2-devel
f756cfc
BuildRequires:  ncurses-devel
f756cfc
BuildRequires:  expat-devel
f756cfc
BuildRequires:  openssl-devel
d39359a
%ifarch %{ix86} x86_64 ppc ppc64 s390x
f756cfc
BuildRequires:  valgrind-devel
d39359a
%endif
f756cfc
3a2c2ec
%if %{run_selftests}
f756cfc
# Used by the selftests, though not by the build:
f756cfc
BuildRequires:  gc-devel
f756cfc
3a2c2ec
# For use in the selftests, for recording stats:
3a2c2ec
BuildRequires:  time
3a2c2ec
3a2c2ec
# For use in the selftests, for imposing a per-test timeout:
3a2c2ec
BuildRequires:  perl
3a2c2ec
%endif
3a2c2ec
f756cfc
BuildRequires:  /usr/bin/execstack
f756cfc
1feef4d
# For byte-compiling the JIT-viewing mode:
2d36a5e
%if %{with_emacs}
1feef4d
BuildRequires:  emacs
2d36a5e
%endif
1feef4d
f756cfc
f756cfc
# Metadata for the core package (the JIT build):
f756cfc
Requires: pypy-libs = %{version}-%{release}
f756cfc
f756cfc
%description
3ca83f1
PyPy's implementation of Python, featuring a Just-In-Time compiler on some CPU
3ca83f1
architectures, and various optimized implementations of the standard types
3ca83f1
(strings, dictionaries, etc)
3ca83f1
3ca83f1
%if 0%{with_jit}
3ca83f1
This build of PyPy has JIT-compilation enabled.
3ca83f1
%else
3ca83f1
This build of PyPy has JIT-compilation disabled, as it is not supported on this
3ca83f1
CPU architecture.
3ca83f1
%endif
f756cfc
f756cfc
f756cfc
%package libs
f756cfc
Group:    Development/Languages
f756cfc
Summary:  Run-time libraries used by PyPy implementations of Python
1feef4d
1feef4d
# We supply an emacs mode for the JIT viewer.
1feef4d
# (This doesn't bring in all of emacs, just the directory structure)
2d36a5e
%if %{with_emacs}
1feef4d
Requires: emacs-filesystem >= %{_emacs_version}
2d36a5e
%endif
1feef4d
f756cfc
%description libs
f756cfc
Libraries required by the various PyPy implementations of Python.
f756cfc
0a81116
0a81116
%package devel
0a81116
Group:    Development/Languages
0a81116
Summary:  Development tools for working with PyPy
0a81116
%description devel
0a81116
Header files for building C extension modules against PyPy
0a81116
0a81116
Requires: pypy = %{version}-%{release}
0a81116
0a81116
f756cfc
%if 0%{with_stackless}
f756cfc
%package stackless
f756cfc
Group:    Development/Languages
f756cfc
Summary:  Stackless Python interpreter built using PyPy
f756cfc
Requires: pypy-libs = %{version}-%{release}
f756cfc
%description stackless
f756cfc
Build of PyPy with support for micro-threads for massive concurrency
f756cfc
%endif
f756cfc
f756cfc
%if 0%{with_stackless}
f756cfc
%package stackless
f756cfc
Group:    Development/Languages
f756cfc
Summary:  Stackless Python interpreter built using PyPy
f756cfc
Requires: pypy-libs = %{version}-%{release}
f756cfc
%description stackless
f756cfc
Build of PyPy with support for micro-threads for massive concurrency
f756cfc
%endif
f756cfc
f756cfc
f756cfc
%prep
Matej Stuchlik 2cbecfd
%setup -q -n pypy-2.2.1-src
Matej Stuchlik febbbdb
%patch0 -p1 -b .suppress-mandelbrot-set-during-tty-build
Matej Stuchlik febbbdb
%patch1 -p1
Matej Stuchlik febbbdb
%patch2 -p1
f756cfc
f756cfc
# Replace /usr/local/bin/python shebangs with /usr/bin/python:
f756cfc
find -name "*.py" -exec \
f756cfc
  sed \
f756cfc
    -i -e "s|/usr/local/bin/python|/usr/bin/python|" \
f756cfc
    "{}" \
f756cfc
    \;
f756cfc
Matej Stuchlik c3a10ad
for f in rpython/translator/goal/bpnn.py ; do
f756cfc
   # Detect shebang lines && remove them:
f756cfc
   sed -e '/^#!/Q 0' -e 'Q 1' $f \
f756cfc
      && sed -i '1d' $f
f756cfc
   chmod a-x $f
f756cfc
done
f756cfc
Matej Stuchlik febbbdb
f756cfc
%build
f756cfc
f756cfc
BuildPyPy() {
f756cfc
  ExeName=$1
f756cfc
  Options=$2
f756cfc
f756cfc
  echo "--------------------------------------------------------------"
f756cfc
  echo "--------------------------------------------------------------"
f756cfc
  echo "--------------------------------------------------------------"
f756cfc
  echo "STARTING BUILD OF: $ExeName"
f756cfc
  echo "--------------------------------------------------------------"
f756cfc
  echo "--------------------------------------------------------------"
f756cfc
  echo "--------------------------------------------------------------"
f756cfc
f756cfc
  pushd %{goal_dir}
f756cfc
f756cfc
  # The build involves invoking a python script, passing in particular
f756cfc
  # arguments, environment variables, etc.
f756cfc
  # Some notes on those follow:
f756cfc
f756cfc
  # The generated binary embeds copies of the values of all environment
f756cfc
  # variables.  We need to unset "RPM_BUILD_ROOT" to avoid a fatal error from
f756cfc
  #  /usr/lib/rpm/check-buildroot
f756cfc
  # during the postprocessing of the rpmbuild, complaining about this
f756cfc
  # reference to the buildroot
f756cfc
f756cfc
f756cfc
  # By default, pypy's autogenerated C code is placed in
f756cfc
  #    /tmp/usession-N
f756cfc
  #  
f756cfc
  # and it appears that this stops rpm from extracting the source code to the
f756cfc
  # debuginfo package
f756cfc
  #
f756cfc
  # The logic in pypy-1.4/pypy/tool/udir.py indicates that it is generated in:
f756cfc
  #    $PYPY_USESSION_DIR/usession-$PYPY_USESSION_BASENAME-N    
f756cfc
  # and so we set PYPY_USESSION_DIR so that this tempdir is within the build
f756cfc
  # location, and set $PYPY_USESSION_BASENAME so that the tempdir is unique
f756cfc
  # for each invocation of BuildPyPy
f756cfc
f756cfc
  # Compilation flags for C code:
f756cfc
  #   pypy-1.4/pypy/translator/c/genc.py:gen_makefile
f756cfc
  # assembles a Makefile within
f756cfc
  #   THE_UDIR/testing_1/Makefile
f756cfc
  # calling out to platform.gen_makefile
f756cfc
  # For us, that's
f756cfc
  #   pypy-1.4/pypy/translator/platform/linux.py: class BaseLinux(BasePosix):
f756cfc
  # which by default has:
f756cfc
  #   CFLAGS = ['-O3', '-pthread', '-fomit-frame-pointer',
f756cfc
  #             '-Wall', '-Wno-unused']
f756cfc
  # plus all substrings from CFLAGS in the environment.
f756cfc
  # This is used to generate a value for CFLAGS that's written into the Makefile
f756cfc
416c353
  # How will we track garbage-collection roots in the generated code?
416c353
  #   http://pypy.readthedocs.org/en/latest/config/translation.gcrootfinder.html
416c353
416c353
%if 0%{shadow_stack}
416c353
  # This is the most portable option, and avoids a reliance on non-guaranteed
416c353
  # behaviors within GCC's code generator: use an explicitly-maintained stack
416c353
  # of root pointers:
416c353
  %define gcrootfinder_options --gcrootfinder=shadowstack
416c353
416c353
  export CFLAGS=$(echo "$RPM_OPT_FLAGS")
416c353
416c353
%else
416c353
  # Go with the default, which is "asmgcc"
416c353
416c353
  %define gcrootfinder_options %{nil}
416c353
f756cfc
  # https://bugzilla.redhat.com/show_bug.cgi?id=588941#c18
f756cfc
  # The generated Makefile compiles the .c files into assembler (.s), rather
f756cfc
  # than direct to .o  It then post-processes this assembler to locate
f756cfc
  # garbage-collection roots (building .lbl.s and .gcmap files, and a
f756cfc
  # "gcmaptable.s").  (The modified .lbl.s files have extra code injected
f756cfc
  # within them).
f756cfc
  # Unfortunately, the code to do this:
f756cfc
  #   pypy-1.4/pypy/translator/c/gcc/trackgcroot.py
f756cfc
  # doesn't interract well with the results of using our standard build flags.
f756cfc
  # For now, filter our CFLAGS of everything that could be conflicting with
f756cfc
  # pypy.  Need to check these and reenable ones that are okay later.
00e57e7
  # Filed as https://bugzilla.redhat.com/show_bug.cgi?id=666966
f756cfc
  export CFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-fexceptions//' -e 's/-fstack-protector//' -e 's/--param=ssp-buffer-size=4//' -e 's/-O2//' -e 's/-fasynchronous-unwind-tables//' -e 's/-march=i686//' -e 's/-mtune=atom//')
f756cfc
416c353
%endif
416c353
416c353
  # The generated C code leads to many thousands of warnings of the form:
416c353
  #   warning: variable 'l_v26003' set but not used [-Wunused-but-set-variable]
416c353
  # Suppress them:
92ec0eb
  export CFLAGS=$(echo "$CFLAGS" -Wno-unused -fPIC)
416c353
f756cfc
  # If we're already built the JIT-enabled "pypy", then use it for subsequent
f756cfc
  # builds (of other configurations):
f756cfc
  if test -x './pypy' ; then
f756cfc
    INTERP='./pypy'
f756cfc
  else
00e57e7
    # First pypy build within this rpm build?
00e57e7
    # Fall back to using the bootstrap python interpreter, which might be a
00e57e7
    # system copy of pypy from an earlier rpm, or be cpython's /usr/bin/python:
00e57e7
    INTERP='%{bootstrap_python_interp}'
f756cfc
  fi
f756cfc
f756cfc
  # Here's where we actually invoke the build:
f756cfc
  time \
f756cfc
    RPM_BUILD_ROOT= \
f756cfc
    PYPY_USESSION_DIR=$(pwd) \
f756cfc
    PYPY_USESSION_BASENAME=$ExeName \
Matej Stuchlik c3a10ad
    $INTERP ../../rpython/bin/rpython  \
f756cfc
    --output=$ExeName \
416c353
    %{gcrootfinder_options} \
Matej Stuchlik c3a10ad
    $Options \
Matej Stuchlik c3a10ad
    targetpypystandalone
f756cfc
f756cfc
  echo "--------------------------------------------------------------"
f756cfc
  echo "--------------------------------------------------------------"
f756cfc
  echo "--------------------------------------------------------------"
f756cfc
  echo "FINISHED BUILDING: $ExeName"
f756cfc
  echo "--------------------------------------------------------------"
f756cfc
  echo "--------------------------------------------------------------"
f756cfc
  echo "--------------------------------------------------------------"
f756cfc
f756cfc
  popd
f756cfc
}
f756cfc
f756cfc
BuildPyPy \
f756cfc
  pypy \
3ca83f1
%if 0%{with_jit}
3ca83f1
  "-Ojit" \
3d2cef1
%else
3d2cef1
  "-O2" \
f756cfc
%endif
3ca83f1
  %{nil}
f756cfc
f756cfc
%if 0%{with_stackless}
f756cfc
BuildPyPy \
f756cfc
  pypy-stackless \
f756cfc
   "--stackless"
f756cfc
%endif
f756cfc
2d36a5e
%if %{with_emacs}
Matej Stuchlik c3a10ad
%{_emacs_bytecompile} rpython/jit/tool/pypytrace-mode.el
2d36a5e
%endif
1feef4d
Matej Stuchlik febbbdb
f756cfc
%install
f756cfc
rm -rf $RPM_BUILD_ROOT
f756cfc
f756cfc
# Install the various executables:
f756cfc
f756cfc
InstallPyPy() {
f756cfc
    ExeName=$1
f756cfc
a8e52ca
    # To ensure compatibility with virtualenv, pypy finds its libraries
a8e52ca
    # relative to itself; this happens within
a8e52ca
    #    pypy/translator/goal/app_main.py:get_library_path
a8e52ca
    # which calls sys.pypy_initial_path(dirname) on the dir containing
a8e52ca
    # the executable, with symlinks resolved.
a8e52ca
    #
a8e52ca
    # Hence we make /usr/bin/pypy be a symlink to the real binary, which we
a8e52ca
    # place within /usr/lib[64]/pypy-1.* as pypy
a8e52ca
    #
a8e52ca
    # This ought to enable our pypy build to work with virtualenv
a8e52ca
    # (rhbz#742641)
a8e52ca
    install -m 755 %{goal_dir}/$ExeName %{buildroot}/%{pypyprefix}/$ExeName
a8e52ca
    ln -s %{pypyprefix}/$ExeName %{buildroot}/%{_bindir}
f756cfc
f756cfc
    # The generated machine code doesn't need an executable stack,  but
f756cfc
    # one of the assembler files (gcmaptable.s) doesn't have the necessary
f756cfc
    # metadata to inform gcc of that, and thus gcc pessimistically assumes
f756cfc
    # that the built binary does need an executable stack.
f756cfc
    #
f756cfc
    # Reported upstream as: https://codespeak.net/issue/pypy-dev/issue610
f756cfc
    #
f756cfc
    # I tried various approaches involving fixing the build, but the simplest
f756cfc
    # approach is to postprocess the ELF file:
a8e52ca
    execstack --clear-execstack %{buildroot}/%{pypyprefix}/$ExeName
f756cfc
}
f756cfc
f756cfc
mkdir -p %{buildroot}/%{_bindir}
a8e52ca
mkdir -p %{buildroot}/%{pypyprefix}
f756cfc
f756cfc
InstallPyPy pypy
f756cfc
f756cfc
%if 0%{with_stackless}
f756cfc
InstallPyPy pypy-stackless
f756cfc
%endif
f756cfc
f756cfc
f756cfc
# Install the various support libraries as described at:
f756cfc
#   http://codespeak.net/pypy/dist/pypy/doc/getting-started-python.html#installation
f756cfc
# which refers to a "PREFIX" found relative to the location of the binary.
f756cfc
# Given that the pypy binaries will be in /usr/bin, PREFIX can be
f756cfc
# "../share/pypy-1.2" relative to that directory, i.e. /usr/share/pypy-1.2
f756cfc
# 
f756cfc
# Running "strace" on a built binary indicates that it searches within
f756cfc
#   PREFIX/lib-python/modified-2.5.2
f756cfc
# not
f756cfc
#   PREFIX/lib-python/modified.2.5.2
f756cfc
# as given on the above page, i.e. it uses '-' not '.'
f756cfc
f756cfc
cp -a lib-python %{buildroot}/%{pypyprefix}
f756cfc
f756cfc
cp -a lib_pypy %{buildroot}/%{pypyprefix}
f756cfc
f756cfc
# Remove a text file that documents which selftests fail on Win32:
f756cfc
rm %{buildroot}/%{pypyprefix}/lib-python/win32-failures.txt
f756cfc
8e0c034
# Remove a text file containing upstream's recipe for syncing stdlib in
8e0c034
# their hg repository with cpython's:
8e0c034
rm %{buildroot}/%{pypyprefix}/lib-python/stdlib-upgrade.txt
8e0c034
f756cfc
# Remove shebang lines from .py files that aren't executable, and
f756cfc
# remove executability from .py files that don't have a shebang line:
f756cfc
find \
f756cfc
  %{buildroot}                                                           \
f756cfc
  -name "*.py"                                                           \
f756cfc
    \(                                                                   \
f756cfc
       \( \! -perm /u+x,g+x,o+x -exec sed -e '/^#!/Q 0' -e 'Q 1' {} \;   \
f756cfc
             -print -exec sed -i '1d' {} \;                              \
f756cfc
          \)                                                             \
f756cfc
       -o                                                                \
f756cfc
       \(                                                                \
f756cfc
             -perm /u+x,g+x,o+x ! -exec grep -m 1 -q '^#!' {} \;         \
f756cfc
             -exec chmod a-x {} \;                                       \
f756cfc
        \)                                                               \
f756cfc
    \)
f756cfc
f756cfc
mkdir -p %{buildroot}/%{pypyprefix}/site-packages
f756cfc
f756cfc
f756cfc
# pypy uses .pyc files by default (--objspace-usepycfiles), but has a slightly
f756cfc
# different bytecode format to CPython.  It doesn't use .pyo files: the -O flag
f756cfc
# is treated as a "dummy optimization flag for compatibility with C Python"
f756cfc
#
f756cfc
# pypy-1.4/pypy/module/imp/importing.py has this comment:
f756cfc
    # XXX picking a magic number is a mess.  So far it works because we
f756cfc
    # have only two extra opcodes, which bump the magic number by +1 and
f756cfc
    # +2 respectively, and CPython leaves a gap of 10 when it increases
f756cfc
    # its own magic number.  To avoid assigning exactly the same numbers
f756cfc
    # as CPython we always add a +2.  We'll have to think again when we
f756cfc
    # get at the fourth new opcode :-(
f756cfc
    #
f756cfc
    #  * CALL_LIKELY_BUILTIN    +1
f756cfc
    #  * CALL_METHOD            +2
f756cfc
    #
f756cfc
    # In other words:
f756cfc
    #
f756cfc
    #     default_magic        -- used by CPython without the -U option
f756cfc
    #     default_magic + 1    -- used by CPython with the -U option
f756cfc
    #     default_magic + 2    -- used by PyPy without any extra opcode
f756cfc
    #     ...
f756cfc
    #     default_magic + 5    -- used by PyPy with both extra opcodes
f756cfc
#
f756cfc
f756cfc
# pypy-1.4/pypy/interpreter/pycode.py has:
f756cfc
#
f756cfc
#  default_magic = (62141+2) | 0x0a0d0000                  # this PyPy's magic
f756cfc
#                                                          # (62131=CPython 2.5.1)
f756cfc
# giving a value for "default_magic" for PyPy of 0xa0df2bf.
f756cfc
# Note that this corresponds to the "default_magic + 2" from the comment above
f756cfc
f756cfc
# In my builds:
f756cfc
#   $ ./pypy --info | grep objspace.opcodes
f756cfc
#                objspace.opcodes.CALL_LIKELY_BUILTIN: False
f756cfc
#                        objspace.opcodes.CALL_METHOD: True
f756cfc
# so I'd expect the magic number to be:
f756cfc
#    0x0a0df2bf + 2 (the flag for CALL_METHOD)
f756cfc
# giving
f756cfc
#    0x0a0df2c1
f756cfc
#
f756cfc
# I'm seeing
f756cfc
#   c1 f2 0d 0a
f756cfc
# as the first four bytes of the .pyc files, which is consistent with this.
f756cfc
f756cfc
f756cfc
# Bytecompile all of the .py files we ship, using our pypy binary, giving us
f756cfc
# .pyc files for pypy.  The script actually does the work twice (passing in -O
f756cfc
# the second time) but it's simplest to reuse that script.
f756cfc
#
f756cfc
# The script has special-casing for .py files below
f756cfc
#    /usr/lib{64}/python[0-9].[0-9]
f756cfc
# but given that we're installing into a different path, the supplied "default"
f756cfc
# implementation gets used instead.
f756cfc
#
f756cfc
# Note that some of the test files deliberately contain syntax errors, so
f756cfc
# we pass 0 for the second argument ("errors_terminate"):
f756cfc
/usr/lib/rpm/brp-python-bytecompile \
f756cfc
  %{buildroot}/%{_bindir}/pypy \
f756cfc
  0
f756cfc
Matej Stuchlik a79a105
%{goal_dir}/pypy -c 'import _tkinter'
Matej Stuchlik a79a105
%{goal_dir}/pypy -c 'import _sqlite3'
Matej Stuchlik a79a105
%{goal_dir}/pypy -c 'import _curses'
Matej Stuchlik a79a105
%{goal_dir}/pypy -c 'import syslog'
0a81116
0a81116
# Header files for C extension modules.
0a81116
# Upstream's packaging process (pypy/tool/release/package.py)
0a81116
# creates an "include" subdir and copies all *.h/*.inl from "include" there
0a81116
# (it also has an apparently out-of-date comment about copying them from
0a81116
# pypy/_interfaces, but this directory doesn't seem to exist, and it doesn't
0a81116
# seem to do this as of 2011-01-13)
0a81116
0a81116
# FIXME: arguably these should be instead put into a subdir below /usr/include,
0a81116
# it's not yet clear to me how upstream plan to deal with the C extension
0a81116
# interface going forward, so let's just mimic upstream for now.
0a81116
%global pypy_include_dir  %{pypyprefix}/include
0a81116
mkdir -p %{buildroot}/%{pypy_include_dir}
169de85
cp include/*.h %{buildroot}/%{pypy_include_dir}
0a81116
0a81116
00e57e7
# Capture the RPython source code files from the build within the debuginfo
00e57e7
# package (rhbz#666975)
00e57e7
%global pypy_debuginfo_dir /usr/src/debug/pypy-%{version}-src
00e57e7
mkdir -p %{buildroot}%{pypy_debuginfo_dir}
00e57e7
00e57e7
# copy over everything:
00e57e7
cp -a pypy %{buildroot}%{pypy_debuginfo_dir}
00e57e7
26f6230
# ...then delete files that aren't:
26f6230
#   - *.py files
26f6230
#   - the Makefile
26f6230
#   - typeids.txt
26f6230
#   - dynamic-symbols-*
00e57e7
find \
26f6230
  %{buildroot}%{pypy_debuginfo_dir}  \
26f6230
  \( -type f                         \
26f6230
     -a                              \
26f6230
     \! \( -name "*.py"              \
26f6230
           -o                        \
26f6230
           -name "Makefile"          \
26f6230
           -o                        \
26f6230
           -name "typeids.txt"       \
26f6230
           -o                        \
26f6230
           -name "dynamic-symbols-*" \
26f6230
        \)                           \
26f6230
  \)                                 \
00e57e7
  -delete
00e57e7
26f6230
# Alternatively, we could simply keep everything.  This leads to a ~350MB
26f6230
# debuginfo package, but it makes it easy to hack on the Makefile and C build
26f6230
# flags by rebuilding/linking the sources.
26f6230
# To do so, remove the above "find" command.
26f6230
00e57e7
# We don't need bytecode for these files; they are being included for reference
00e57e7
# purposes.
00e57e7
# There are some rpmlint warnings from these files:
00e57e7
#   non-executable-script
00e57e7
#   wrong-script-interpreter
00e57e7
#   zero-length
00e57e7
#   script-without-shebang
00e57e7
#   dangling-symlink
00e57e7
# but given that the objective is to preserve a copy of the source code, those
00e57e7
# are acceptable.
00e57e7
1feef4d
# Install the JIT trace mode for Emacs:
2d36a5e
%if %{with_emacs}
1feef4d
mkdir -p %{buildroot}/%{_emacs_sitelispdir}
Matej Stuchlik c3a10ad
cp -a rpython/jit/tool/pypytrace-mode.el* %{buildroot}/%{_emacs_sitelispdir}
2d36a5e
%endif
1feef4d
afabd9d
# Install macros for rpm:
afabd9d
mkdir -p %{buildroot}/%{_sysconfdir}/rpm
afabd9d
install -m 644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/rpm
afabd9d
f756cfc
%check
f756cfc
topdir=$(pwd)
f756cfc
f756cfc
SkipTest() {
f756cfc
    TEST_NAME=$1
106cb91
    sed -i -e"s|^$TEST_NAME$||g" testnames.txt
f756cfc
}
f756cfc
f756cfc
CheckPyPy() {
f756cfc
    # We'll be exercising one of the freshly-built binaries using the
f756cfc
    # test suite from the standard library (overridden in places by pypy's
f756cfc
    # modified version)
f756cfc
    ExeName=$1
f756cfc
f756cfc
    echo "--------------------------------------------------------------"
f756cfc
    echo "--------------------------------------------------------------"
f756cfc
    echo "--------------------------------------------------------------"
f756cfc
    echo "STARTING TEST OF: $ExeName"
f756cfc
    echo "--------------------------------------------------------------"
f756cfc
    echo "--------------------------------------------------------------"
f756cfc
    echo "--------------------------------------------------------------"
f756cfc
f756cfc
    pushd %{goal_dir}
f756cfc
3a2c2ec
    # I'm seeing numerous cases where tests seem to hang, or fail unpredictably
3a2c2ec
    # So we'll run each test in its own process, with a timeout
3a2c2ec
3a2c2ec
    # Use regrtest to explicitly list all tests:
3a2c2ec
    ( ./$ExeName -c \
3a2c2ec
         "from test.regrtest import findtests; print '\n'.join(findtests())"
3a2c2ec
    ) > testnames.txt
3a2c2ec
afabd9d
    # Skip some tests:
afabd9d
      # "audioop" doesn't exist for pypy yet:
afabd9d
      SkipTest test_audioop
afabd9d
afabd9d
      # The gdb CPython hooks haven't been ported to cpyext:
afabd9d
      SkipTest test_gdb
afabd9d
afabd9d
      # hotshot relies heavily on _hotshot, which doesn't exist:
afabd9d
      SkipTest test_hotshot
afabd9d
afabd9d
      # "strop" module doesn't exist for pypy yet:
afabd9d
      SkipTest test_strop
afabd9d
953cba8
      # I'm seeing Koji builds hanging e.g.:
953cba8
      #   http://koji.fedoraproject.org/koji/getfile?taskID=3386821&name=build.log
953cba8
      # The only test that seems to have timed out in that log is
953cba8
      # test_multiprocessing, so skip it for now:
953cba8
      SkipTest test_multiprocessing
953cba8
3a2c2ec
    echo "== Test names =="
3a2c2ec
    cat testnames.txt
3a2c2ec
    echo "================="
3a2c2ec
3a2c2ec
    echo "" > failed-tests.txt
3a2c2ec
3a2c2ec
    for TestName in $(cat testnames.txt) ; do
3a2c2ec
3a2c2ec
        echo "===================" $TestName "===================="
3a2c2ec
3a2c2ec
        # Use /usr/bin/time (rather than the shell "time" builtin) to gather
3a2c2ec
        # info on the process (time/CPU/memory).  This passes on the exit
3a2c2ec
        # status of the underlying command
3a2c2ec
        #
3a2c2ec
        # Use perl's alarm command to impose a timeout
3a2c2ec
        #   900 seconds is 15 minutes per test.
3a2c2ec
        # If a test hangs, that test should get terminated, allowing the build
3a2c2ec
        # to continue.
3a2c2ec
        #
3a2c2ec
        # Invoke pypy on test.regrtest to run the specific test suite
3a2c2ec
        # verbosely
3a2c2ec
        #
3a2c2ec
        # For now, || true, so that any failures don't halt the build:
3a2c2ec
        ( /usr/bin/time \
3a2c2ec
           perl -e 'alarm shift @ARGV; exec @ARGV' 900 \
3a2c2ec
             ./$ExeName -m test.regrtest -v $TestName ) \
3a2c2ec
        || (echo $TestName >> failed-tests.txt) \
3a2c2ec
        || true
3a2c2ec
    done
3a2c2ec
3a2c2ec
    echo "== Failed tests =="
3a2c2ec
    cat failed-tests.txt
3a2c2ec
    echo "================="
f756cfc
f756cfc
    popd
f756cfc
f756cfc
    # Doublecheck pypy's own test suite, using the built pypy binary:
f756cfc
f756cfc
    # Disabled for now:
f756cfc
    #   x86_64 shows various failures inside:
f756cfc
    #     jit/backend/x86/test
f756cfc
    #   followed by a segfault inside
f756cfc
    #     jit/backend/x86/test/test_runner.py
f756cfc
    #
f756cfc
    #   i686 shows various failures inside:
f756cfc
    #     jit/backend/x86/test
f756cfc
    #   with the x86_64 failure leading to cancellation of the i686 build
f756cfc
f756cfc
    # Here's the disabled code:
f756cfc
    #    pushd pypy
f756cfc
    #    time translator/goal/$ExeName test_all.py
f756cfc
    #    popd
f756cfc
f756cfc
    echo "--------------------------------------------------------------"
f756cfc
    echo "--------------------------------------------------------------"
f756cfc
    echo "--------------------------------------------------------------"
f756cfc
    echo "FINISHED TESTING: $ExeName"
f756cfc
    echo "--------------------------------------------------------------"
f756cfc
    echo "--------------------------------------------------------------"
f756cfc
    echo "--------------------------------------------------------------"
f756cfc
}
f756cfc
Matej Stuchlik 2cbecfd
#python testrunner/runner.py --logfile=pytest-A.log --config=pypy/pytest-A.cfg --config=pypy/pytest-A.py --root=pypy --timeout=3600
Matej Stuchlik 2cbecfd
#python pypy/test_all.py --pypy=pypy/goal/pypy --timeout=3600 --resultlog=cpython.log lib-python
Matej Stuchlik 2cbecfd
#python pypy/test_all.py --pypy=pypy/goal/pypy --resultlog=pypyjit.log pypy/module/pypyjit/test
Matej Stuchlik 2cbecfd
#pypy/goal/pypy pypy/test_all.py --resultlog=pypyjit_new.log
Matej Stuchlik 2cbecfd
3a2c2ec
%if %{run_selftests}
f756cfc
CheckPyPy pypy
f756cfc
f756cfc
%if 0%{with_stackless}
f756cfc
CheckPyPy pypy-stackless
f756cfc
%endif
f756cfc
3a2c2ec
%endif # run_selftests
f756cfc
f756cfc
f756cfc
%clean
f756cfc
rm -rf $RPM_BUILD_ROOT
f756cfc
f756cfc
f756cfc
%files libs
f756cfc
%defattr(-,root,root,-)
Matej Stuchlik c3a10ad
%doc LICENSE README.rst
f756cfc
f756cfc
%dir %{pypyprefix}
f756cfc
%dir %{pypyprefix}/lib-python
169de85
%{pypyprefix}/lib-python/stdlib-version.txt
f756cfc
%{pypyprefix}/lib-python/%{pylibver}/
f756cfc
%{pypyprefix}/lib-python/conftest.py*
f756cfc
%{pypyprefix}/lib_pypy/
f756cfc
%{pypyprefix}/site-packages/
2d36a5e
%if %{with_emacs}
1feef4d
%{_emacs_sitelispdir}/pypytrace-mode.el
1feef4d
%{_emacs_sitelispdir}/pypytrace-mode.elc
2d36a5e
%endif
f756cfc
f756cfc
%files
f756cfc
%defattr(-,root,root,-)
Matej Stuchlik c3a10ad
%doc LICENSE README.rst
f756cfc
%{_bindir}/pypy
a8e52ca
%{pypyprefix}/pypy
f756cfc
0a81116
%files devel
0a81116
%defattr(-,root,root,-)
0a81116
%dir %{pypy_include_dir}
0a81116
%{pypy_include_dir}/*.h
afabd9d
%config(noreplace) %{_sysconfdir}/rpm/macros.pypy
0a81116
f756cfc
%if 0%{with_stackless}
f756cfc
%files stackless
f756cfc
%defattr(-,root,root,-)
Matej Stuchlik c3a10ad
%doc LICENSE README.rst
f756cfc
%{_bindir}/pypy-stackless
f756cfc
%endif
f756cfc
f756cfc
f756cfc
%changelog
Matej Stuchlik 2cbecfd
* Thu Dec 05 2013 Matej Stuchlik <mstuchli@redhat.com> - 2.2.1-1
Matej Stuchlik 2cbecfd
- Updated to 2.2.1
Matej Stuchlik 2cbecfd
- Several bundled modules (tkinter, sqlite3, curses, syslog) were
Matej Stuchlik 2cbecfd
  not bytecompiled properly during build, that is now fixed
Matej Stuchlik 2cbecfd
- prepared new tests, not enabled yet
Matej Stuchlik 2cbecfd
Matej Stuchlik 66ffb91
* Thu Nov 14 2013 Matej Stuchlik <mstuchli@redhat.com> - 2.2.0-1
Matej Stuchlik 66ffb91
- Updated to 2.2.0
Matej Stuchlik 66ffb91
Matej Stuchlik febbbdb
* Thu Aug 15 2013 Matej Stuchlik <mstuchli@redhat.com> - 2.1-1
Matej Stuchlik febbbdb
- Updated to 2.1.0
Matej Stuchlik febbbdb
309e1cf
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2-5
309e1cf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
309e1cf
Matej Stuchlik b4e1c21
* Mon Jun 24 2013 Matej Stuchlik <mstuchli@redhat.com> - 2.0.2-4
Matej Stuchlik b4e1c21
- Patch1 fix
Matej Stuchlik b4e1c21
Matej Stuchlik 8c737bc
* Mon Jun 24 2013 Matej Stuchlik <mstuchli@redhat.com> - 2.0.2-3
Matej Stuchlik 8c737bc
- Yet another Sources fix
Matej Stuchlik 8c737bc
Matej Stuchlik 5694529
* Mon Jun 24 2013 Matej Stuchlik <mstuchli@redhat.com> - 2.0.2-2
Matej Stuchlik 5694529
- Fixed Source URL
Matej Stuchlik 5694529
Matej Stuchlik c3a10ad
* Mon Jun 24 2013 Matej Stuchlik <mstuchli@redhat.com> - 2.0.2-1
Matej Stuchlik c3a10ad
- 2.0.2, patch 8 does not seem necessary anymore
Matej Stuchlik c3a10ad
fd80b8a
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-0.2.b1
fd80b8a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
fd80b8a
8e0c034
* Tue Dec 11 2012 David Malcolm <dmalcolm@redhat.com> - 2.0-0.1.b1
8e0c034
- 2.0b1 (drop upstreamed patch 9)
8e0c034
cd9f89c
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9-4
cd9f89c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
cd9f89c
26f6230
* Tue Jul 10 2012 David Malcolm <dmalcolm@redhat.com> - 1.9-3
26f6230
- log all output from "make" (patch 6)
26f6230
- disable the MOTD at startup (patch 7)
26f6230
- hide symbols from the dynamic linker (patch 8)
26f6230
- add PyInt_AsUnsignedLongLongMask (patch 9)
26f6230
- capture the Makefile, the typeids.txt, and the dynamic-symbols file within
26f6230
the debuginfo package
26f6230
92ec0eb
* Mon Jun 18 2012 Peter Robinson <pbrobinson@fedoraproject.org> - 1.9-2
92ec0eb
- Compile with PIC, fixes FTBFS on ARM
92ec0eb
b042622
* Fri Jun  8 2012 David Malcolm <dmalcolm@redhat.com> - 1.9-1
b042622
- 1.9
b042622
07098c8
* Fri Feb 10 2012 David Malcolm <dmalcolm@redhat.com> - 1.8-2
07098c8
- disable C readability patch for now (patch 4)
07098c8
52a91fc
* Thu Feb  9 2012 David Malcolm <dmalcolm@redhat.com> - 1.8-1
52a91fc
- 1.8; regenerate config patch (patch 0); drop selinux patch (patch 2);
52a91fc
regenerate patch 5
52a91fc
a8e52ca
* Tue Jan 31 2012 David Malcolm <dmalcolm@redhat.com> - 1.7-4
a8e52ca
- fix an incompatibility with virtualenv (rhbz#742641)
a8e52ca
e21faf4
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7-3
e21faf4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
e21faf4
416c353
* Fri Dec 16 2011 David Malcolm <dmalcolm@redhat.com> - 1.7-2
416c353
- use --gcrootfinder=shadowstack, and use standard Fedora compilation flags,
416c353
with -Wno-unused (rhbz#666966 and rhbz#707707)
416c353
4ef3f10
* Mon Nov 21 2011 David Malcolm <dmalcolm@redhat.com> - 1.7-1
4ef3f10
- 1.7: refresh patch 0 (configuration) and patch 4 (readability of generated
4ef3f10
code)
4ef3f10
953cba8
* Tue Oct  4 2011 David Malcolm <dmalcolm@redhat.com> - 1.6-7
953cba8
- skip test_multiprocessing
953cba8
2d36a5e
* Tue Sep 13 2011 David Malcolm <dmalcolm@redhat.com> - 1.6-6
2d36a5e
- don't ship the emacs JIT-viewer on el5 and el6 (missing emacs-filesystem;
2d36a5e
missing _emacs_bytecompile macro on el5)
2d36a5e
009aeb1
* Mon Sep 12 2011 David Malcolm <dmalcolm@redhat.com> - 1.6-5
009aeb1
- build using python26 on el5 (2.4 is too early)
106cb91
* Thu Aug 25 2011 David Malcolm <dmalcolm@redhat.com> - 1.6-4
106cb91
- fix SkipTest function to avoid corrupting the name of "test_gdbm"
106cb91
afabd9d
* Thu Aug 25 2011 David Malcolm <dmalcolm@redhat.com> - 1.6-3
afabd9d
- add rpm macros file to the devel subpackage (source 2)
afabd9d
- skip some tests that can't pass yet
afabd9d
1df5c3e
* Sat Aug 20 2011 David Malcolm <dmalcolm@redhat.com> - 1.6-2
1df5c3e
- work around test_subprocess failure seen in koji (patch 5)
1df5c3e
3a2c2ec
* Thu Aug 18 2011 David Malcolm <dmalcolm@redhat.com> - 1.6-1
3a2c2ec
- 1.6
3a2c2ec
- rewrite the %%check section, introducing per-test timeouts
3a2c2ec
1feef4d
* Tue Aug  2 2011 David Malcolm <dmalcolm@redhat.com> - 1.5-2
1feef4d
- add pypytrace-mode.el to the pypy-libs subpackage, for viewing JIT trace
1feef4d
logs in emacs
1feef4d
169de85
* Mon May  2 2011 David Malcolm <dmalcolm@redhat.com> - 1.5-1
169de85
- 1.5
169de85
3ca83f1
* Wed Apr 20 2011 David Malcolm <dmalcolm@redhat.com> - 1.4.1-10
3ca83f1
- build a /usr/bin/pypy (but without the JIT compiler) on architectures that
3ca83f1
don't support the JIT, so that they do at least have something that runs
3ca83f1
d853ff6
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.1-9
d853ff6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
d853ff6
c225b1c
* Fri Jan 14 2011 David Malcolm <dmalcolm@redhat.com> - 1.4.1-8
c225b1c
- disable self-hosting for now, due to fatal error seen JIT-compiling the
c225b1c
translator
c225b1c
7632349
* Fri Jan 14 2011 David Malcolm <dmalcolm@redhat.com> - 1.4.1-7
7632349
- skip test_ioctl for now
7632349
0a81116
* Thu Jan 13 2011 David Malcolm <dmalcolm@redhat.com> - 1.4.1-6
0a81116
- add a "pypy-devel" subpackage, and install the header files there
0a81116
- in %%check, re-run failed tests in verbose mode
0a81116
d39359a
* Fri Jan  7 2011 Dan HorĂ¡k <dan[at]danny.cz> - 1.4.1-5
d39359a
- valgrind available only on selected architectures
d39359a
00e57e7
* Wed Jan  5 2011 David Malcolm <dmalcolm@redhat.com> - 1.4.1-4
00e57e7
- rebuild pypy using itself, for speed, with a boolean to break this cycle in
00e57e7
the build-requirement graph (falling back to using "python-devel" aka CPython)
00e57e7
- add work-in-progress patch to try to make generated c more readable
00e57e7
(rhbz#666963)
00e57e7
- capture the RPython source code files from the build within the debuginfo
00e57e7
package (rhbz#666975)
00e57e7
f756cfc
* Wed Dec 22 2010 David Malcolm <dmalcolm@redhat.com> - 1.4.1-3
f756cfc
- try to respect the FHS by installing libraries below libdir, rather than
f756cfc
datadir; patch app_main.py to look in this installation location first when
f756cfc
scanning for the pypy library directories.
f756cfc
- clarifications and corrections to the comments in the specfile
f756cfc
f756cfc
* Wed Dec 22 2010 David Malcolm <dmalcolm@redhat.com> - 1.4.1-2
f756cfc
- remove .svn directories
f756cfc
- disable verbose logging
f756cfc
- add a %%check section
f756cfc
- introduce %%goal_dir variable, to avoid repetition
f756cfc
- remove shebang line from demo/bpnn.py, as we're treating this as a
f756cfc
documentation file
f756cfc
- regenerate patch 2 to apply without generating a .orig file
f756cfc
f756cfc
* Tue Dec 21 2010 David Malcolm <dmalcolm@redhat.com> - 1.4.1-1
f756cfc
- 1.4.1; fixup %%setup to reflect change in toplevel directory in upstream
f756cfc
source tarball
f756cfc
- apply SELinux fix to the bundled test_commands.py (patch 2)
f756cfc
f756cfc
* Wed Dec 15 2010 David Malcolm <dmalcolm@redhat.com> - 1.4-4
f756cfc
- rename the jit build and subpackge to just "pypy", and remove the nojit and
f756cfc
sandbox builds, as upstream now seems to be focussing on the JIT build (with
f756cfc
only stackless called out in the getting-started-python docs); disable
f756cfc
stackless for now
f756cfc
- add a verbose_logs specfile boolean; leave it enabled for now (whilst fixing
f756cfc
build issues)
f756cfc
- add more comments, and update others to reflect 1.2 -> 1.4 changes
f756cfc
- re-enable debuginfo within CFLAGS ("-g")
f756cfc
- add the LICENSE and README to all subpackages
f756cfc
- ensure the built binaries don't have the "I need an executable stack" flag
f756cfc
- remove DOS batch files during %%prep (idlelib.bat)
f756cfc
- remove shebang lines from .py files that aren't executable, and remove
f756cfc
executability from .py files that don't have a shebang line (taken from
f756cfc
our python3.spec)
f756cfc
- bytecompile the .py files into .pyc files in pypy's bytecode format
f756cfc
f756cfc
* Sun Nov 28 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 1.4-3
f756cfc
- BuildRequire valgrind-devel
f756cfc
- Install pypy library from the new directory
f756cfc
- Disable building with our CFLAGS for now because they are causing a build failure.
f756cfc
- Include site-packages directory
f756cfc
f756cfc
* Sat Nov 27 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 1.4-2
f756cfc
- Add patch to configure the build to use our CFLAGS and link libffi
f756cfc
  dynamically
f756cfc
f756cfc
* Sat Nov 27 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 1.4-1
f756cfc
- Update to 1.4
f756cfc
- Drop patch for py2.6 that's in this build
f756cfc
- Switch to building pypy with itself once pypy is built once as recommended by
f756cfc
  upstream
f756cfc
- Remove bundled, prebuilt java libraries
f756cfc
- Fix license tag
f756cfc
- Fix source url
f756cfc
- Version pypy-libs Req
f756cfc
f756cfc
* Tue May  4 2010 David Malcolm <dmalcolm@redhat.com> - 1.2-2
f756cfc
- cherrypick r72073 from upstream SVN in order to fix the build against
f756cfc
python 2.6.5 (patch 2)
f756cfc
f756cfc
* Wed Apr 28 2010 David Malcolm <dmalcolm@redhat.com> - 1.2-1
f756cfc
- initial packaging
f756cfc