124d766
%global basever 7.0
26c3863
Name:           pypy3
18c888e
Version:        %{basever}.0
6eb88b1
%global pyversion 3.5
3e4b720
Release:        2%{?dist}
26c3863
Summary:        Python 3 implementation with a Just-In-Time compiler
f756cfc
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
9d0ffbc
# aarch64: Not available yet
9d0ffbc
# ppc64: Broken on F29+ https://bugzilla.redhat.com/show_bug.cgi?id=1619601
9d0ffbc
ExcludeArch: aarch64 %{power64}
347fb46
f756cfc
# High-level configuration of the build:
f756cfc
6f8b7ba
# Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package
6f8b7ba
# Uses upstream bundled prebuilt wheels otherwise
6f8b7ba
%bcond_without rpmwheels
6f8b7ba
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
#
43ee778
# rpython/jit/backend/detect_cpu.py:getcpuclassname currently supports the
f756cfc
# following options:
f756cfc
#  'i386', 'x86'
f756cfc
#  'x86-without-sse2':
f756cfc
#  'x86_64'
43ee778
#  'armv6', 'armv7' (versions 6 and 7, hard- and soft-float ABI)
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.
43ee778
a6780ec
%ifarch %{ix86} x86_64 %{arm} %{power64} s390x
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?
e47185b
%if 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
Michal Cyprian cf5da92
%global pypyprefix %{_libdir}/pypy3-%{basever}
26c3863
%global pylibver 3
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:
124d766
Source0: https://bitbucket.org/pypy/pypy/downloads/pypy%{pyversion}-v%{version}-src.tar.bz2
f756cfc
afabd9d
# Supply various useful RPM macros for building python modules against pypy:
afabd9d
#  __pypy, pypy_sitelib, pypy_sitearch
343676a
Source2: macros.pypy3
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:
6eb88b1
Patch1: 001-nevertty.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:
6eb88b1
Patch6: 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]
6eb88b1
Patch7: 007-remove-startup-message.patch
092bdc1
Michal Cyprian c54059a
# Glibc's libcrypt was replaced with libxcrypt in f28, crypt.h header has
Michal Cyprian c54059a
# to be added to privent compilation error.
Michal Cyprian c54059a
# https://fedoraproject.org/wiki/Changes/Replace_glibc_libcrypt_with_libxcrypt
Michal Cyprian c54059a
Patch9: 009-add-libxcrypt-support.patch
Michal Cyprian c54059a
aa6a9d0
# It seems ppc64 has no faulthandler
6eb88b1
Patch11: 011-no-faulthandler.patch
aa6a9d0
6f8b7ba
# Instead of bundled wheels, use our RPM packaged wheels from
6f8b7ba
# /usr/share/python-wheels
6f8b7ba
# We conditionally apply this, but we use autosetup, so we use Source here
6f8b7ba
Source189: 189-use-rpm-wheels.patch
6f8b7ba
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:
976314e
# Note, pypy3 is built with pypy2, so no dependency cycle
976314e
82dcbae
%ifarch %{power64}
82dcbae
# the build is unreliable with pypy+power, getting random failures
82dcbae
# so better have a bit slower build than having to build until it pass
82dcbae
%global use_self_when_building 0
82dcbae
%else
9c955b3
%global use_self_when_building 1
82dcbae
%endif
82dcbae
00e57e7
%if 0%{use_self_when_building}
26c3863
# pypy3 can only be build with pypy2
2b72df5
BuildRequires: pypy2
6eb88b1
# no pypy-pycparser available ATM
1b41795
%global bootstrap_python_interp pypy2
00e57e7
%else
009aeb1
26c3863
26c3863
# pypy3 can only be build with python2
1120251
BuildRequires: python2-devel
2b72df5
BuildRequires: python2-pycparser
1b41795
%global bootstrap_python_interp python2
00e57e7
009aeb1
%endif
00e57e7
3f667ce
BuildRequires:  gcc
3f667ce
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
124d766
BuildRequires:  openssl-devel
343676a
BuildRequires:  gdbm-devel
343676a
BuildRequires:  xz-devel
a037418
%ifnarch s390
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
0b4deef
BuildRequires:  /usr/bin/free
3a2c2ec
3a2c2ec
# For use in the selftests, for imposing a per-test timeout:
717803c
BuildRequires:  perl-interpreter
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
980f988
# For %%autosetup -S git
8b06f1a
BuildRequires:  %{_bindir}/git
f756cfc
6f8b7ba
%if %{with rpmwheels}
6f8b7ba
BuildRequires: python-setuptools-wheel
6f8b7ba
BuildRequires: python-pip-wheel
6f8b7ba
%endif
6f8b7ba
f756cfc
# Metadata for the core package (the JIT build):
cac18de
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
cac18de
Provides: %{name}(abi) = %{basever}
124d766
Provides: pypy%{pyversion} = %{version}-%{release}
124d766
Provides: pypy%{pyversion}%{?_isa} = %{version}-%{release}
f756cfc
f756cfc
%description
26c3863
PyPy's implementation of Python 3, 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
26c3863
Summary:  Run-time libraries used by PyPy implementations of Python 3
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
124d766
Provides: pypy%{pyversion}-libs = %{version}-%{release}
124d766
Provides: pypy%{pyversion}-libs%{?_isa} = %{version}-%{release}
124d766
6f8b7ba
%if %{with rpmwheels}
6f8b7ba
Requires: python-setuptools-wheel
6f8b7ba
Requires: python-pip-wheel
6f8b7ba
%else
6f8b7ba
Provides: bundled(python3-pip) = 9.0.1
6f8b7ba
Provides: bundled(python3-setuptools) = 28.8.0
6f8b7ba
%endif
6f8b7ba
f756cfc
%description libs
26c3863
Libraries required by the various PyPy implementations of Python 3.
f756cfc
0a81116
0a81116
%package devel
26c3863
Summary:  Development tools for working with PyPy3
343676a
Requires: pypy3%{?_isa} = %{version}-%{release}
Matej Stuchlik 5efcdc8
124d766
Provides: pypy%{pyversion}-devel = %{version}-%{release}
124d766
Provides: pypy%{pyversion}-devel%{?_isa} = %{version}-%{release}
124d766
0a81116
%description devel
26c3863
Header files for building C extension modules against PyPy3
0a81116
0a81116
f756cfc
%if 0%{with_stackless}
f756cfc
%package stackless
26c3863
Summary:  Stackless Python interpreter built using PyPy3
343676a
Requires: pypy3-libs%{?_isa} = %{version}-%{release}
124d766
124d766
Provides: pypy%{pyversion}-stackless = %{version}-%{release}
124d766
Provides: pypy%{pyversion}-stackless%{?_isa} = %{version}-%{release}
124d766
f756cfc
%description stackless
26c3863
Build of PyPy3 with support for micro-threads for massive concurrency
f756cfc
%endif
f756cfc
f756cfc
%prep
124d766
%autosetup -n pypy%{pyversion}-v%{version}-src -p1 -S git
f756cfc
3e4b720
# While this is 7.0.0, it has 7.1.0-alpha0 listed inside
3e4b720
# We sed it out to avoid user confusion
3e4b720
sed -i 's/7\.1\.0/7.0.0/' pypy/doc/conf.py
3e4b720
sed -i 's/7\.1\.0-alpha0/7.0.0/g' pypy/module/cpyext/include/patchlevel.h pypy/doc/how-to-release.rst
3e4b720
sed -i 's/0x07010000/0x07000000/' pypy/module/cpyext/include/patchlevel.h
3e4b720
sed -i 's/7, 1, 0, "alpha"/7, 0, 0, "final"/' pypy/module/sys/version.py
3e4b720
3e4b720
6f8b7ba
%if %{with rpmwheels}
6f8b7ba
%apply_patch -m %(basename %{SOURCE189}) %{SOURCE189}
6f8b7ba
rm lib-python/3/ensurepip/_bundled/*.whl
6f8b7ba
rmdir lib-python/3/ensurepip/_bundled
6f8b7ba
%else
6f8b7ba
# we don't want to ship the old ones anyway
6f8b7ba
rm lib-python/3/ensurepip/_bundled/pip-8.1.2-*
6f8b7ba
rm lib-python/3/ensurepip/_bundled/setuptools-21.2.1-*
6f8b7ba
%endif
6f8b7ba
6f8b7ba
1b41795
# Replace /usr/local/bin/python or /usr/bin/env python shebangs with /usr/bin/python2 or pypy2:
f756cfc
find -name "*.py" -exec \
f756cfc
  sed \
1b41795
    -i -r -e "s@/usr/(local/)?bin/(env )?python(2|3)?@/usr/bin/%{bootstrap_python_interp}@" \
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
1b41795
# Replace all lib-python and lib_pypy python shebangs with pypy3 (those will be shipped with pypy3-libs)
1b41795
find lib-python/%{pylibver} lib_pypy -name "*.py" -exec \
1b41795
  sed -r -i '1s@^#!\s*/usr/bin.*(python|pypy).*@#!/usr/bin/%{name}@' \
