Update to 7.3.1

This commit is contained in:
Tomas Hrnciar 2020-04-20 13:08:30 +02:00
parent 2032d98680
commit 598f61d5f2
4 changed files with 46 additions and 24 deletions

1
.gitignore vendored
View File

@ -10,3 +10,4 @@
/pypy3.6-v7.1.1-src.tar.bz2
/pypy3.6-v7.2.0-src.tar.bz2
/pypy3.6-v7.3.0-src.tar.bz2
/pypy3.6-v7.3.1-src.tar.bz2

View File

@ -1,24 +1,25 @@
diff --git a/lib-python/3/ensurepip/__init__.py b/lib-python/3/ensurepip/__init__.py
index 7a0d3ee..2c9d676 100644
index 6b35b3d..97fc83b 100644
--- a/lib-python/3/ensurepip/__init__.py
+++ b/lib-python/3/ensurepip/__init__.py
@@ -1,6 +1,7 @@
@@ -1,16 +1,34 @@
+import distutils.version
+import glob
import os
import os.path
-import pkgutil
import pkgutil
import sys
+import runpy
import tempfile
@@ -8,9 +9,24 @@ import tempfile
__all__ = ["version", "bootstrap"]
-_SETUPTOOLS_VERSION = "41.2.0"
-_SETUPTOOLS_VERSION = "44.0.0"
+_WHEEL_DIR = "/usr/share/python-wheels/"
-_PIP_VERSION = "19.2.3"
-_PIP_VERSION = "20.0.2"
+_wheels = {}
+
+def _get_most_recent_wheel_version(pkg):
@ -35,10 +36,32 @@ index 7a0d3ee..2c9d676 100644
+_SETUPTOOLS_VERSION = _get_most_recent_wheel_version("setuptools")
+
+_PIP_VERSION = _get_most_recent_wheel_version("pip")
_PROJECTS = [
("setuptools", _SETUPTOOLS_VERSION),
@@ -93,13 +109,10 @@ def _bootstrap(*, root=None, upgrade=False, user=False,
@@ -23,10 +41,18 @@ def _run_pip(args, additional_paths=None):
if additional_paths is not None:
sys.path = additional_paths + sys.path
- # Install the bundled software
- import pip._internal.cli.main
- return pip._internal.cli.main.main(args)
+ # Invoke pip as if it's the main module, and catch the exit.
+ backup_argv = sys.argv[:]
+ sys.argv[1:] = args
+ try:
+ # run_module() alters sys.modules and sys.argv, but restores them at exit
+ runpy.run_module("pip", run_name="__main__", alter_sys=True)
+ except SystemExit as exc:
+ return exc.code
+ finally:
+ sys.argv[:] = backup_argv
+ raise SystemError("pip did not exit, this should never happen")
def version():
"""
@@ -93,13 +119,10 @@ def _bootstrap(*, root=None, upgrade=False, user=False,
# additional paths that need added to sys.path
additional_paths = []
for project, version in _PROJECTS:
@ -53,6 +76,6 @@ index 7a0d3ee..2c9d676 100644
+ 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,8 +1,8 @@
%global basever 7.3
Name: pypy3
Version: %{basever}.0
Version: %{basever}.1
%global pyversion 3.6
Release: 3%{?dist}
Release: 1%{?dist}
Summary: Python 3 implementation with a Just-In-Time compiler
# LGPL and another free license we'd need to ask spot about are present in some
@ -14,11 +14,6 @@ URL: http://pypy.org/
# High-level configuration of the build:
# Build with -fcommon
# https://bugzilla.redhat.com/show_bug.cgi?id=1796821
# https://bitbucket.org/pypy/pypy/issues/3163
%define _legacy_common_support 1
# Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package
# Uses upstream bundled prebuilt wheels otherwise
%bcond_without rpmwheels
@ -277,8 +272,8 @@ Provides: pypy%{pyversion}-libs%{?_isa} = %{version}-%{release}
Requires: python-setuptools-wheel
Requires: python-pip-wheel
%else
Provides: bundled(python3-pip) = 9.0.1
Provides: bundled(python3-setuptools) = 28.8.0
Provides: bundled(python3-pip) = 20.0.2
Provides: bundled(python3-setuptools) = 44.0.0
%endif
%description libs
@ -863,6 +858,9 @@ CheckPyPy %{name}-stackless
%changelog
* Wed Apr 15 2020 Tomas Hrnciar <thrnciar@redhat.com> - 7.3.1-1
- Update to 7.3.1
* Wed Feb 12 2020 Miro Hrončok <mhroncok@redhat.com> - 7.3.0-3
- Update the ensurepip module to work with setuptools >= 45

View File

@ -1 +1 @@
SHA512 (pypy3.6-v7.3.0-src.tar.bz2) = 313a4254262dd8d8b995a50bddbc360cfb67add0818e51a3e9ce25bda6a9b639e9fea8efe7da6adda76dff0a86a364544a13faa516e51b9ea6c25ec99223b435
SHA512 (pypy3.6-v7.3.1-src.tar.bz2) = f8e32aae7f01225e0e4d6763eaac40fc02dffc3d0b6a30f22d422147f9be4f3290ea78160a912ffae311dea3d503eb31a7a4f3999d3b541fbccd93d1cef4ca56