89499e8
%global basever 7.3
f756cfc
Name:           pypy
0fdc213
Version:        %{basever}.1
311cac5
%global pyversion 2.7
cb7d3dc
Release:        2%{?dist}
f756cfc
Summary:        Python 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
f756cfc
# High-level configuration of the build:
f756cfc
5b97503
# Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package
5b97503
# Uses upstream bundled prebuilt wheels otherwise
d8b0789
# setuptools >= 45.0 no longer support Python 2.7, hence disabled
d8b0789
%bcond_with rpmwheels
5b97503
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
a0bf0ed
%global src_name %{ver_name}-v%{version}-src
f66590d
9abcdf1
%ifarch %{ix86} x86_64 %{arm} s390x %{power64} aarch64
df49cf9
%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?
8c203cb
%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
928b6bc
%global pypy_include_dir  %{pypyprefix}/include
6eff80a
%global pypyprefix %{_libdir}/%{name}-%{basever}
169de85
%global pylibver 2.7
fbf6c29
%global pymajorlibver 2
fbf6c29
%global ver_name  %{name}%{pymajorlibver}
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:
311cac5
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
de213fa
Source1: macros.%{name}
de213fa
#  __pypy2, pypy2_sitelib, pypy2_sitearch
de213fa
Source2: macros.%{name}%{pymajorlibver}
f756cfc
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:
f66590d
Patch0: 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]
f66590d
Patch1: 007-remove-startup-message.patch
26f6230
d4caff2
# Glibc's libcrypt was replaced with libxcrypt in f28, crypt.h header has
d4caff2
# to be added to privent compilation error.
d4caff2
# https://fedoraproject.org/wiki/Changes/Replace_glibc_libcrypt_with_libxcrypt
d4caff2
Patch2: 009-add-libxcrypt-support.patch
d4caff2
5b97503
# Instead of bundled wheels, use our RPM packaged wheels from
5b97503
# /usr/share/python-wheels
5b97503
# We conditionally apply this, but we use autosetup, so we use Source here
5b97503
Source189: 189-use-rpm-wheels.patch
5b97503
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
4715343
%global use_self_when_building 1
46bd6ff
%if 0%{use_self_when_building}
5b26924
BuildRequires: pypy2
8c203cb
%global bootstrap_python_interp pypy2
00e57e7
%else
5b26924
# exception to use Python 2: https://pagure.io/fesco/issue/2130
5b26924
BuildRequires: python27
8c203cb
%global bootstrap_python_interp python2
009aeb1
%endif
00e57e7
7c23bee
BuildRequires:  gcc
7c23bee
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
e3c0ead
BuildRequires:  gdbm-devel
b1bc786
BuildRequires:  chrpath
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
3a2c2ec
3a2c2ec
# For use in the selftests, for imposing a per-test timeout:
dfddb1b
BuildRequires:  perl-interpreter
3a2c2ec
%endif
3a2c2ec
29c5e8d
# All arches have execstack
29c5e8d
BuildRequires:  execstack
f756cfc
1feef4d
# For byte-compiling the JIT-viewing mode:
2d36a5e
%if %{with_emacs}
1feef4d
BuildRequires:  emacs
2d36a5e
%endif
1feef4d
5b97503
# For %%autosetup -S git
5b97503
BuildRequires:  %{_bindir}/git
5b97503
5b97503
%if %{with rpmwheels}
2841b34
BuildRequires: python-setuptools-wheel < 45
5b97503
BuildRequires: python-pip-wheel
5b97503
%endif
5b97503
f756cfc
# Metadata for the core package (the JIT build):
82aa2b6
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
a0bf0ed
Provides: %{ver_name} = %{version}-%{release}
a0bf0ed
Provides: %{ver_name}%{_isa} = %{version}-%{release}
311cac5
Provides: pypy%{pyversion} = %{version}-%{release}
311cac5
Provides: pypy%{pyversion}%{_isa} = %{version}-%{release}
0de1a2a
Provides: %{ver_name}(abi) = %{basever}
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
Summary:  Run-time libraries used by PyPy implementations of Python
1feef4d
2841b34
%if %{without rpmwheels}
2841b34
# PyPy is MIT and Python and UCD (see the main package license)
2841b34
# setuptools is MIT and bundles:
2841b34
#   packaging: BSD or ASL 2.0
2841b34
#   pyparsing: MIT
2841b34
#   six: MIT
2841b34
# pip is MIT and bundles:
2841b34
#   appdirs: MIT
2841b34
#   distlib: Python
2841b34
#   distro: ASL 2.0
2841b34
#   html5lib: MIT
2841b34
#   six: MIT
2841b34
#   colorama: BSD
2841b34
#   CacheControl: ASL 2.0
2841b34
#   msgpack-python: ASL 2.0
2841b34
#   lockfile: MIT
2841b34
#   progress: ISC
2841b34
#   ipaddress: Python
2841b34
#   packaging: ASL 2.0 or BSD
2841b34
#   pep517: MIT
2841b34
#   pyparsing: MIT
2841b34
#   pytoml: MIT
2841b34
#   retrying: ASL 2.0
2841b34
#   requests: ASL 2.0
2841b34
#   chardet: LGPLv2
2841b34
#   idna: BSD
2841b34
#   urllib3: MIT
2841b34
#   certifi: MPLv2.0
2841b34
#   setuptools: MIT
2841b34
#   webencodings: BSD
2841b34
License: MIT and Python and UCD and ASL 2.0 and BSD and ISC and LGPLv2 and MPLv2.0 and (ASL 2.0 or BSD)
2841b34
%endif
2841b34
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
5b97503
%if %{with rpmwheels}
2841b34
Requires: python-setuptools-wheel < 45
5b97503
Requires: python-pip-wheel
5b97503
%else
0fdc213
Provides: bundled(python2dist(setuptools)) = 44.0.0
2841b34
Provides: bundled(python2dist(packaging)) = 16.8
2841b34
Provides: bundled(python2dist(pyparsing)) = 2.2.1
2841b34
Provides: bundled(python2dist(six)) = 1.10.0
2841b34
0fdc213
Provides: bundled(python2dist(pip)) = 20.0.2
2841b34
Provides: bundled(python2dist(appdirs)) = 1.4.3
0fdc213
Provides: bundled(python2dist(CacheControl)) = 0.12.6
0fdc213
Provides: bundled(python2dist(contextlib2)) = 0.6.0
0fdc213
Provides: bundled(python2dist(certifi)) = 2019.11.28
2841b34
Provides: bundled(python2dist(chardet)) = 3.0.4
0fdc213
Provides: bundled(python2dist(colorama)) = 0.4.3
0fdc213
Provides: bundled(python2dist(distlib)) = 0.3.0
2841b34
Provides: bundled(python2dist(distro)) = 1.4.0
2841b34
Provides: bundled(python2dist(html5lib)) = 1.0.1
2841b34
Provides: bundled(python2dist(idna)) = 2.8
0fdc213
Provides: bundled(python2dist(ipaddress)) = 1.0.23
2841b34
Provides: bundled(python2dist(lockfile)) = 0.12.2
0fdc213
Provides: bundled(python2dist(msgpack)) = 0.6.2
0fdc213
Provides: bundled(python2dist(packaging)) = 20.1
0fdc213
Provides: bundled(python2dist(pep517)) = 0.7.0
2841b34
Provides: bundled(python2dist(progress)) = 1.5
0fdc213
Provides: bundled(python2dist(pyparsing)) = 2.4.6
0fdc213
Provides: bundled(python2dist(pytoml)) = 0.1.21
2841b34
Provides: bundled(python2dist(requests)) = 2.22.0
2841b34
Provides: bundled(python2dist(retrying)) = 1.3.3
0fdc213
Provides: bundled(python2dist(setuptools)) = 44.0.0
0fdc213
Provides: bundled(python2dist(six)) = 1.14.0
0fdc213
Provides: bundled(python2dist(urllib3)) = 1.25.7
2841b34
Provides: bundled(python2dist(webencodings)) = 0.5.1
5b97503
%endif
5b97503
a0bf0ed
Provides: %{ver_name}-libs = %{version}-%{release}
a0bf0ed
Provides: %{ver_name}-libs%{_isa} = %{version}-%{release}
311cac5
Provides: pypy%{pyversion}-libs = %{version}-%{release}
311cac5
Provides: pypy%{pyversion}-libs%{_isa} = %{version}-%{release}
311cac5
f756cfc
%description libs
f756cfc
Libraries required by the various PyPy implementations of Python.
f756cfc
0a81116
0a81116
%package devel
0a81116
Summary:  Development tools for working with PyPy
82aa2b6
Requires: %{name}%{?_isa} = %{version}-%{release}
a0bf0ed
Provides: %{ver_name}-devel = %{version}-%{release}
a0bf0ed
Provides: %{ver_name}-devel%{_isa} = %{version}-%{release}
311cac5
Provides: pypy%{pyversion}-devel = %{version}-%{release}
311cac5
Provides: pypy%{pyversion}-devel%{_isa} = %{version}-%{release}
Matej Stuchlik 5efcdc8
0a81116
%description devel
0a81116
Header files for building C extension modules against PyPy
0a81116
0a81116
f756cfc
%if 0%{with_stackless}
f756cfc
%package stackless
f756cfc
Summary:  Stackless Python interpreter built using PyPy
82aa2b6
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
a0bf0ed
Provides: %{ver_name}-stackless = %{version}-%{release}
a0bf0ed
Provides: %{ver_name}-stackless%{_isa} = %{version}-%{release}
311cac5
Provides: pypy%{pyversion}-stackless = %{version}-%{release}
311cac5
Provides: pypy%{pyversion}-stackless%{_isa} = %{version}-%{release}
f756cfc
%description stackless
f756cfc
Build of PyPy with support for micro-threads for massive concurrency
f756cfc
%endif
f756cfc
f756cfc
f756cfc
%prep
311cac5
%autosetup -n pypy%{pyversion}-v%{version}-src -p1 -S git
5b97503
5b97503
%if %{with rpmwheels}
5b97503
%apply_patch -m %(basename %{SOURCE189}) %{SOURCE189}
5b97503
rm lib-python/2.7/ensurepip/_bundled/*.whl
5b97503
rmdir lib-python/2.7/ensurepip/_bundled
5b97503
%endif
5b97503
e336391
# Replace /usr/local/bin/python or /usr/bin/env python shebangs with /usr/bin/python2 or pypy2:
e336391
find \( -name "*.py" -o -name "py.cleanup" \) -exec \
f756cfc
  sed \
e336391
    -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
Matej Stuchlik e76c4a2
rm -rf lib-python/3
Matej Stuchlik e76c4a2
82aa2b6
# Replace all lib-python python shebangs with pypy
82aa2b6
find lib-python/%{pylibver} -name "*.py" -exec \
82aa2b6
  sed -r -i '1s|^#!\s*/usr/bin.*python.*|#!/usr/bin/%{name}|' \