36afc7f
    "{}" \
36afc7f
    \;
Matej Stuchlik febbbdb
b70eb98
# Not needed on Linux
b70eb98
rm lib-python/3/idlelib/idle.bat
b70eb98
9107198
%ifarch %{ix86} x86_64 %{arm}
9107198
  sed -i -r 's/\$\(LDFLAGSEXTRA\)/& -fuse-ld=gold/' ./rpython/translator/platform/posix.py
9107198
%endif
ad0d37c
f756cfc
%build
b929faa
%ifarch s390 s390x
b929faa
# pypy3 requires z10 at least
b929faa
%global optflags %(echo %{optflags} | sed 's/-march=z9-109 /-march=z10 /')
b929faa
%endif
b929faa
ad0d37c
# Top memory usage is about 4.5GB on arm7hf
56984a4
free
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:
819b9f5
  %global gcrootfinder_options --gcrootfinder=shadowstack
416c353
343676a
  export CFLAGS=$(echo "$RPM_OPT_FLAGS")
416c353
416c353
%else
416c353
  # Go with the default, which is "asmgcc"
416c353
819b9f5
  %global 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
343676a
  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  \
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 \
343676a
  pypy3 \
3ca83f1
%if 0%{with_jit}
3ca83f1
  "-Ojit" \
