Compare commits

...

6 Commits

Author SHA1 Message Date
1265675c3a
Update pypy3.9.spec for riscv64
Signed-off-by: Jason Montleon <jmontleo@redhat.com>
2024-07-30 18:53:37 -04:00
052faf37d3
Merge remote-tracking branch 'up/main' into main-riscv64
Signed-off-by: Jason Montleon <jmontleo@redhat.com>
2024-07-30 18:49:52 -04:00
Miro Hrončok
c52271071f Update to 7.3.16
- Fixes: rhbz#2276782

This partially reverts 7384206c16
Upstream apparently updated ensurepip to Python 3.10 accidentally in 7.3.15.
https://github.com/pypy/pypy/pull/4935 reverted back to Python 3.9.
2024-07-30 10:24:05 +02:00
2c98f0522e
Update rpm spec for riscv64
Signed-off-by: Jason Montleon <jmontleo@redhat.com>
2024-07-29 21:06:02 -04:00
Miro Hrončok
376e422e0c Explicitly BuildRequire binutils-gold when using it
2175d42ba1
- Remove "Requires: binutils-gold" from binutils sub-package.
2024-07-30 01:34:38 +02:00
Miro Hrončok
23628516b2 Fix build with https://fedoraproject.org/wiki/Changes/OpensslDeprecateEngine 2024-07-29 20:47:44 +02:00
5 changed files with 84 additions and 37 deletions

1
.gitignore vendored
View File

@ -25,3 +25,4 @@
/pypy3.9-v7.3.12-src.tar.bz2
/pypy3.9-v7.3.13-src.tar.bz2
/pypy3.9-v7.3.15-src.tar.bz2
/pypy3.9-v7.3.16-src.tar.bz2

View File