82aa2b6
    "{}" \
82aa2b6
    \;
Matej Stuchlik febbbdb
5b26924
%if ! 0%{use_self_when_building}
5b26924
  # use the pycparser from PyPy even on CPython
5b26924
  ln -s lib_pypy/cffi/_pycparser pycparser
5b26924
%endif
5b26924
f756cfc
%build
d089bbf
%ifarch s390x
d089bbf
# pypy3 requires z10 at least
d089bbf
%global optflags %(echo %{optflags} | sed 's/-march=z9-109 /-march=z10 /')
d089bbf
%endif
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:
82aa2b6
  %global gcrootfinder_options --gcrootfinder=shadowstack
416c353
d722746
  export CFLAGS=$(echo "$RPM_OPT_FLAGS" | sed -e 's/-g//')
416c353
416c353
%else
416c353
  # Go with the default, which is "asmgcc"
416c353
82aa2b6
  %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
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'
0a784b2
    %ifarch %{arm}
0a784b2
      # Reduce memory usage on arm during installation
0a784b2
      PYPY_GC_MAX_DELTA=200MB $INTERP --jit loop_longevity=300 ../../rpython/bin/rpython -Ojit targetpypystandalone
0a784b2
    %endif
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:
b1bc786
  RPM_BUILD_ROOT= \
