2022-03-30 17:35:57 +00:00
# Note: When this is updated to 7.4,
# the installation layout will change in a backwards-incompatible way.
# That'll be a good time to rename this to pypy2.7 and adapt %%pypyprefix to be
# %%{_libdir}/pypy%%{pyversion} (see e.g. pypy3.7 or pypy3.8 for inspiration).
2019-12-28 10:22:02 +00:00
%global basever 7.3
2011-01-03 20:06:28 +00:00
Name : pypy
2024-07-29 16:02:40 +00:00
Version : %{basever} .16
2019-02-28 23:07:40 +00:00
%global pyversion 2.7
2024-07-30 22:47:19 +00:00
Release : %autorelease -e 0.riscv64
2011-01-03 20:06:28 +00:00
Summary : Python implementation with a Just-In-Time compiler
2021-05-25 19:55:49 +00:00
# PyPy is MIT
# Python standard library is Python
# pypy/module/unicodedata is UCD
# Bundled pycparser is is BSD
# Bundled pycparser.ply is BSD
# Bundled bits from cryptography are ASL 2.0 or BSD
2011-01-03 20:06:28 +00:00
# LGPL and another free license we'd need to ask spot about are present in some
# java jars that we're not building with atm (in fact, we're deleting them
# before building). If we restore those we'll have to work out the new
# licensing terms
2021-05-25 19:55:49 +00:00
License : MIT and Python and UCD and BSD and (ASL 2.0 or BSD)
2023-08-01 16:27:31 +00:00
URL : https://www.pypy.org/
2011-01-03 20:06:28 +00:00
2022-03-30 17:32:09 +00:00
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch : %{ix86}
2011-01-03 20:06:28 +00:00
# High-level configuration of the build:
2018-08-21 10:10:46 +00:00
# Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package
# Uses upstream bundled prebuilt wheels otherwise
2020-02-12 16:48:08 +00:00
# setuptools >= 45.0 no longer support Python 2.7, hence disabled
%bcond_with rpmwheels
2018-08-21 10:10:46 +00:00
2011-01-03 20:06:28 +00:00
# PyPy consists of an implementation of an interpreter (with JIT compilation)
# for the full Python language written in a high-level language, leaving many
# of the implementation details as "pluggable" policies.
#
# The implementation language is then compiled down to .c code, from which we
# obtain a binary.
#
# This allows us to build a near-arbitrary collection of different
# implementations of Python with differing tradeoffs
#
# (As it happens, the implementation language is itself Python, albeit a
# restricted subset "RPython", chosen to making it amenable to being compiled.
# The result implements the full Python language though)
# We could build many different implementations of Python.
# For now, let's focus on the implementation that appears to be receiving the
# most attention upstream: the JIT-enabled build, with all standard
# optimizations
# Building a configuration can take significant time:
# A build of pypy (with jit) on i686 took 77 mins:
# [Timer] Timings:
# [Timer] annotate --- 583.3 s
# [Timer] rtype_lltype --- 760.9 s
# [Timer] pyjitpl_lltype --- 567.3 s
# [Timer] backendopt_lltype --- 375.6 s
# [Timer] stackcheckinsertion_lltype --- 54.1 s
# [Timer] database_c --- 852.2 s
# [Timer] source_c --- 1007.3 s
# [Timer] compile_c --- 419.9 s
# [Timer] ===========================================
# [Timer] Total: --- 4620.5 s
#
# A build of pypy (nojit) on x86_64 took about an hour:
# [Timer] Timings:
# [Timer] annotate --- 537.5 s
# [Timer] rtype_lltype --- 667.3 s
# [Timer] backendopt_lltype --- 385.4 s
# [Timer] stackcheckinsertion_lltype --- 42.5 s
# [Timer] database_c --- 625.3 s
# [Timer] source_c --- 1040.2 s
# [Timer] compile_c --- 273.9 s
# [Timer] ===========================================
# [Timer] Total: --- 3572.0 s
#
#
# A build of pypy-stackless on i686 took about 87 mins:
# [Timer] Timings:
# [Timer] annotate --- 584.2 s
# [Timer] rtype_lltype --- 777.3 s
# [Timer] backendopt_lltype --- 365.9 s
# [Timer] stackcheckinsertion_lltype --- 39.3 s
# [Timer] database_c --- 1089.6 s
# [Timer] source_c --- 1868.6 s
# [Timer] compile_c --- 490.4 s
# [Timer] ===========================================
# [Timer] Total: --- 5215.3 s
2011-04-30 22:24:07 +00:00
# We will build a "pypy" binary.
#
# Unfortunately, the JIT support is only available on some architectures.
#
2014-07-07 22:07:38 +00:00
# rpython/jit/backend/detect_cpu.py:getcpuclassname currently supports the
2011-01-03 20:06:28 +00:00
# following options:
# 'i386', 'x86'
# 'x86-without-sse2':
# 'x86_64'
2014-07-07 22:07:38 +00:00
# 'armv6', 'armv7' (versions 6 and 7, hard- and soft-float ABI)
2011-01-03 20:06:28 +00:00
# 'cli'
# 'llvm'
2011-04-30 22:24:07 +00:00
#
# We will only build with JIT support on those architectures, and build without
# it on the other archs. The resulting binary will typically be slower than
# CPython for the latter case.
2014-07-07 22:07:38 +00:00
2017-07-03 13:53:05 +00:00
%global src_name %{ver_name} -v%{version} -src
2016-09-01 09:18:51 +00:00
2019-10-23 15:03:00 +00:00
%ifarch %{ix86} x86_64 %{arm} s390x %{power64} aarch64
2016-11-14 15:06:34 +00:00
%global with_jit 1
2011-01-03 20:06:28 +00:00
%else
%global with_jit 0
%endif
# Should we build a "pypy-stackless" binary?
%global with_stackless 0
2011-09-13 09:00:09 +00:00
# Should we build the emacs JIT-viewing mode?
2018-07-15 14:26:16 +00:00
%if 0%{?rhel} == 6
2011-09-13 09:00:09 +00:00
%global with_emacs 0
%else
%global with_emacs 1
%endif
2011-01-03 20:06:28 +00:00
# Easy way to enable/disable verbose logging:
%global verbose_logs 0
2011-08-19 23:04:38 +00:00
# Easy way to turn off the selftests:
%global run_selftests 1
2015-08-19 14:20:33 +00:00
%global pypy_include_dir %{pypyprefix} /include
2018-04-05 05:15:33 +00:00
%global pypyprefix %{_libdir} /%{name} -%{basever}
Rebase to 1.5 (rhbz#701121)
Update patches:
patch 0: pypy-1.4-config.patch -> pypy-1.5-config.patch
patch 4: pypy-1.4.1-more-readable-c-code.patch -> pypy-1.5-more-readable-c-code.patch
Remove references to *.inl files, no longer present
Add the following tests to the skip list:
test_audioop, test_capi, test_distutils, test_gc, test_gdb, test_generators,
test_getargs2, test_hotshot, test_io, test_multiprocessing, test_posix,
test_readline, test_scope, test_strop, test_structmembers, test_subprocess,
test_symtable, test_sys_settrace, test_tempfile, test_thread, test_uuid,
test_zipimport_support
Add a couple of text files to the payload (TODO, stdlib-version.txt)
2011-05-02 18:46:32 +00:00
%global pylibver 2.7
2017-12-08 09:36:43 +00:00
%global pymajorlibver 2
%global ver_name %{name} %{pymajorlibver}
2011-01-03 20:06:28 +00:00
# We refer to this subdir of the source tree in a few places during the build:
2013-06-24 06:57:35 +00:00
%global goal_dir pypy/goal
2011-01-03 20:06:28 +00:00
2022-01-25 21:13:36 +00:00
%ifarch %{ix86} x86_64 %{arm}
%global _package_note_linker gold
%endif
2011-01-03 20:06:28 +00:00
# Source and patches:
2021-05-20 18:51:43 +00:00
Source0 : https://downloads.python.org/pypy/pypy%{pyversion} -v%{version} -src.tar.bz2
2011-01-03 20:06:28 +00:00
2011-08-25 15:58:55 +00:00
# Supply various useful RPM macros for building python modules against pypy:
# __pypy, pypy_sitelib, pypy_sitearch
2018-04-10 23:18:25 +00:00
Source1 : macros.%{name}
# __pypy2, pypy2_sitelib, pypy2_sitearch
Source2 : macros.%{name} %{pymajorlibver}
2011-01-03 20:06:28 +00:00
2024-04-17 01:43:57 +00:00
# Patch for the bundled pip wheel for CVE-2023-5752
# https://github.com/pypa/pip/pull/12119
# https://github.com/pypa/pip/pull/12306
# https://github.com/pypa/pip/pull/12373
Source3 : pip-CVE-2023-5752.patch
2012-07-10 20:45:52 +00:00
# Patch pypy.translator.platform so that stdout from "make" etc gets logged,
# rather than just stderr, so that the command-line invocations of the compiler
# and linker are captured:
2016-09-01 09:18:51 +00:00
Patch0 : 006-always-log-stdout.patch
2012-07-10 20:45:52 +00:00
# Disable the printing of a quote from IRC on startup (these are stored in
# ROT13 form in lib_pypy/_pypy_irc_topic.py). Some are cute, but some could
# cause confusion for end-users (and many are in-jokes within the PyPy
# community that won't make sense outside of it). [Sorry to be a killjoy]
2016-09-01 09:18:51 +00:00
Patch1 : 007-remove-startup-message.patch
2012-07-10 20:45:52 +00:00
2018-03-27 17:25:47 +00:00
# Glibc's libcrypt was replaced with libxcrypt in f28, crypt.h header has
# to be added to privent compilation error.
# https://fedoraproject.org/wiki/Changes/Replace_glibc_libcrypt_with_libxcrypt
Patch2 : 009-add-libxcrypt-support.patch
2018-08-21 10:10:46 +00:00
# Instead of bundled wheels, use our RPM packaged wheels from
# /usr/share/python-wheels
# We conditionally apply this, but we use autosetup, so we use Source here
Source189 : 189-use-rpm-wheels.patch
2022-06-28 23:46:27 +00:00
# 00382 #
# Make mailcap refuse to match unsafe filenames/types/params (GH-91993)
#
# Upstream: https://github.com/python/cpython/issues/68966
#
# Tracker bug: https://bugzilla.redhat.com/show_bug.cgi?id=2075390
#
# Backported from python3.
Patch382 : 382-cve-2015-20107.patch
2023-08-29 12:32:35 +00:00
# 00394 #
# gh-98433: Fix quadratic time idna decoding.
#
# There was an unnecessary quadratic loop in idna decoding. This restores
# the behavior to linear.
#
# Backported from python3.
Patch394 : 394-cve-2022-45061-cpu-denial-of-service-via-inefficient-idna-decoder.patch
2023-05-29 16:54:49 +00:00
# 00399 #
# CVE-2023-24329
#
# gh-102153: Start stripping C0 control and space chars in `urlsplit` (GH-102508)
#
# `urllib.parse.urlsplit` has already been respecting the WHATWG spec a bit GH-25595.
#
# This adds more sanitizing to respect the "Remove any leading C0 control or space from input" [rule](https://url.spec.whatwg.org/GH-url-parsing:~:text=Remove%%20any%%20leading%%20and%%20trailing%%20C0%%20control%%20or%%20space%%20from%%20input.) in response to [CVE-2023-24329](https://nvd.nist.gov/vuln/detail/CVE-2023-24329).
#
# Backported from Python 3.12
Patch399 : 399-cve-2023-24329.patch
2011-01-03 20:06:28 +00:00
# Build-time requirements:
2011-01-06 22:09:03 +00:00
# pypy's can be rebuilt using itself, rather than with CPython; doing so
# halves the build time.
#
# Turn it off with this boolean, to revert back to rebuilding using CPython
# and avoid a cycle in the build-time dependency graph:
2011-01-14 16:58:45 +00:00
2019-10-16 14:14:37 +00:00
%global use_self_when_building 1
2019-10-15 14:07:33 +00:00
%if 0%{use_self_when_building}
2019-10-18 22:41:07 +00:00
BuildRequires : pypy2
2018-07-15 14:26:16 +00:00
%global bootstrap_python_interp pypy2
2011-01-06 22:09:03 +00:00
%else
2019-10-18 22:41:07 +00:00
# exception to use Python 2: https://pagure.io/fesco/issue/2130
BuildRequires : python27
2018-07-15 14:26:16 +00:00
%global bootstrap_python_interp python2
2011-09-13 01:01:16 +00:00
%endif
2011-01-06 22:09:03 +00:00
2018-07-15 14:24:03 +00:00
BuildRequires : gcc
2011-01-03 20:06:28 +00:00
BuildRequires : libffi-devel
2014-01-02 09:45:26 +00:00
BuildRequires : tcl-devel
BuildRequires : tk-devel
BuildRequires : sqlite-devel
2011-01-03 20:06:28 +00:00
BuildRequires : zlib-devel
BuildRequires : bzip2-devel
BuildRequires : ncurses-devel
BuildRequires : expat-devel
2022-07-18 11:50:43 +00:00
BuildRequires : openssl-devel
2024-07-29 16:03:16 +00:00
%if 0%{?fedora} >= 41
BuildRequires : openssl-devel-engine
%endif
2016-07-22 09:16:53 +00:00
BuildRequires : gdbm-devel
2015-08-17 08:00:20 +00:00
BuildRequires : chrpath
2021-07-21 14:17:39 +00:00
BuildRequires : python-rpm-macros
2024-07-30 22:47:19 +00:00
%ifarch %{valgrind_arches}
2011-01-03 20:06:28 +00:00
BuildRequires : valgrind-devel
2011-01-07 16:56:06 +00:00
%endif
2011-01-03 20:06:28 +00:00
2011-08-19 23:04:38 +00:00
%if %{run_selftests}
2011-01-03 20:06:28 +00:00
# Used by the selftests, though not by the build:
BuildRequires : gc-devel
2011-08-19 23:04:38 +00:00
# For use in the selftests, for recording stats:
BuildRequires : time
# For use in the selftests, for imposing a per-test timeout:
2017-07-12 12:16:20 +00:00
BuildRequires : perl-interpreter
2011-08-19 23:04:38 +00:00
%endif
2015-11-24 08:56:50 +00:00
# All arches have execstack
BuildRequires : execstack
2011-01-03 20:06:28 +00:00
2011-08-03 17:02:57 +00:00
# For byte-compiling the JIT-viewing mode:
2011-09-13 09:00:09 +00:00
%if %{with_emacs}
2011-08-03 17:02:57 +00:00
BuildRequires : emacs
2011-09-13 09:00:09 +00:00
%endif
2011-08-03 17:02:57 +00:00
2018-08-21 10:10:46 +00:00
# For %%autosetup -S git
BuildRequires : %{_bindir} /git
%if %{with rpmwheels}
2020-02-12 16:46:18 +00:00
BuildRequires : python-setuptools-wheel < 45
2018-08-21 10:10:46 +00:00
BuildRequires : python-pip-wheel
%endif
2011-01-03 20:06:28 +00:00
# Metadata for the core package (the JIT build):
2015-06-11 09:40:49 +00:00
Requires : %{name} -libs%{?_isa} = %{version} -%{release}
2017-07-03 13:53:05 +00:00
Provides : %{ver_name} = %{version} -%{release}
Provides : %{ver_name} %{_isa} = %{version} -%{release}
2019-02-28 23:07:40 +00:00
Provides : pypy%{pyversion} = %{version} -%{release}
Provides : pypy%{pyversion} %{_isa} = %{version} -%{release}
2018-04-11 22:20:26 +00:00
Provides : %{ver_name} (abi) = %{basever}
2011-01-03 20:06:28 +00:00
%description
2011-04-30 22:24:07 +00:00
PyPy's implementation of Python, featuring a Just-In-Time compiler on some CPU
architectures, and various optimized implementations of the standard types
(strings, dictionaries, etc)
%if 0%{with_jit}
This build of PyPy has JIT-compilation enabled.
%else
This build of PyPy has JIT-compilation disabled, as it is not supported on this
CPU architecture.
%endif
2011-01-03 20:06:28 +00:00
%package libs
Summary : Run-time libraries used by PyPy implementations of Python
2011-08-03 17:02:57 +00:00
2020-02-12 16:46:18 +00:00
%if %{without rpmwheels}
2021-05-25 19:55:49 +00:00
# PyPy is MIT and Python and UCD and BSD and (ASL 2.0 or BSD) (see the main package license)
2020-02-12 16:46:18 +00:00
# setuptools is MIT and bundles:
# packaging: BSD or ASL 2.0
# pyparsing: MIT
# six: MIT
# pip is MIT and bundles:
# appdirs: MIT
# distlib: Python
# distro: ASL 2.0
# html5lib: MIT
# six: MIT
# colorama: BSD
# CacheControl: ASL 2.0
# msgpack-python: ASL 2.0
# lockfile: MIT
# progress: ISC
# ipaddress: Python
# packaging: ASL 2.0 or BSD
# pep517: MIT
# pyparsing: MIT
# pytoml: MIT
# retrying: ASL 2.0
# requests: ASL 2.0
# chardet: LGPLv2
# idna: BSD
# urllib3: MIT
# certifi: MPLv2.0
# setuptools: MIT
# webencodings: BSD
2021-05-25 19:55:49 +00:00
License : MIT and Python and UCD and BSD and (ASL 2.0 or BSD) and BSD and ASL 2.0 and ISC and LGPLv2 and MPLv2.0 and (ASL 2.0 or BSD)
2020-02-12 16:46:18 +00:00
%endif
2011-08-03 17:02:57 +00:00
# We supply an emacs mode for the JIT viewer.
# (This doesn't bring in all of emacs, just the directory structure)
2011-09-13 09:00:09 +00:00
%if %{with_emacs}
2011-08-03 17:02:57 +00:00
Requires : emacs-filesystem >= %{_emacs_version}
2011-09-13 09:00:09 +00:00
%endif
2011-08-03 17:02:57 +00:00
2018-08-21 10:10:46 +00:00
%if %{with rpmwheels}
2020-02-12 16:46:18 +00:00
Requires : python-setuptools-wheel < 45
2018-08-21 10:10:46 +00:00
Requires : python-pip-wheel
%else
2020-04-22 10:38:46 +00:00
Provides : bundled(python2dist(setuptools)) = 44.0.0
2020-02-12 16:46:18 +00:00
Provides : bundled(python2dist(packaging)) = 16.8
Provides : bundled(python2dist(pyparsing)) = 2.2.1
Provides : bundled(python2dist(six)) = 1.10.0
2020-04-22 10:38:46 +00:00
Provides : bundled(python2dist(pip)) = 20.0.2
2020-02-12 16:46:18 +00:00
Provides : bundled(python2dist(appdirs)) = 1.4.3
2020-04-22 10:38:46 +00:00
Provides : bundled(python2dist(CacheControl)) = 0.12.6
Provides : bundled(python2dist(contextlib2)) = 0.6.0
Provides : bundled(python2dist(certifi)) = 2019.11.28
2020-02-12 16:46:18 +00:00
Provides : bundled(python2dist(chardet)) = 3.0.4
2020-04-22 10:38:46 +00:00
Provides : bundled(python2dist(colorama)) = 0.4.3
Provides : bundled(python2dist(distlib)) = 0.3.0
2020-02-12 16:46:18 +00:00
Provides : bundled(python2dist(distro)) = 1.4.0
Provides : bundled(python2dist(html5lib)) = 1.0.1
Provides : bundled(python2dist(idna)) = 2.8
2020-04-22 10:38:46 +00:00
Provides : bundled(python2dist(ipaddress)) = 1.0.23
2020-02-12 16:46:18 +00:00
Provides : bundled(python2dist(lockfile)) = 0.12.2
2020-04-22 10:38:46 +00:00
Provides : bundled(python2dist(msgpack)) = 0.6.2
Provides : bundled(python2dist(packaging)) = 20.1
Provides : bundled(python2dist(pep517)) = 0.7.0
2020-02-12 16:46:18 +00:00
Provides : bundled(python2dist(progress)) = 1.5
2020-04-22 10:38:46 +00:00
Provides : bundled(python2dist(pyparsing)) = 2.4.6
Provides : bundled(python2dist(pytoml)) = 0.1.21
2020-02-12 16:46:18 +00:00
Provides : bundled(python2dist(requests)) = 2.22.0
Provides : bundled(python2dist(retrying)) = 1.3.3
2020-04-22 10:38:46 +00:00
Provides : bundled(python2dist(setuptools)) = 44.0.0
Provides : bundled(python2dist(six)) = 1.14.0
Provides : bundled(python2dist(urllib3)) = 1.25.7
2020-02-12 16:46:18 +00:00
Provides : bundled(python2dist(webencodings)) = 0.5.1
2018-08-21 10:10:46 +00:00
%endif
2021-05-25 19:55:49 +00:00
# Find the version in lib_pypy/cffi/_pycparser/__init__.py
2024-07-29 16:02:40 +00:00
Provides : bundled(python2dist(pycparser)) = 2.22
2021-05-25 19:55:49 +00:00
# Find the version in lib_pypy/cffi/_pycparser/ply/__init__.py
Provides : bundled(python2dist(ply)) = 3.9
# Find the version in lib_pypy/_cffi_ssl/cryptography/__about__.py
Provides : bundled(python2dist(cryptography)) = 2.7
2017-07-03 13:53:05 +00:00
Provides : %{ver_name} -libs = %{version} -%{release}
Provides : %{ver_name} -libs%{_isa} = %{version} -%{release}
2019-02-28 23:07:40 +00:00
Provides : pypy%{pyversion} -libs = %{version} -%{release}
Provides : pypy%{pyversion} -libs%{_isa} = %{version} -%{release}
2011-01-03 20:06:28 +00:00
%description libs
Libraries required by the various PyPy implementations of Python.
2011-01-14 00:51:26 +00:00
%package devel
Summary : Development tools for working with PyPy
2015-06-11 09:40:49 +00:00
Requires : %{name} %{?_isa} = %{version} -%{release}
2017-07-03 13:53:05 +00:00
Provides : %{ver_name} -devel = %{version} -%{release}
Provides : %{ver_name} -devel%{_isa} = %{version} -%{release}
2019-02-28 23:07:40 +00:00
Provides : pypy%{pyversion} -devel = %{version} -%{release}
Provides : pypy%{pyversion} -devel%{_isa} = %{version} -%{release}
2014-09-02 07:57:46 +00:00
2011-01-14 00:51:26 +00:00
%description devel
Header files for building C extension modules against PyPy
2011-01-03 20:06:28 +00:00
%if 0%{with_stackless}
%package stackless
Summary : Stackless Python interpreter built using PyPy
2015-06-11 09:40:49 +00:00
Requires : %{name} -libs%{?_isa} = %{version} -%{release}
2017-07-03 13:53:05 +00:00
Provides : %{ver_name} -stackless = %{version} -%{release}
Provides : %{ver_name} -stackless%{_isa} = %{version} -%{release}
2019-02-28 23:07:40 +00:00
Provides : pypy%{pyversion} -stackless = %{version} -%{release}
Provides : pypy%{pyversion} -stackless%{_isa} = %{version} -%{release}
2011-01-03 20:06:28 +00:00
%description stackless
Build of PyPy with support for micro-threads for massive concurrency
%endif
%prep
2019-02-28 23:07:40 +00:00
%autosetup -n pypy%{pyversion} -v%{version} -src -p1 -S git
2018-08-21 10:10:46 +00:00
2021-05-04 08:46:51 +00:00
# Temporary workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1954999
%{?!apply_patch:%define apply_patch(qp:m:) {%__apply_patch %**}}
2018-08-21 10:10:46 +00:00
%if %{with rpmwheels}
%apply_patch -m %(basename %{SOURCE189} ) %{SOURCE189}
rm lib-python/2.7/ensurepip/_bundled/*.whl
rmdir lib-python/2.7/ensurepip/_bundled
%endif
2024-04-17 01:43:57 +00:00
# Patch the bundled pip wheel for CVE-2023-5752
%if %{without rpmwheels}
unzip -qq lib-python/2.7/ensurepip/_bundled/pip-20.0.2-py2.py3-none-any.whl
patch -p1 < %{SOURCE3}
zip -rq lib-python/2.7/ensurepip/_bundled/pip-20.0.2-py2.py3-none-any.whl pip pip-20.0.2.dist-info
rm -rf pip/ pip-20.0.2.dist-info/
%endif
2018-08-29 14:02:48 +00:00
# Replace /usr/local/bin/python or /usr/bin/env python shebangs with /usr/bin/python2 or pypy2:
find \( -name " * . p y " -o -name " p y . c l e a n u p " \) -exec \
2011-01-03 20:06:28 +00:00
sed \
2018-08-29 14:02:48 +00:00
-i -r -e " s @ / u s r / ( l o c a l / ) ? b i n / ( e n v ) ? p y t h o n ( 2 | 3 ) ? @ / u s r / b i n / %{bootstrap_python_interp} @ " \
2011-01-03 20:06:28 +00:00
" { } " \
\;
2013-06-24 06:57:35 +00:00
for f in rpython/translator/goal/bpnn.py ; do
2011-01-03 20:06:28 +00:00
# Detect shebang lines && remove them:
sed -e '/^#!/Q 0' -e 'Q 1' $f \
&& sed -i '1d' $f
chmod a-x $f
done
2014-09-23 10:20:25 +00:00
rm -rf lib-python/3
2015-06-11 09:40:49 +00:00
# Replace all lib-python python shebangs with pypy
find lib-python/%{pylibver} -name " * . p y " -exec \
sed -r -i '1s|^#!\s*/usr/bin.*python.*|#!/usr/bin/%{name}|' \
" { } " \
\;
2013-08-16 08:12:29 +00:00
2019-10-18 22:41:07 +00:00
%if ! 0%{use_self_when_building}
# use the pycparser from PyPy even on CPython
ln -s lib_pypy/cffi/_pycparser pycparser
%endif
2021-10-27 06:42:41 +00:00
# Remove windows executable binaries
rm lib-python/2.7/distutils/command/*.exe
2011-01-03 20:06:28 +00:00
%build
2016-11-30 01:20:16 +00:00
%ifarch s390x
# pypy3 requires z10 at least
%global optflags %(echo %{optflags} | sed 's/-march=z9-109 /-march=z10 /' )
%endif
2011-01-03 20:06:28 +00:00
2024-07-30 22:47:19 +00:00
%ifarch riscv64
export PYPY_MULTIARCH=riscv64-linux-gnu
%endif
2011-01-03 20:06:28 +00:00
BuildPyPy() {
ExeName=$1
Options=$2
echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "
echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "
echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "
echo " S T A R T I N G B U I L D O F : $ E x e N a m e "
echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "
echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "
echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "
pushd %{goal_dir}
# The build involves invoking a python script, passing in particular
# arguments, environment variables, etc.
# Some notes on those follow:
# The generated binary embeds copies of the values of all environment
# variables. We need to unset "RPM_BUILD_ROOT" to avoid a fatal error from
# /usr/lib/rpm/check-buildroot
# during the postprocessing of the rpmbuild, complaining about this
# reference to the buildroot
# By default, pypy's autogenerated C code is placed in
# /tmp/usession-N
#
# and it appears that this stops rpm from extracting the source code to the
# debuginfo package
#
# The logic in pypy-1.4/pypy/tool/udir.py indicates that it is generated in:
# $PYPY_USESSION_DIR/usession-$PYPY_USESSION_BASENAME-N
# and so we set PYPY_USESSION_DIR so that this tempdir is within the build
# location, and set $PYPY_USESSION_BASENAME so that the tempdir is unique
# for each invocation of BuildPyPy
# Compilation flags for C code:
# pypy-1.4/pypy/translator/c/genc.py:gen_makefile
# assembles a Makefile within
# THE_UDIR/testing_1/Makefile
# calling out to platform.gen_makefile
# For us, that's
# pypy-1.4/pypy/translator/platform/linux.py: class BaseLinux(BasePosix):
# which by default has:
# CFLAGS = ['-O3', '-pthread', '-fomit-frame-pointer',
# '-Wall', '-Wno-unused']
# plus all substrings from CFLAGS in the environment.
# This is used to generate a value for CFLAGS that's written into the Makefile
2011-12-16 22:15:41 +00:00
# How will we track garbage-collection roots in the generated code?
# http://pypy.readthedocs.org/en/latest/config/translation.gcrootfinder.html
# This is the most portable option, and avoids a reliance on non-guaranteed
# behaviors within GCC's code generator: use an explicitly-maintained stack
# of root pointers:
2015-06-11 09:40:49 +00:00
%global gcrootfinder_options --gcrootfinder=shadowstack
2011-12-16 22:15:41 +00:00
2016-02-01 11:48:29 +00:00
export CFLAGS=$(echo " $RPM_OPT_FLAGS " | sed -e 's/-g//' )
2011-12-16 22:15:41 +00:00
# The generated C code leads to many thousands of warnings of the form:
# warning: variable 'l_v26003' set but not used [-Wunused-but-set-variable]
# Suppress them:
2012-06-18 08:50:36 +00:00
export CFLAGS=$(echo " $ C F L A G S " -Wno-unused -fPIC)
2011-12-16 22:15:41 +00:00
2011-01-03 20:06:28 +00:00
# If we're already built the JIT-enabled "pypy", then use it for subsequent
# builds (of other configurations):
if test -x './pypy' ; then
INTERP='./pypy'
2017-11-20 14:05:38 +00:00
%ifarch %{arm}
# Reduce memory usage on arm during installation
PYPY_GC_MAX_DELTA=200MB $INTERP --jit loop_longevity=300 ../../rpython/bin/rpython -Ojit targetpypystandalone
%endif
2011-01-03 20:06:28 +00:00
else
2011-01-06 22:09:03 +00:00
# First pypy build within this rpm build?
# Fall back to using the bootstrap python interpreter, which might be a
# system copy of pypy from an earlier rpm, or be cpython's /usr/bin/python:
INTERP='%{bootstrap_python_interp}'
2011-01-03 20:06:28 +00:00
fi
# Here's where we actually invoke the build:
2015-08-17 08:00:20 +00:00
RPM_BUILD_ROOT= \
PYPY_USESSION_DIR=$(pwd) \
PYPY_USESSION_BASENAME=$ExeName \
$INTERP ../../rpython/bin/rpython \
%{gcrootfinder_options} \
$Options \
2024-07-30 22:47:19 +00:00
%ifarch riscv64
targetpypystandalone \
--withoutmod-_continuation
%else
2015-08-17 08:00:20 +00:00
targetpypystandalone
2024-07-30 22:47:19 +00:00
%endif
2011-01-03 20:06:28 +00:00
echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "
echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "
echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "
echo " F I N I S H E D B U I L D I N G : $ E x e N a m e "
echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "
echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "
echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "
popd
}
BuildPyPy \
2015-06-11 09:40:49 +00:00
%{name} \
2011-04-30 22:24:07 +00:00
%if 0%{with_jit}
" - O j i t " \
fix build on non-jit arches
Build on non-jit arch like s390 fails with
[translation:info] Translating target as defined by targetpypystandalone
[platform:msg] Setting platform to 'host' cc=None
Traceback (most recent call last):
File "translate.py", line 322, in <module>
main()
File "translate.py", line 208, in main
targetspec_dic, translateconfig, config, args = parse_options_and_load_target()
File "translate.py", line 176, in parse_options_and_load_target
targetspec_dic['handle_config'](config, translateconfig)
File "targetpypystandalone.py", line 109, in handle_config
raise Exception("You have to specify the --opt level.\n"
Exception: You have to specify the --opt level.
Try --opt=2 or --opt=jit, or equivalently -O2 or -Ojit .
2011-05-11 08:15:52 +00:00
%else
" - O 2 " \
2011-01-03 20:06:28 +00:00
%endif
2011-04-30 22:24:07 +00:00
%{nil}
2011-01-03 20:06:28 +00:00
%if 0%{with_stackless}
BuildPyPy \
2015-06-11 09:40:49 +00:00
%{name} -stackless \
2011-01-03 20:06:28 +00:00
" - - s t a c k l e s s "
%endif
2011-09-13 09:00:09 +00:00
%if %{with_emacs}
2013-06-24 06:57:35 +00:00
%{_emacs_bytecompile} rpython/jit/tool/pypytrace-mode.el
2011-09-13 09:00:09 +00:00
%endif
2011-08-03 17:02:57 +00:00
2013-08-16 08:12:29 +00:00
2011-01-03 20:06:28 +00:00
%install
mkdir -p %{buildroot} /%{_bindir}
2012-01-31 09:53:38 +00:00
mkdir -p %{buildroot} /%{pypyprefix}
2011-01-03 20:06:28 +00:00
2015-08-17 08:00:20 +00:00
#%if 0%{with_stackless}
#InstallPyPy %{name}-stackless
#%endif
2011-01-03 20:06:28 +00:00
2018-04-05 05:15:33 +00:00
# Run installing script, archive-name %{name}-%{basever} in %{buildroot}/%{_libdir} == %{pypyprefix}
2021-05-20 18:51:43 +00:00
%{bootstrap_python_interp} pypy/tool/release/package.py --archive-name %{name} -%{basever} --builddir %{buildroot} /%{_libdir} --no-embedded-dependencies
2012-12-13 11:16:11 +00:00
2011-01-03 20:06:28 +00:00
# Remove shebang lines from .py files that aren't executable, and
# remove executability from .py files that don't have a shebang line:
2015-08-19 14:20:33 +00:00
find \
%{buildroot} \
-name " * . p y " \
\( \
\( \! -perm /u+x,g+x,o+x -exec sed -e '/^#!/Q 0' -e 'Q 1' {} \; \
-print -exec sed -i '1d' {} \; \
\) \
-o \
\( \
-perm /u+x,g+x,o+x ! -exec grep -m 1 -q '^#!' {} \; \
-exec chmod a-x {} \; \
\) \
\)
2011-01-03 20:06:28 +00:00
2015-11-24 08:56:50 +00:00
execstack --clear-execstack %{buildroot} /%{pypyprefix} /bin/pypy
2011-01-14 00:51:26 +00:00
2017-11-30 16:04:22 +00:00
# Bytecompile all of the .py files we ship, using our pypy binary, giving us
2021-07-21 14:17:39 +00:00
# .pyc files for pypy.
2017-11-30 16:04:22 +00:00
#
# Note that some of the test files deliberately contain syntax errors, so
2021-07-21 14:17:39 +00:00
# we are running it in subshell, to be able to ignore the failures and not to terminate the build.
(%{py_byte_compile %{buildroot} %{pypyprefix} /bin/pypy %{buildroot} %{pypyprefix} }) || :
2017-11-30 16:04:22 +00:00
%{buildroot} %{pypyprefix} /bin/%{name} -c 'import _tkinter'
%{buildroot} %{pypyprefix} /bin/%{name} -c 'import Tkinter'
%{buildroot} %{pypyprefix} /bin/%{name} -c 'import _sqlite3'
%{buildroot} %{pypyprefix} /bin/%{name} -c 'import _curses'
%{buildroot} %{pypyprefix} /bin/%{name} -c 'import curses'
%{buildroot} %{pypyprefix} /bin/%{name} -c 'import syslog'
%{buildroot} %{pypyprefix} /bin/%{name} -c 'from _sqlite3 import *'
2011-01-14 00:51:26 +00:00
# Header files for C extension modules.
# Upstream's packaging process (pypy/tool/release/package.py)
# creates an "include" subdir and copies all *.h/*.inl from "include" there
# (it also has an apparently out-of-date comment about copying them from
# pypy/_interfaces, but this directory doesn't seem to exist, and it doesn't
# seem to do this as of 2011-01-13)
2011-01-06 22:09:03 +00:00
# Capture the RPython source code files from the build within the debuginfo
# package (rhbz#666975)
2015-08-26 08:24:28 +00:00
%global pypy_debuginfo_dir /usr/src/debug/pypy-%{version} -src
mkdir -p %{buildroot} %{pypy_debuginfo_dir}
2011-01-06 22:09:03 +00:00
# copy over everything:
2015-08-26 08:24:28 +00:00
cp -a pypy %{buildroot} %{pypy_debuginfo_dir}
2011-01-06 22:09:03 +00:00
2012-07-10 20:45:52 +00:00
# ...then delete files that aren't:
# - *.py files
# - the Makefile
# - typeids.txt
# - dynamic-symbols-*
2015-08-17 08:00:20 +00:00
#find \
# %{buildroot}%{pypy_debuginfo_dir} \
# \( -type f \
# -a \
# \! \( -name "*.py" \
# -o \
# -name "Makefile" \
# -o \
# -name "typeids.txt" \
# -o \
# -name "dynamic-symbols-*" \
# \) \
# \) \
# -delete
2011-01-06 22:09:03 +00:00
2012-07-10 20:45:52 +00:00
# Alternatively, we could simply keep everything. This leads to a ~350MB
# debuginfo package, but it makes it easy to hack on the Makefile and C build
# flags by rebuilding/linking the sources.
# To do so, remove the above "find" command.
2011-01-06 22:09:03 +00:00
# We don't need bytecode for these files; they are being included for reference
# purposes.
# There are some rpmlint warnings from these files:
# non-executable-script
# wrong-script-interpreter
# zero-length
# script-without-shebang
# dangling-symlink
# but given that the objective is to preserve a copy of the source code, those
# are acceptable.
2011-08-03 17:02:57 +00:00
# Install the JIT trace mode for Emacs:
2011-09-13 09:00:09 +00:00
%if %{with_emacs}
2011-08-03 17:02:57 +00:00
mkdir -p %{buildroot} /%{_emacs_sitelispdir}
2015-06-11 09:40:49 +00:00
cp -a rpython/jit/tool/pypytrace-mode.el %{buildroot} /%{_emacs_sitelispdir} /%{name} trace-mode.el
cp -a rpython/jit/tool/pypytrace-mode.elc %{buildroot} /%{_emacs_sitelispdir} /%{name} trace-mode.elc
2011-09-13 09:00:09 +00:00
%endif
2011-08-03 17:02:57 +00:00
2017-12-08 09:36:43 +00:00
# Create executables pypy, pypy2 and pypy2.7
ln -sf %{pypyprefix} /bin/%{name} %{buildroot} %{_bindir} /%{name} %{pylibver}
ln -sf %{_bindir} /%{name} %{pylibver} %{buildroot} %{_bindir} /%{name} %{pymajorlibver}
ln -sf %{_bindir} /%{name} %{pymajorlibver} %{buildroot} %{_bindir} /%{name}
2015-08-17 08:00:20 +00:00
# Move files to the right places and remove unnecessary files
mv %{buildroot} /%{pypyprefix} /bin/libpypy-c.so %{buildroot} /%{_libdir}
2018-04-05 05:15:33 +00:00
rm -rf %{buildroot} /%{_libdir} /%{name} -%{basever} .tar.bz2
2015-08-17 08:00:20 +00:00
rm -rf %{buildroot} /%{pypyprefix} /README.rst
rm -rf %{buildroot} /%{pypyprefix} /README.rst
2016-05-13 18:04:19 +00:00
rm -rf %{buildroot} /%{pypy_include_dir} /README
2015-08-17 08:00:20 +00:00
chrpath --delete %{buildroot} /%{pypyprefix} /bin/%{name}
2011-08-25 15:58:55 +00:00
# Install macros for rpm:
2014-02-03 12:24:01 +00:00
mkdir -p %{buildroot} /%{_rpmconfigdir} /macros.d
2018-04-10 23:18:25 +00:00
install -m 644 %{SOURCE1} %{buildroot} /%{_rpmconfigdir} /macros.d
2014-02-03 12:24:01 +00:00
install -m 644 %{SOURCE2} %{buildroot} /%{_rpmconfigdir} /macros.d
2011-08-25 15:58:55 +00:00
2015-06-11 09:40:49 +00:00
# Remove build script from the package
2015-08-17 08:00:20 +00:00
#rm %{buildroot}/%{pypyprefix}/lib_pypy/ctypes_config_cache/rebuild.py
2015-06-11 09:40:49 +00:00
2018-03-27 17:25:47 +00:00
# since 5.10.0, the debug binaries are built and shipped, making the
# pypy package ~350 MiB. let's remove them here for now and TODO figure out why
rm -f %{buildroot} %{pypyprefix} /bin/pypy.debug
rm -f %{buildroot} %{pypyprefix} /bin/libpypy-c.so.debug
2011-01-03 20:06:28 +00:00
%check
topdir=$(pwd)
SkipTest() {
TEST_NAME=$1
2011-08-25 18:50:53 +00:00
sed -i -e" s | ^ $ T E S T _ N A M E $ | | g " testnames.txt
2011-01-03 20:06:28 +00:00
}
CheckPyPy() {
# We'll be exercising one of the freshly-built binaries using the
# test suite from the standard library (overridden in places by pypy's
# modified version)
ExeName=$1
echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "
echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "
echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "
echo " S T A R T I N G T E S T O F : $ E x e N a m e "
echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "
echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "
echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "
pushd %{goal_dir}
2011-08-19 23:04:38 +00:00
# I'm seeing numerous cases where tests seem to hang, or fail unpredictably
# So we'll run each test in its own process, with a timeout
# Use regrtest to explicitly list all tests:
( ./$ExeName -c \
2015-06-11 09:40:49 +00:00
" f r o m t e s t . r e g r t e s t i m p o r t f i n d t e s t s ; p r i n t ( ' \n ' . j o i n ( f i n d t e s t s ( ) ) ) "
2011-08-19 23:04:38 +00:00
) > testnames.txt
2011-08-25 15:58:55 +00:00
# Skip some tests:
# "audioop" doesn't exist for pypy yet:
SkipTest test_audioop
# The gdb CPython hooks haven't been ported to cpyext:
SkipTest test_gdb
# hotshot relies heavily on _hotshot, which doesn't exist:
SkipTest test_hotshot
# "strop" module doesn't exist for pypy yet:
SkipTest test_strop
2011-10-04 18:37:40 +00:00
# I'm seeing Koji builds hanging e.g.:
# http://koji.fedoraproject.org/koji/getfile?taskID=3386821&name=build.log
# The only test that seems to have timed out in that log is
# test_multiprocessing, so skip it for now:
SkipTest test_multiprocessing
2011-08-19 23:04:38 +00:00
echo " = = T e s t n a m e s = = "
cat testnames.txt
echo " = = = = = = = = = = = = = = = = = "
echo " " > failed-tests.txt
for TestName in $(cat testnames.txt) ; do
echo " = = = = = = = = = = = = = = = = = = = " $TestName " = = = = = = = = = = = = = = = = = = = = "
# Use /usr/bin/time (rather than the shell "time" builtin) to gather
# info on the process (time/CPU/memory). This passes on the exit
# status of the underlying command
#
# Use perl's alarm command to impose a timeout
# 900 seconds is 15 minutes per test.
# If a test hangs, that test should get terminated, allowing the build
# to continue.
#
# Invoke pypy on test.regrtest to run the specific test suite
# verbosely
#
# For now, || true, so that any failures don't halt the build:
( /usr/bin/time \
perl -e 'alarm shift @ARGV; exec @ARGV' 900 \
./$ExeName -m test.regrtest -v $TestName ) \
|| (echo $TestName >> failed-tests.txt) \
|| true
done
echo " = = F a i l e d t e s t s = = "
cat failed-tests.txt
echo " = = = = = = = = = = = = = = = = = "
2011-01-03 20:06:28 +00:00
popd
# Doublecheck pypy's own test suite, using the built pypy binary:
# Disabled for now:
# x86_64 shows various failures inside:
# jit/backend/x86/test
# followed by a segfault inside
# jit/backend/x86/test/test_runner.py
#
# i686 shows various failures inside:
# jit/backend/x86/test
# with the x86_64 failure leading to cancellation of the i686 build
# Here's the disabled code:
# pushd pypy
# time translator/goal/$ExeName test_all.py
# popd
echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "
echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "
echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "
echo " F I N I S H E D T E S T I N G : $ E x e N a m e "
echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "
echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "
echo " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "
}
2014-01-02 09:47:41 +00:00
#python testrunner/runner.py --logfile=pytest-A.log --config=pypy/pytest-A.cfg --config=pypy/pytest-A.py --root=pypy --timeout=3600
#python pypy/test_all.py --pypy=pypy/goal/pypy --timeout=3600 --resultlog=cpython.log lib-python
#python pypy/test_all.py --pypy=pypy/goal/pypy --resultlog=pypyjit.log pypy/module/pypyjit/test
#pypy/goal/pypy pypy/test_all.py --resultlog=pypyjit_new.log
2011-08-19 23:04:38 +00:00
%if %{run_selftests}
2015-08-17 08:00:20 +00:00
CheckPyPy %{name} -c
2011-01-03 20:06:28 +00:00
%if 0%{with_stackless}
2015-08-17 08:00:20 +00:00
CheckPyPy %{name} -c-stackless
2011-01-03 20:06:28 +00:00
%endif
2011-08-19 23:04:38 +00:00
%endif # run_selftests
2011-01-03 20:06:28 +00:00
2015-06-11 09:40:49 +00:00
# Because there's a bunch of binary subpackages and creating
2019-07-12 12:48:12 +00:00
# /usr/share/doc/pypy3-this and /usr/share/doc/pypy3-that
2015-06-11 09:40:49 +00:00
# is just confusing for the user.
%global _docdir_fmt %{name}
2011-01-03 20:06:28 +00:00
%files libs
2015-06-11 09:40:49 +00:00
%doc README.rst
2011-01-03 20:06:28 +00:00
%dir %{pypyprefix}
%dir %{pypyprefix} /lib-python
2019-07-12 12:48:12 +00:00
%license %{pypyprefix} /LICENSE
2015-08-17 08:00:20 +00:00
%{_libdir} /libpypy-c.so
2011-01-03 20:06:28 +00:00
%{pypyprefix} /lib-python/%{pylibver} /
%{pypyprefix} /lib_pypy/
%{pypyprefix} /site-packages/
2011-09-13 09:00:09 +00:00
%if %{with_emacs}
2015-06-11 09:40:49 +00:00
%{_emacs_sitelispdir} /%{name} trace-mode.el
%{_emacs_sitelispdir} /%{name} trace-mode.elc
2011-09-13 09:00:09 +00:00
%endif
2011-01-03 20:06:28 +00:00
%files
2015-06-11 09:40:49 +00:00
%doc README.rst
%{_bindir} /%{name}
2017-12-08 09:36:43 +00:00
%{_bindir} /%{name} %{pylibver}
%{_bindir} /%{name} %{pymajorlibver}
2022-03-30 17:31:38 +00:00
%{pypyprefix} /bin/
2011-01-03 20:06:28 +00:00
2011-01-14 00:51:26 +00:00
%files devel
2016-05-13 18:04:19 +00:00
%dir %{pypy_include_dir}
%{pypy_include_dir} /*.h
2016-09-01 09:18:51 +00:00
%{pypy_include_dir} /_numpypy
2015-06-11 09:40:49 +00:00
%{_rpmconfigdir} /macros.d/macros.%{name}
2018-04-10 23:18:25 +00:00
%{_rpmconfigdir} /macros.d/macros.%{name} %{pymajorlibver}
2011-01-14 00:51:26 +00:00
2011-01-03 20:06:28 +00:00
%if 0%{with_stackless}
%files stackless
2015-06-11 09:40:49 +00:00
%doc README.rst
%{_bindir} /%{name} -stackless
2011-01-03 20:06:28 +00:00
%endif
%changelog
2024-01-29 14:34:44 +00:00
%autochangelog