3d2cef1
%else
3d2cef1
  "-O2" \
f756cfc
%endif
3ca83f1
  %{nil}
f756cfc
f756cfc
%if 0%{with_stackless}
f756cfc
BuildPyPy \
343676a
  pypy3-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
mkdir -p %{buildroot}/%{_bindir}
a8e52ca
mkdir -p %{buildroot}/%{pypyprefix}
f756cfc
f756cfc
Michal Cyprian cf5da92
# Run installing script,  archive-name  %{name}-%{basever} in %{buildroot}/%{_libdir} == %{pypyprefix}
Michal Cyprian cf5da92
%{bootstrap_python_interp} pypy/tool/release/package.py --archive-name %{name}-%{basever} --builddir %{buildroot}/%{_libdir}
f756cfc
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
720aa9b
# The generated machine code doesn't need an executable stack,  but
720aa9b
# one of the assembler files (gcmaptable.s) doesn't have the necessary
720aa9b
# metadata to inform gcc of that, and thus gcc pessimistically assumes
720aa9b
# that the built binary does need an executable stack.
720aa9b
#
720aa9b
# Reported upstream as: https://codespeak.net/issue/pypy-dev/issue610
720aa9b
#
720aa9b
# I tried various approaches involving fixing the build, but the simplest
720aa9b
# approach is to postprocess the ELF file:
720aa9b
execstack --clear-execstack %{buildroot}/%{pypyprefix}/bin/pypy3
720aa9b
6eb88b1
ln -s ./pypy3 %{buildroot}%{pypyprefix}/bin/pypy%{pyversion}
6eb88b1
ln -s %{pypyprefix}/bin/pypy%{pyversion} %{buildroot}%{_bindir}/pypy%{pyversion}
6eb88b1
ln -s pypy%{pyversion} %{buildroot}%{_bindir}/pypy3
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 \
343676a
  %{buildroot}%{pypyprefix}/bin/pypy3 \
f756cfc
  0