b1bc786
  PYPY_USESSION_DIR=$(pwd) \
b1bc786
  PYPY_USESSION_BASENAME=$ExeName \
b1bc786
  $INTERP ../../rpython/bin/rpython  \
b1bc786
  %{gcrootfinder_options} \
b1bc786
  $Options \
b1bc786
  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 \
82aa2b6
  %{name} \
3ca83f1
%if 0%{with_jit}
3ca83f1
  "-Ojit" \
3d2cef1
%else
3d2cef1
  "-O2" \
f756cfc
%endif
3ca83f1
  %{nil}
f756cfc
f756cfc
%if 0%{with_stackless}
f756cfc
BuildPyPy \
82aa2b6
  %{name}-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
f756cfc
mkdir -p %{buildroot}/%{_bindir}
a8e52ca
mkdir -p %{buildroot}/%{pypyprefix}
f756cfc
b1bc786
#%if 0%{with_stackless}
b1bc786
#InstallPyPy %{name}-stackless
b1bc786
#%endif
f756cfc
f756cfc
6eff80a
# Run installing script,  archive-name  %{name}-%{basever} in %{buildroot}/%{_libdir} == %{pypyprefix}
6eff80a
%{bootstrap_python_interp} pypy/tool/release/package.py --archive-name %{name}-%{basever} --builddir %{buildroot}/%{_libdir}
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:
928b6bc
find \
928b6bc
  %{buildroot}                                                           \