@ -1,25 +0,0 @@
From 2d689b133337084a6f00982462b58486bf6bd3a4 Mon Sep 17 00:00:00 2001
From: mattip <matti.picus@gmail.com>
Date: Tue, 19 Mar 2024 08:45:03 +0200
Subject: [PATCH] fix 'const' in signature of Tcl_Merge (issue 4926)
---
lib_pypy/_tkinter/tklib_build.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib_pypy/_tkinter/tklib_build.py b/lib_pypy/_tkinter/tklib_build.py
index 0e4e93c..44c1d10 100644
--- a/lib_pypy/_tkinter/tklib_build.py
+++ b/lib_pypy/_tkinter/tklib_build.py
@@ -171,7 +171,7 @@ int Tcl_ListObjGetElements(Tcl_Interp *interp, Tcl_Obj *listPtr, int *objcPtr, T
int Tcl_ListObjLength(Tcl_Interp* interp, Tcl_Obj* listPtr, int* intPtr);
int Tcl_ListObjIndex(Tcl_Interp* interp, Tcl_Obj* listPtr, int index, Tcl_Obj** objPtrPtr);
int Tcl_SplitList(Tcl_Interp* interp, char* list, int* argcPtr, const char*** argvPtr);
-char* Tcl_Merge(int argc, char** argv);
+char* Tcl_Merge(int argc, const char * const* argv);
int Tcl_Eval(Tcl_Interp* interp, const char* script);
int Tcl_EvalFile(Tcl_Interp* interp, const char* filename);
--
2.43.2

61
189-use-rpm-wheels.patch Normal file
View File

@ -0,0 +1,61 @@
diff --git a/lib-python/3/ensurepip/__init__.py b/lib-python/3/ensurepip/__init__.py
index e510cc7..8b736b8 100644
--- a/lib-python/3/ensurepip/__init__.py
+++ b/lib-python/3/ensurepip/__init__.py
@@ -1,3 +1,5 @@
+import distutils.version
+import glob
import os
import os.path
import sys
@@ -6,13 +8,28 @@ import tempfile
import subprocess
from importlib import resources
-from . import _bundled
+__all__ = ["version", "bootstrap"]
+_WHEEL_DIR = "/usr/share/python-wheels/"
+
+_wheels = {}
+
+def _get_most_recent_wheel_version(pkg):
+ prefix = os.path.join(_WHEEL_DIR, "{}-".format(pkg))
+ _wheels[pkg] = {}
+ for suffix in "-py2.py3-none-any.whl", "-py3-none-any.whl":
+ pattern = "{}*{}".format(prefix, suffix)
+ for path in glob.glob(pattern):
+ version_str = path[len(prefix):-len(suffix)]
+ _wheels[pkg][version_str] = os.path.basename(path)
+ return str(max(_wheels[pkg], key=distutils.version.LooseVersion))
+
+
+_SETUPTOOLS_VERSION = _get_most_recent_wheel_version("setuptools")
+
+_PIP_VERSION = _get_most_recent_wheel_version("pip")
-__all__ = ["version", "bootstrap"]
-_SETUPTOOLS_VERSION = "58.1.0"
-_PIP_VERSION = "23.0.1"
_PROJECTS = [
("setuptools", _SETUPTOOLS_VERSION, "py3"),
("pip", _PIP_VERSION, "py3"),
@@ -101,13 +118,10 @@ def _bootstrap(*, root=None, upgrade=False, user=False,
# additional paths that need added to sys.path
additional_paths = []
for project, version, py_tag in _PROJECTS:
- wheel_name = "{}-{}-{}-none-any.whl".format(project, version, py_tag)
- whl = resources.read_binary(
- _bundled,
- wheel_name,
- )
- with open(os.path.join(tmpdir, wheel_name), "wb") as fp:
- fp.write(whl)
+ wheel_name = _wheels[project][version]
+ with open(os.path.join(_WHEEL_DIR, wheel_name), "rb") as sfp:
+ with open(os.path.join(tmpdir, wheel_name), "wb") as fp:
+ fp.write(sfp.read())
additional_paths.append(os.path.join(tmpdir, wheel_name))

View File

@ -1,5 +1,5 @@
%global basever 7.3
%global micro 15
%global micro 16
#global pre ...
%global pyversion 3.9
Name: pypy%{pyversion}
@ -11,7 +11,7 @@ Version: %{basever}.%{micro}%{?pre:~%{pre}}
# This potentially allows tags like Obsoletes: pypy3 < %%{version}-%%{release}.
# https://bugzilla.redhat.com/2053880
%global baserelease %{autorelease -n}
Release: %{baserelease}.%{pyversion}%{?dist}
Release: %{baserelease}.%{pyversion}.0.riscv64%{?dist}
Summary: Python %{pyversion} implementation with a Just-In-Time compiler
# PyPy is MIT
@ -82,6 +82,7 @@ ExcludeArch: %{ix86}
%ifarch %{ix86} x86_64 %{arm}
%global _package_note_linker gold
BuildRequires: binutils-gold
%endif
# Source and patches:
@ -113,11 +114,10 @@ Patch7: 007-remove-startup-message.patch
# https://fedoraproject.org/wiki/Changes/Replace_glibc_libcrypt_with_libxcrypt
Patch9: 009-add-libxcrypt-support.patch
# Fix function signatures uncovered by GCC 14 enforcement of
# -Wincompatible-pointer-types
# Resolved upstream:
# https://github.com/pypy/pypy/commit/8831ebf1cd4af225c2212dbade45624f9305a8f0
Patch10: 010-fix-pointers.patch
# 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
# Build-time requirements:
@ -152,6 +152,9 @@ BuildRequires: bzip2-devel
BuildRequires: ncurses-devel
BuildRequires: expat-devel
BuildRequires: openssl-devel
%if 0%{?fedora} >= 41
BuildRequires: openssl-devel-engine
%endif
BuildRequires: gdbm-devel
BuildRequires: xz-devel
@ -249,7 +252,7 @@ Requires: python-setuptools-wheel
Requires: python-pip-wheel
%else
Provides: bundled(python3dist(pip)) = 23.0.1
Provides: bundled(python3dist(setuptools)) = 65.5.0
Provides: bundled(python3dist(setuptools)) = 58.1.0
%endif
# Provides for the bundled libmpdec
@ -259,10 +262,10 @@ Provides: bundled(libmpdec) = %{libmpdec_version}
}
# Find the version in lib_pypy/cffi-XXX.dist-info/METADATA
Provides: bundled(python3dist(cffi)) = 1.16.0
Provides: bundled(python3dist(cffi)) = 1.17.0
# Find the version in lib_pypy/cffi/_pycparser/__init__.py
Provides: bundled(python3dist(pycparser)) = 2.21
Provides: bundled(python3dist(pycparser)) = 2.22
# Find the version in lib_pypy/cffi/_pycparser/ply/__init__.py
Provides: bundled(python3dist(ply)) = 3.9
@ -324,8 +327,8 @@ Header files for building C extension modules against PyPy%{pyversion}.
%{?!apply_patch:%define apply_patch(qp:m:) {%__apply_patch %**}}
%if %{with rpmwheels}
%apply_patch -m %(basename %{SOURCE189}) %{SOURCE189}
rm lib-python/3/ensurepip/_bundled/*.whl
echo "build_time_vars['WHEEL_PKG_DIR'] = '%{python_wheel_dir}'" >> lib_pypy/_sysconfigdata.py
%endif
@ -368,6 +371,10 @@ rm lib-python/3/distutils/command/*.exe
# Top memory usage is about 4.5GB on arm7hf
free
%ifarch riscv64
export PYPY_MULTIARCH=riscv64-linux-gnu
%endif
BuildPyPy() {
ExeName=$1
Options=$2
@ -448,6 +455,9 @@ BuildPyPy() {
--gcrootfinder=shadowstack \
$Options \
targetpypystandalone \
%ifarch riscv64
--withoutmod-_continuation \
%endif
--platlibdir=%{_lib}
echo "--------------------------------------------------------------"

View File

@ -1 +1 @@
SHA512 (pypy3.9-v7.3.15-src.tar.bz2) = 64faca74c507ef3e8dd2df34ad81874c24bc336e79ecf53bbbb43c21adebdea60efafe6ad38bdbf15bc2a677980d7db2c2c0affa04beb7e7e1b739d85e17f333
SHA512 (pypy3.9-v7.3.16-src.tar.bz2) = bd13cddb0b4cab4e200d2eafd8239c76209a49f8e847193c5ed0fe446ca46271446fc762cafd2aa8f410d022bc65abcd48ba7148502b70b901565e187058310d