f756cfc
343676a
%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import _tkinter'
343676a
%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import tkinter'
343676a
%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import _sqlite3'
343676a
%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import _curses'
343676a
%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import curses'
343676a
%{buildroot}%{pypyprefix}/bin/pypy3 -c 'import syslog'
343676a
%{buildroot}%{pypyprefix}/bin/pypy3 -c 'from _sqlite3 import *'
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
343676a
mkdir -p %{buildroot}%{pypy_include_dir}
343676a
rm -f %{buildroot}%{pypy_include_dir}/README
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}
404c37f
mkdir -p %{buildroot}/%{_emacs_sitelispdir}
404c37f
cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.el
404c37f
cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/pypy3trace-mode.elc
2d36a5e
%endif
1feef4d
afabd9d
# Install macros for rpm:
37fe957
install -m0644 -p -D -t %{buildroot}/%{_rpmconfigdir}/macros.d %{SOURCE2}
afabd9d
343676a
# Remove files we don't want:
Michal Cyprian cf5da92
rm -f %{buildroot}%{_libdir}/%{name}-%{basever}.tar.bz2 \
37fe957
   %{buildroot}%{pypyprefix}/LICENSE \
37fe957
   %{buildroot}%{pypyprefix}/README.rst
524d40e
693a83b
# wtf? This is probably masking some bigger problem, but let's do this for now
693a83b
mv -v lib-python/3/test/regrtest.py-new lib-python/3/test/regrtest.py || :
693a83b
720aa9b
# since 5.10.0, the debug binaries are built and shipped, making the
720aa9b
# pypy3 package ~350 MiB. let's remove them here for now and TODO figure out why
720aa9b
rm -f %{buildroot}%{pypyprefix}/bin/pypy3.debug
720aa9b
rm -f %{buildroot}%{pypyprefix}/bin/libpypy3-c.so.debug
720aa9b
720aa9b
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 \
26c3863
         "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}