928b6bc
  -name "*.py"                                                           \
928b6bc
    \(                                                                   \
928b6bc
       \( \! -perm /u+x,g+x,o+x -exec sed -e '/^#!/Q 0' -e 'Q 1' {} \;   \
928b6bc
             -print -exec sed -i '1d' {} \;                              \
928b6bc
          \)                                                             \
928b6bc
       -o                                                                \
928b6bc
       \(                                                                \
928b6bc
             -perm /u+x,g+x,o+x ! -exec grep -m 1 -q '^#!' {} \;         \
928b6bc
             -exec chmod a-x {} \;                                       \
928b6bc
        \)                                                               \
928b6bc
    \)
f756cfc
f756cfc
29c5e8d
execstack --clear-execstack %{buildroot}/%{pypyprefix}/bin/pypy
0a81116
84ccc6f
# Bytecompile all of the .py files we ship, using our pypy binary, giving us
84ccc6f
# .pyc files for pypy.  The script actually does the work twice (passing in -O
84ccc6f
# the second time) but it's simplest to reuse that script.
84ccc6f
#
84ccc6f
# The script has special-casing for .py files below
84ccc6f
#    /usr/lib{64}/python[0-9].[0-9]
84ccc6f
# but given that we're installing into a different path, the supplied "default"
84ccc6f
# implementation gets used instead.
84ccc6f
#
84ccc6f
# Note that some of the test files deliberately contain syntax errors, so
84ccc6f
# we pass 0 for the second argument ("errors_terminate"):
84ccc6f
/usr/lib/rpm/brp-python-bytecompile \
84ccc6f
  %{buildroot}%{pypyprefix}/bin/%{name} \
84ccc6f
  0
