From 7384206c169f68d0a206bee57c56ef82d3bf9e2b Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Tue, 19 Mar 2024 18:06:57 +0100 Subject: [PATCH] Update to 7.3.15 - Fixes: rhbz#2255800 --- .gitignore | 1 + 189-use-rpm-wheels.patch | 61 ---------------------------------------- pypy3.9.spec | 19 +++++-------- sources | 2 +- 4 files changed, 9 insertions(+), 74 deletions(-) delete mode 100644 189-use-rpm-wheels.patch diff --git a/.gitignore b/.gitignore index 3a926da..84fda93 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ /pypy3.9-v7.3.11-src.tar.bz2 /pypy3.9-v7.3.12-src.tar.bz2 /pypy3.9-v7.3.13-src.tar.bz2 +/pypy3.9-v7.3.15-src.tar.bz2 diff --git a/189-use-rpm-wheels.patch b/189-use-rpm-wheels.patch deleted file mode 100644 index e6e85f8..0000000 --- a/189-use-rpm-wheels.patch +++ /dev/null @@ -1,61 +0,0 @@ -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)) - diff --git a/pypy3.9.spec b/pypy3.9.spec index 24755e8..05adb2c 100644 --- a/pypy3.9.spec +++ b/pypy3.9.spec @@ -1,5 +1,5 @@ %global basever 7.3 -%global micro 13 +%global micro 15 #global pre ... %global pyversion 3.9 Name: pypy%{pyversion} @@ -113,11 +113,6 @@ Patch7: 007-remove-startup-message.patch # https://fedoraproject.org/wiki/Changes/Replace_glibc_libcrypt_with_libxcrypt Patch9: 009-add-libxcrypt-support.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: # pypy's can be rebuilt using pypy2, rather than with CPython 2; doing so @@ -248,7 +243,7 @@ Requires: python-setuptools-wheel Requires: python-pip-wheel %else Provides: bundled(python3dist(pip)) = 23.0.1 -Provides: bundled(python3dist(setuptools)) = 58.1.0 +Provides: bundled(python3dist(setuptools)) = 65.5.0 %endif # Provides for the bundled libmpdec @@ -257,8 +252,8 @@ Provides: bundled(mpdecimal) = %{libmpdec_version} Provides: bundled(libmpdec) = %{libmpdec_version} } -# Find the version in lib_pypy/cffi.dist-info/METADATA -Provides: bundled(python3dist(cffi)) = 1.15.1 +# Find the version in lib_pypy/cffi-XXX.dist-info/METADATA +Provides: bundled(python3dist(cffi)) = 1.16.0 # Find the version in lib_pypy/cffi/_pycparser/__init__.py Provides: bundled(python3dist(pycparser)) = 2.21 @@ -270,7 +265,7 @@ Provides: bundled(python3dist(ply)) = 3.9 Provides: bundled(python3dist(cryptography)) = 2.7 # Find the version in lib_pypy/hpy-XXX.dist-info/METADATA -Provides: bundled(python3dist(hpy)) = 0.0.4~~dev179+g9b5d200 +Provides: bundled(python3dist(hpy)) = 0.9.0 %description libs Libraries required by the various PyPy implementations of Python %{pyversion}. @@ -323,8 +318,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 @@ -774,7 +769,7 @@ CheckPyPy pypy%{pyversion}-c %doc README.rst %license %{pypylibdir}/LICENSE %license %{pypylibdir}/_cffi_ssl/LICENSE -%license %{pypylibdir}/cffi.dist-info/LICENSE +%license %{pypylibdir}/cffi-*.dist-info/LICENSE %license %{pypylibdir}/cffi/_pycparser/ply/LICENSE %license %{pypylibdir}/hpy-*.dist-info/LICENSE %{pypylibdir}/ diff --git a/sources b/sources index 9a21525..c60aaad 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.9-v7.3.13-src.tar.bz2) = 04b184050625f06d2acaa836a786db788c4f658f3384ebde176d0acc95044ee83dbf7193ebab1e4fd6275bed7a590d3945482294be32d8f94e8c541e053dce59 +SHA512 (pypy3.9-v7.3.15-src.tar.bz2) = 64faca74c507ef3e8dd2df34ad81874c24bc336e79ecf53bbbb43c21adebdea60efafe6ad38bdbf15bc2a677980d7db2c2c0affa04beb7e7e1b739d85e17f333