6eb88b1
CheckPyPy %{name}-c
f756cfc
f756cfc
%if 0%{with_stackless}
6eb88b1
CheckPyPy %{name}-stackless
f756cfc
%endif
f756cfc
3a2c2ec
%endif # run_selftests
f756cfc
7e82938
# Because there's a bunch of binary subpackages and creating
7e82938
# /usr/share/licenses/pypy3-this and /usr/share/licenses/pypy3-that
7e82938
# is just confusing for the user.
7e82938
%global _docdir_fmt %{name}
f756cfc
f756cfc
%files libs
e7218e6
%license LICENSE
e7218e6
%doc README.rst
f756cfc
f756cfc
%dir %{pypyprefix}
f756cfc
%dir %{pypyprefix}/lib-python
f756cfc
%{pypyprefix}/lib-python/%{pylibver}/
f756cfc
%{pypyprefix}/lib_pypy/
f756cfc
%{pypyprefix}/site-packages/
2d36a5e
%if %{with_emacs}
343676a
%{_emacs_sitelispdir}/pypy3trace-mode.el
343676a
%{_emacs_sitelispdir}/pypy3trace-mode.elc
2d36a5e
%endif
f756cfc
f756cfc
%files
e7218e6
%license LICENSE
e7218e6
%doc README.rst
343676a
%{_bindir}/pypy3
6eb88b1
%{_bindir}/pypy%{pyversion}
343676a
%{pypyprefix}/bin/
f756cfc
347975d
%exclude %{_libdir}/%{name}-%{version}.tar.bz2
347975d
0a81116
%files devel
0a81116
%dir %{pypy_include_dir}
0a81116
%{pypy_include_dir}/*.h
343676a
%{_rpmconfigdir}/macros.d/macros.pypy3
0a81116
f756cfc
%if 0%{with_stackless}
f756cfc
%files stackless
e7218e6
%license LICENSE
e7218e6
%doc README.rst
343676a
%{_bindir}/pypy-stackless
f756cfc
%endif
f756cfc
f756cfc
f756cfc
%changelog
3e4b720
* Thu May 16 2019 Miro Hrončok <mhroncok@redhat.com> - 7.0.0-2
3e4b720
- Show the version as 7.0.0
3e4b720
124d766
* Thu Feb 28 2019 Miro Hrončok <mhroncok@redhat.com> - 7.0.0-1
124d766
- Update to 7.0.0 (#1673127)
124d766
9d9b085
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-5
9d9b085
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
9d9b085
f8cbccf
* Mon Jan 14 2019 Björn Esser <besser82@fedoraproject.org> - 6.0.0-4
f8cbccf
- Rebuilt for libcrypt.so.2 (#1666033)
f8cbccf
6f8b7ba
* Tue Aug 21 2018 Miro Hrončok <mhroncok@redhat.com> - 6.0.0-3
6f8b7ba
- Use RPM packaged wheels
6f8b7ba
f7ac519
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-2
f7ac519
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
f7ac519
18c888e
* Wed Apr 25 2018 Miro Hrončok <mhroncok@redhat.com> - 6.0.0-1
1b41795
- Fix failing taskotron check
18c888e
- New release 6.0.0 (#1571489)
18c888e
- Fix multiprocessing regression on newer glibcs (#1569933)
1b41795
cac18de
* Wed Apr 11 2018 Miro Hrončok <mhroncok@redhat.com> - 5.10.1-7
cac18de
- Provide pypy3(abi) = 5.10
cac18de
fe844b7
* Wed Apr 11 2018 Miro Hrončok <mhroncok@redhat.com> - 5.10.1-6
fe844b7
- RPM macros improvements
fe844b7
Michal Cyprian cf5da92
* Tue Apr 10 2018 Michal Cyprian <mcyprian@redhat.com> - 5.10.1-5
Michal Cyprian cf5da92
- Remove the rightmost version number from the path
Michal Cyprian cf5da92
- rhbz#1516885: https://bugzilla.redhat.com/show_bug.cgi?id=1516885
Michal Cyprian cf5da92
Michal Cyprian c54059a
* Thu Mar 29 2018 Michal Cyprian <mcyprian@redhat.com> - 5.10.1-4
Michal Cyprian c54059a
- Add patch for libxcrypt
Michal Cyprian c54059a
664896a
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.10.1-3
664896a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
664896a
43f3327
* Sat Jan 20 2018 Björn Esser <besser82@fedoraproject.org> - 5.10.1-2
43f3327
- Rebuilt for switch to libxcrypt
43f3327
93cd7d0
* Fri Jan 12 2018 Miro Hrončok <mhroncok@redhat.com> - 5.10.1-1
93cd7d0
- Update to 5.10.1 (#1533689)
93cd7d0
- Removed two upstreamed patches
93cd7d0
720aa9b
* Fri Dec 29 2017 Miro Hrončok <mhroncok@redhat.com> - 5.10.0-3
720aa9b
- Remove never used InstallPyPy function
720aa9b
- Actually call execstack as originally intended
720aa9b
- Use execstack on all arches (it's available now)
720aa9b
- Don't ship the debug binaries
82dcbae
- On power, use cpython2 to build pypy3
720aa9b
e858e84
* Thu Dec 28 2017 Miro Hrončok <mhroncok@redhat.com> - 5.10.0-2
e858e84
- Fixed upstream issues #2717 and #2718 (re-enable test_socket)
9c955b3
- Use pypy2 when building (it's faster and works this time)
e858e84
2b72df5
* Mon Dec 25 2017 Miro Hrončok <mhroncok@redhat.com> - 5.10.0-1
2b72df5
- Update to 5.10 (#1528841)
2b72df5
- Use pypy2 and python2-pycparser (note the twos)
a6780ec
- Enable JIT on power and s390x
2765706
- Temporarily skip test_socket on ix86
2b72df5
6eb88b1
* Fri Oct 20 2017 Miro Hrončok <mhroncok@redhat.com> - 5.9.0-1
6eb88b1
- Update to 5.9 (#1504427)
6eb88b1
- Remove merged patches
6eb88b1
- Reindex the patches to match the filenames
6eb88b1
- Rebase the faulthandler Patch11
6eb88b1
- BR python-pycparser
6eb88b1
79816c5
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.5.0-6
79816c5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
79816c5
aebba14
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.5.0-5
aebba14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
aebba14
51ae82f
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.5.0-4
51ae82f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
51ae82f
b929faa
* Sun Nov 13 2016 Dan Horák <dan[at]danny.cz> - 5.5.0-3
b929faa
- set z10 as the base CPU for s390(x) build
b929faa
ad0d37c
* Sat Nov 12 2016 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 5.5.0-2
ad0d37c
- Also build on arm and s390*
ad0d37c
347975d
* Sat Oct 15 2016 Miro Hrončok <mhroncok@redhat.com> - 5.5.0-1
347975d
- PyPy 3.3 5.5.0
347975d
- On Fedora 26+, BR compat-openssl10-devel
347975d
343676a
* Sat Jul 02 2016 Miro Hrončok <mhroncok@redhat.com> - 5.2.0-0.1.alpha1
343676a
- First alpha build of PyPy 3.3
343676a
343676a
* Fri Jul 01 2016 Miro Hrončok <mhroncok@redhat.com> - 2.4.0-3
092bdc1
- Fix for: CVE-2016-0772 python: smtplib StartTLS stripping attack
092bdc1
- Raise an error when STARTTLS fails
092bdc1
- rhbz#1303647: https://bugzilla.redhat.com/show_bug.cgi?id=1303647
092bdc1
- rhbz#1351680: https://bugzilla.redhat.com/show_bug.cgi?id=1351680
092bdc1
- Fixed upstream: https://hg.python.org/cpython/rev/d590114c2394
092bdc1
- Fix for: CVE-2016-5699 python: http protocol steam injection attack
092bdc1
- rhbz#1303699: https://bugzilla.redhat.com/show_bug.cgi?id=1303699
092bdc1
- rhbz#1351687: https://bugzilla.redhat.com/show_bug.cgi?id=1351687
092bdc1
- Fixed upstream: https://hg.python.org/cpython/rev/bf3e1c9b80e9
092bdc1
a039768
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.0-2
a039768
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
a039768
Matej Stuchlik e76c4a2
* Wed Sep 10 2014 Matej Stuchlik <mstuchli@redhat.com> - 2.4.0-1
Matej Stuchlik e76c4a2
- Update to 2.4.0
Matej Stuchlik e76c4a2
Matej Stuchlik f7434ba
* Tue Sep 02 2014 Matej Stuchlik <mstuchli@redhat.com> - 2.3.1-4
Matej Stuchlik f7434ba
- Move devel subpackage requires so that it gets picked up by rpm
Matej Stuchlik f7434ba
7498717
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.1-3
7498717
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
7498717
43ee778
* Mon Jul  7 2014 Peter Robinson <pbrobinson@fedoraproject.org> 2.3.1-2
43ee778
- ARMv7 is supported for JIT
43ee778
- no prelink on aarch64/ppc64le
43ee778
Matej Stuchlik edc736c
* Sun Jun 08 2014 Matej Stuchlik <mstuchli@redhat.com> - 2.3.1-1
Matej Stuchlik edc736c
- Update to 2.3.1
Matej Stuchlik edc736c
1972c9c
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3-5
1972c9c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
1972c9c
a037418
* Tue May 27 2014 Dennis Gilmore <dennis@ausil.us> - 2.3-4
a037418
- valgrind is available everywhere except 31 bit s390
a037418
ce731cf
* Wed May 21 2014 Jaroslav Škarvada <jskarvad@redhat.com> - 2.3-3
ce731cf
- Rebuilt for https://fedoraproject.org/wiki/Changes/f21tcl86
ce731cf
Matej Stuchlik a3993a3
* Thu May 15 2014 Matej Stuchlik <mstuchli@redhat.com> - 2.3-2
Matej Stuchlik a3993a3
- Rebuilt (f21-python)
Matej Stuchlik a3993a3
Matej Stuchlik db10290
* Tue May 13 2014 Matej Stuchlik <mstuchli@redhat.com> - 2.3-1
Matej Stuchlik db10290
- Updated to 2.3
Matej Stuchlik db10290
Matej Stuchlik 4dbc78c
* Mon Mar 10 2014 Matej Stuchlik <mstuchli@redhat.com> - 2.2.1-3
Matej Stuchlik 4dbc78c
- Put RPM macros in proper location
Matej Stuchlik 4dbc78c
Matej Stuchlik f8a7311
* Thu Jan 16 2014 Matej Stuchlik <mstuchli@redhat.com> - 2.2.1-2
Matej Stuchlik f8a7311
- Fixed errors due to missing __pycache__
Matej Stuchlik f8a7311
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