84ccc6f
84ccc6f
%{buildroot}%{pypyprefix}/bin/%{name} -c 'import _tkinter'
84ccc6f
%{buildroot}%{pypyprefix}/bin/%{name} -c 'import Tkinter'
84ccc6f
%{buildroot}%{pypyprefix}/bin/%{name} -c 'import _sqlite3'
84ccc6f
%{buildroot}%{pypyprefix}/bin/%{name} -c 'import _curses'
84ccc6f
%{buildroot}%{pypyprefix}/bin/%{name} -c 'import curses'
84ccc6f
%{buildroot}%{pypyprefix}/bin/%{name} -c 'import syslog'
84ccc6f
%{buildroot}%{pypyprefix}/bin/%{name} -c 'from _sqlite3 import *'
84ccc6f
84ccc6f
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
00e57e7
# Capture the RPython source code files from the build within the debuginfo
00e57e7
# package (rhbz#666975)
dd69089
%global pypy_debuginfo_dir /usr/src/debug/pypy-%{version}-src
dd69089
mkdir -p %{buildroot}%{pypy_debuginfo_dir}
00e57e7
00e57e7
# copy over everything:
dd69089
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-*
b1bc786
#find \
b1bc786
#  %{buildroot}%{pypy_debuginfo_dir}  \
b1bc786
#  \( -type f                         \
b1bc786
#     -a                              \
b1bc786
#     \! \( -name "*.py"              \
b1bc786
#           -o                        \
b1bc786
#           -name "Makefile"          \
b1bc786
#           -o                        \
b1bc786
#           -name "typeids.txt"       \
b1bc786
#           -o                        \
b1bc786
#           -name "dynamic-symbols-*" \
b1bc786
#        \)                           \
b1bc786
#  \)                                 \
b1bc786
#  -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}
82aa2b6
cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot}/%{_emacs_sitelispdir}/%{name}trace-mode.el
82aa2b6
cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot}/%{_emacs_sitelispdir}/%{name}trace-mode.elc
2d36a5e
%endif
1feef4d
fbf6c29
# Create executables pypy, pypy2 and pypy2.7
fbf6c29
ln -sf %{pypyprefix}/bin/%{name} %{buildroot}%{_bindir}/%{name}%{pylibver}
fbf6c29
ln -sf %{_bindir}/%{name}%{pylibver} %{buildroot}%{_bindir}/%{name}%{pymajorlibver}
fbf6c29
ln -sf %{_bindir}/%{name}%{pymajorlibver} %{buildroot}%{_bindir}/%{name}
fbf6c29
b1bc786
# Move files to the right places and remove unnecessary files
b1bc786
mv %{buildroot}/%{pypyprefix}/bin/libpypy-c.so %{buildroot}/%{_libdir}
6eff80a
rm -rf %{buildroot}/%{_libdir}/%{name}-%{basever}.tar.bz2
b1bc786
rm -rf %{buildroot}/%{pypyprefix}/README.rst
b1bc786
rm -rf %{buildroot}/%{pypyprefix}/README.rst
5acd385
rm -rf %{buildroot}/%{pypy_include_dir}/README
b1bc786
chrpath --delete %{buildroot}/%{pypyprefix}/bin/%{name}
b1bc786
afabd9d
# Install macros for rpm:
Matej Stuchlik 355feb2
mkdir -p %{buildroot}/%{_rpmconfigdir}/macros.d
de213fa
install -m 644 %{SOURCE1} %{buildroot}/%{_rpmconfigdir}/macros.d
Matej Stuchlik 355feb2
install -m 644 %{SOURCE2} %{buildroot}/%{_rpmconfigdir}/macros.d
afabd9d
82aa2b6
# Remove build script from the package
b1bc786
#rm %{buildroot}/%{pypyprefix}/lib_pypy/ctypes_config_cache/rebuild.py
82aa2b6
d4caff2
# since 5.10.0, the debug binaries are built and shipped, making the
d4caff2
# pypy package ~350 MiB. let's remove them here for now and TODO figure out why
d4caff2
rm -f %{buildroot}%{pypyprefix}/bin/pypy.debug
d4caff2
rm -f %{buildroot}%{pypyprefix}/bin/libpypy-c.so.debug
d4caff2
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 \
82aa2b6
         "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}
b1bc786
CheckPyPy %{name}-c
f756cfc
f756cfc
%if 0%{with_stackless}
b1bc786
CheckPyPy %{name}-c-stackless
f756cfc
%endif
f756cfc
3a2c2ec
%endif # run_selftests
f756cfc
82aa2b6
# Because there's a bunch of binary subpackages and creating
f841cbf
# /usr/share/doc/pypy3-this and /usr/share/doc/pypy3-that
82aa2b6
# is just confusing for the user.
82aa2b6
%global _docdir_fmt %{name}
f756cfc
f756cfc
%files libs
82aa2b6
%doc README.rst
f756cfc
f756cfc
%dir %{pypyprefix}
f756cfc
%dir %{pypyprefix}/lib-python
f841cbf
%license %{pypyprefix}/LICENSE
b1bc786
%{_libdir}/libpypy-c.so
f756cfc
%{pypyprefix}/lib-python/%{pylibver}/
f756cfc
%{pypyprefix}/lib_pypy/
f756cfc
%{pypyprefix}/site-packages/
2d36a5e
%if %{with_emacs}
82aa2b6
%{_emacs_sitelispdir}/%{name}trace-mode.el
82aa2b6
%{_emacs_sitelispdir}/%{name}trace-mode.elc
2d36a5e
%endif
f756cfc
f756cfc
%files
82aa2b6
%doc README.rst
82aa2b6
%{_bindir}/%{name}
fbf6c29
%{_bindir}/%{name}%{pylibver}
fbf6c29
%{_bindir}/%{name}%{pymajorlibver}
b1bc786
%{pypyprefix}/bin/%{name}
f756cfc
0a81116
%files devel
5acd385
%dir %{pypy_include_dir}
5acd385
%{pypy_include_dir}/*.h
f66590d
%{pypy_include_dir}/_numpypy
82aa2b6
%{_rpmconfigdir}/macros.d/macros.%{name}
de213fa
%{_rpmconfigdir}/macros.d/macros.%{name}%{pymajorlibver}
0a81116
f756cfc
%if 0%{with_stackless}
f756cfc
%files stackless
82aa2b6
%doc README.rst
82aa2b6
%{_bindir}/%{name}-stackless
f756cfc
%endif
f756cfc
f756cfc
f756cfc
%changelog
cb7d3dc
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 7.3.1-2
cb7d3dc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
cb7d3dc
0fdc213
* Mon Apr 20 2020 Tomas Hrnciar <thrnciar@redhat.com> - 7.3.1-1
0fdc213
- Update to 7.3.1
0fdc213
d8b0789
* Wed Feb 12 2020 Miro Hrončok <mhroncok@redhat.com> - 7.3.0-3
d8b0789
- Use bundled wheels, to allow updating setuptools in Fedora
d8b0789
f610318
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 7.3.0-2
f610318
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
f610318
89499e8
* Sat Dec 28 2019 Miro Hrončok <mhroncok@redhat.com> - 7.3.0-1
89499e8
- Update to 7.3.0
89499e8
9abcdf1
* Wed Oct 23 2019 Miro Hrončok <mhroncok@redhat.com> - 7.2.0-3
9abcdf1
- Enable JIT on aarch64
9abcdf1
5979a61
* Wed Oct 16 2019 Miro Hrončok <mhroncok@redhat.com> - 7.2.0-2
5979a61
- Enable JIT on power64
5979a61
4715343
* Mon Oct 14 2019 Miro Hrončok <mhroncok@redhat.com> - 7.2.0-1
4715343
- Update to 7.2.0
4715343
- Enable aarch64
059b472
e23e380
* Sat Jul 27 2019 Peter Robinson <pbrobinson@fedoraproject.org> 7.1.1-3
e23e380
- Re-enable power64 builds
e23e380
39cbef6
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 7.1.1-2
39cbef6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
39cbef6
1711b84
* Thu May 30 2019 Miro Hrončok <mhroncok@redhat.com> - 7.1.1-1
1711b84
- Update to 7.1.1
1711b84
311cac5
* Thu Feb 28 2019 Miro Hrončok <mhroncok@redhat.com> - 7.0.0-1
311cac5
- Update to 7.0.0
311cac5
9b0263d
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-5
9b0263d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
9b0263d
81ac695
* Mon Jan 14 2019 Björn Esser <besser82@fedoraproject.org> - 6.0.0-4
81ac695
- Rebuilt for libcrypt.so.2 (#1666033)
81ac695
5b97503
* Tue Aug 21 2018 Miro Hrončok <mhroncok@redhat.com> - 6.0.0-3
5b97503
- Use RPM packaged wheels
5b97503
59d7654
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-2
59d7654
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
59d7654
ea68881
* Thu Apr 26 2018 Michal Cyprian <mcyprian@redhat.com> - 6.0.0-1
ea68881
- Update to 6.0.0
ea68881
0de1a2a
* Wed Apr 11 2018 Miro Hrončok <mhroncok@redhat.com> - 5.10.0-4
0de1a2a
- Provide pypy2(abi) = 5.10
0de1a2a
de213fa
* Tue Apr 10 2018 Miro Hrončok <mhroncok@redhat.com> - 5.10.0-3
de213fa
- RPM macros improvements
de213fa
6eff80a
* Tue Mar 27 2018 Michal Cyprian <mcyprian@redhat.com> - 5.10.0-2
6eff80a
- Remove the rightmost version number from the path
6eff80a
- rhbz#1516885: https://bugzilla.redhat.com/show_bug.cgi?id=1516885
6eff80a
d4caff2
* Wed Mar 21 2018 Michal Cyprian <mcyprian@redhat.com> - 5.10.0-1
d4caff2
- Update to 5.10.0
d4caff2
7fad263
* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 5.9.0-6
7fad263
- Escape macros in %%changelog
7fad263
dbff029
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.9.0-5
dbff029
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
dbff029
94a66c4
* Sat Jan 20 2018 Björn Esser <besser82@fedoraproject.org> - 5.9.0-4
94a66c4
- Rebuilt for switch to libxcrypt
94a66c4
fbf6c29
* Fri Dec 08 2017 Michal Cyprian <mcyprian@redhat.com> - 5.9.0-3
fbf6c29
- Add pypy2 and pypy2.7 symlinks
fbf6c29
84ccc6f
* Thu Nov 30 2017 Miro Hrončok <mhroncok@redhat.com> - 5.9.0-2
84ccc6f
- Make sure to bytecompile the files and ship .pyc files (#1519238)
84ccc6f
0a784b2
* Mon Oct 23 2017 Michal Cyprian <mcyprian@redhat.com> - 5.9.0-1
0a784b2
- Update to 5.9.0
0a784b2
d1cd7c5
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.8.0-3
d1cd7c5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
d1cd7c5
f22953b
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.8.0-2
f22953b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
f22953b
a0bf0ed
* Mon Jun 26 2017 Michal Cyprian <mcyprian@redhat.com> - 5.8.0-1
a0bf0ed
- Update to 5.8.0, add pypy2 provides
a0bf0ed
b42a638
* Tue Mar 21 2017 Michal Cyprian <mcyprian@redhat.com> - 5.7.0-1
b42a638
- Update to 5.7.0
b42a638
e7d75fe
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.6.0-4
e7d75fe
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
e7d75fe
d089bbf
* Tue Nov 29 2016 Peter Robinson <pbrobinson@fedoraproject.org> 5.6.0-3
d089bbf
- set z10 as the base CPU for s390x build
d089bbf
df49cf9
* Mon Nov 14 2016 Peter Robinson <pbrobinson@fedoraproject.org> 5.6.0-2
df49cf9
- Post boostrap build
df49cf9
569f84a
* Mon Nov 14 2016 Peter Robinson <pbrobinson@fedoraproject.org> 5.6.0-1
569f84a
- Update to 5.6.0
569f84a
- Bootstrap mode for Power64 and s390x
569f84a
f66590d
* Thu Sep 01 2016 Michal Cyprian <mcyprian@redhat.com> - 5.4.0-1
f66590d
- Update to 5.4.0
f66590d
fbbb50d
* Sun Aug 14 2016 Peter Robinson <pbrobinson@fedoraproject.org> 5.0.1-5
fbbb50d
- Update supported architectures list
fbbb50d
e3c0ead
* Thu Jul 21 2016 Miro Hrončok <mhroncok@redhat.com> - 5.0.1-4
e3c0ead
- Build with gdbm support
e3c0ead
- rhbz#1358482
e3c0ead
f1894aa
* Thu Jun 30 2016 Miro Hrončok <mhroncok@redhat.com> - 5.0.1-3
f1894aa
- Fix for: CVE-2016-0772 python: smtplib StartTLS stripping attack
f1894aa
- Raise an error when STARTTLS fails
f1894aa
- rhbz#1303647: https://bugzilla.redhat.com/show_bug.cgi?id=1303647
f1894aa
- rhbz#1351679: https://bugzilla.redhat.com/show_bug.cgi?id=1351679
f1894aa
- Fixed upstream: https://hg.python.org/cpython/rev/b3ce713fb9be
f1894aa
5acd385
* Fri May 13 2016 Miro Hrončok <mhroncok@redhat.com> - 5.0.1-2
5acd385
- Move header files back to %%{pypy_include_dir} (rhbz#1328025)
5acd385
5164c65
* Mon Mar 21 2016 Michal Cyprian <mcyprian@redhat.com> - 5.0.1-1
5164c65
- Update to 5.0.1
5164c65
d2c9084
* Mon Mar 14 2016 Michal Cyprian <mcyprian@redhat.com> - 5.0.0-1
d2c9084
- Update to 5.0.0
d2c9084
87387c3
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-2
87387c3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
87387c3
f228b48
* Thu Jan 28 2016 Michal Cyprian <mcyprian@redhat.com> - 4.0.1-1
f228b48
- Update to 4.0.1
f228b48
2c3d82e
* Tue Nov 24 2015 Peter Robinson <pbrobinson@fedoraproject.org> 4.0.0-3
2c3d82e
- Post bootstrap build
2c3d82e
29c5e8d
* Tue Nov 24 2015 Peter Robinson <pbrobinson@fedoraproject.org> 4.0.0-2
29c5e8d
- All arches have execstack
29c5e8d
- Boostrap pypy on ppc64/ppc64le
29c5e8d
Matej Stuchlik 8ec089f
* Tue Nov 17 2015 Matej Stuchlik <mstuchli@redhat.com> - 4.0.0-1
Matej Stuchlik 8ec089f
- Update to 4.0.0
Matej Stuchlik 8ec089f
abb087e
* Mon Aug 31 2015 Michal Cyprian <mcyprian@redhat.com> - 2.6.1-1
abb087e
- Upgrade to 2.6.1
abb087e
71c3306
* Wed Aug 26 2015 Michal Cyprian <mcyprian@redhat.com> - 2.6.0-5
7fad263
- Use %%{bootstrap_python_interp} macro to run package.py
71c3306
5f0224f
* Wed Aug 26 2015 Michal Cyprian <mcyprian@redhat.com> - 2.6.0-4
5f0224f
- Fix debuginfo missing sources
5f0224f
Resolves: rhbz#1256001
5f0224f
928b6bc
* Tue Aug 18 2015 Michal Cyprian <mcyprian@redhat.com> - 2.6.0-3
928b6bc
- Use script package.py in install section 
928b6bc
282457d
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6.0-2
282457d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
282457d
Matej Stuchlik 72177c4
* Wed May 27 2015 Matej Stuchlik <mstuchli@redhat.com> - 2.6.0-1
Matej Stuchlik 72177c4
- Update to 2.6.0
Matej Stuchlik 72177c4
6790829
* Wed Mar  4 2015 Ville Skyttä <ville.skytta@iki.fi> - 2.5.0-2
6790829
- Do not mark macros file as %%config (#1074266)
6790829
Matej Stuchlik 68e603e
* Tue Feb 17 2015 Matej Stuchlik <mstuchli@redhat.com> - 2.5.0-1
Matej Stuchlik 68e603e
- Update to 2.5.0
Matej Stuchlik 68e603e
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