diff --git a/.gitignore b/.gitignore index 849f483..c4b4267 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /pypy3.6-v7.2.0-src.tar.bz2 /pypy3.6-v7.3.0-src.tar.bz2 /pypy3.6-v7.3.1-src.tar.bz2 +/pypy3.7-v7.3.4-src.tar.bz2 diff --git a/011-no-faulthandler.patch b/011-no-faulthandler.patch index e093956..c0dd76b 100644 --- a/011-no-faulthandler.patch +++ b/011-no-faulthandler.patch @@ -30,7 +30,7 @@ index faa1ba7..2edadc9 100644 "PIPE_MAX_SIZE", "verbose", "max_memuse", "use_resources", "failfast", @@ -2231,7 +2235,8 @@ def start_threads(threads, unlock=None): finally: - started = [t for t in started if t.isAlive()] + started = [t for t in started if t.is_alive()] if started: - faulthandler.dump_traceback(sys.stdout) + if faulthandler is not None: diff --git a/189-use-rpm-wheels.patch b/189-use-rpm-wheels.patch index 0032ba9..8fd8a55 100644 --- a/189-use-rpm-wheels.patch +++ b/189-use-rpm-wheels.patch @@ -1,25 +1,21 @@ diff --git a/lib-python/3/ensurepip/__init__.py b/lib-python/3/ensurepip/__init__.py -index 6b35b3d..97fc83b 100644 +index 94d40b0..9135b80 100644 --- a/lib-python/3/ensurepip/__init__.py +++ b/lib-python/3/ensurepip/__init__.py -@@ -1,16 +1,34 @@ +@@ -1,3 +1,5 @@ +import distutils.version +import glob import os import os.path import pkgutil - import sys -+import runpy - import tempfile - - +@@ -9,9 +11,24 @@ import tempfile __all__ = ["version", "bootstrap"] - - --_SETUPTOOLS_VERSION = "44.0.0" + + +-_SETUPTOOLS_VERSION = "47.1.0" +_WHEEL_DIR = "/usr/share/python-wheels/" - --_PIP_VERSION = "20.0.2" + +-_PIP_VERSION = "20.1.1" +_wheels = {} + +def _get_most_recent_wheel_version(pkg): @@ -36,36 +32,14 @@ index 6b35b3d..97fc83b 100644 +_SETUPTOOLS_VERSION = _get_most_recent_wheel_version("setuptools") + +_PIP_VERSION = _get_most_recent_wheel_version("pip") - + _PROJECTS = [ - ("setuptools", _SETUPTOOLS_VERSION), -@@ -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, + ("setuptools", _SETUPTOOLS_VERSION, "py3"), +@@ -103,13 +120,10 @@ def _bootstrap(*, root=None, upgrade=False, user=False, # additional paths that need added to sys.path additional_paths = [] - for project, version in _PROJECTS: -- wheel_name = "{}-{}-py2.py3-none-any.whl".format(project, version) + for project, version, py_tag in _PROJECTS: +- wheel_name = "{}-{}-{}-none-any.whl".format(project, version, py_tag) - whl = pkgutil.get_data( - "ensurepip", - "_bundled/{}".format(wheel_name), diff --git a/pypy3.spec b/pypy3.spec index 7b4d004..025102c 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -1,8 +1,8 @@ %global basever 7.3 Name: pypy3 -Version: %{basever}.1 -%global pyversion 3.6 -Release: 6%{?dist} +Version: %{basever}.4 +%global pyversion 3.7 +Release: 1%{?dist} Summary: Python 3 implementation with a Just-In-Time compiler # PyPy is MIT @@ -25,7 +25,9 @@ URL: http://pypy.org/ # with the packaged version. # The version information can be found at lib_pypy/_libmpdec/mpdecimal.h # defined as MPD_VERSION. -%global libmpdec_version 2.4.1 +# See https://foss.heptapod.net/pypy/pypy/-/issues/3024 +# With PyPy 7.3.4, the decimal module is not compiled +#%%global libmpdec_version 2.4.1 # Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package # Uses upstream bundled prebuilt wheels otherwise @@ -146,7 +148,7 @@ URL: http://pypy.org/ %global __brp_python_bytecompile %{nil} # Source and patches: -Source0: https://bitbucket.org/pypy/pypy/downloads/pypy%{pyversion}-v%{version}-src.tar.bz2 +Source0: https://downloads.python.org/pypy/pypy%{pyversion}-v%{version}-src.tar.bz2 # Supply various useful RPM macros for building python modules against pypy: # __pypy, pypy_sitelib, pypy_sitearch @@ -285,13 +287,15 @@ Provides: pypy%{pyversion}-libs%{?_isa} = %{version}-%{release} Requires: python-setuptools-wheel Requires: python-pip-wheel %else -Provides: bundled(python3dist(pip)) = 20.0.2 -Provides: bundled(python3dist(setuptools)) = 44.0.0 +Provides: bundled(python3dist(pip)) = 20.1.1 +Provides: bundled(python3dist(setuptools)) = 47.1.0 %endif # Provides for the bundled libmpdec +%{?libmpdec_version: Provides: bundled(mpdecimal) = %{libmpdec_version} Provides: bundled(libmpdec) = %{libmpdec_version} +} # Find the version in lib_pypy/cffi/_pycparser/__init__.py Provides: bundled(python3dist(pycparser)) = 2.20 @@ -341,8 +345,8 @@ rm lib-python/3/ensurepip/_bundled/*.whl rmdir lib-python/3/ensurepip/_bundled %else # we don't want to ship the old ones anyway -rm lib-python/3/ensurepip/_bundled/pip-8.1.2-* -rm lib-python/3/ensurepip/_bundled/setuptools-21.2.1-* +rm lib-python/3/ensurepip/_bundled/pip-20.0* +rm lib-python/3/ensurepip/_bundled/setuptools-44* %endif @@ -532,7 +536,7 @@ mkdir -p %{buildroot}/%{pypyprefix} # Run installing script, archive-name %{name}-%{basever} in %{buildroot}/%{_libdir} == %{pypyprefix} -%{bootstrap_python_interp} pypy/tool/release/package.py --archive-name %{name}-%{basever} --builddir %{buildroot}/%{_libdir} +%{bootstrap_python_interp} pypy/tool/release/package.py --archive-name %{name}-%{basever} --builddir %{buildroot}/%{_libdir} --no-embedded-dependencies # Remove shebang lines from .py files that aren't executable, and @@ -564,7 +568,6 @@ mkdir -p %{buildroot}/%{pypyprefix}/site-packages # approach is to postprocess the ELF file: execstack --clear-execstack %{buildroot}/%{pypyprefix}/bin/pypy3 -ln -s ./pypy3 %{buildroot}%{pypyprefix}/bin/pypy%{pyversion} ln -s %{pypyprefix}/bin/pypy%{pyversion} %{buildroot}%{_bindir}/pypy%{pyversion} ln -s pypy%{pyversion} %{buildroot}%{_bindir}/pypy3 @@ -720,11 +723,12 @@ rm -f %{buildroot}%{pypyprefix}/bin/libpypy3-c.so.debug %check +%{?libmpdec_version: # Verify that the bundled libmpdec version python was compiled with, is the same version we have virtual # provides for in the SPEC. test "$(%{goal_dir}/pypy3-c -c 'import decimal; print(decimal.__libmpdec_version__.decode("ascii"))')" = \ "%{libmpdec_version}" - +} topdir=$(pwd) @@ -893,6 +897,11 @@ CheckPyPy %{name}-stackless %changelog +* Tue May 25 2021 Miro Hrončok - 7.3.4-1 +- Update to 7.3.4 +- pypy3 is now Python 3.7 +- Fixes rhbz#1961933 + * Tue May 25 2021 Miro Hrončok - 7.3.1-6 - Provide missing bundled library information diff --git a/sources b/sources index 0b7b357..60e1bdc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pypy3.6-v7.3.1-src.tar.bz2) = f8e32aae7f01225e0e4d6763eaac40fc02dffc3d0b6a30f22d422147f9be4f3290ea78160a912ffae311dea3d503eb31a7a4f3999d3b541fbccd93d1cef4ca56 +SHA512 (pypy3.7-v7.3.4-src.tar.bz2) = c570d34f284f41dcd8dd909216c69831dd83b8501423c7635a4fe506fb16fd3705cf87975a664735e52d0b805a0432267d611a993437d17aac3defe4b9ea4401 diff --git a/tests/tests.yml b/tests/tests.yml index c3a91f3..827cb90 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -10,7 +10,7 @@ tests: - smoke: dir: python/smoke - run: PYTHON=pypy3 VERSION=3.6 ./venv.sh + run: PYTHON=pypy3 VERSION=3.7 ./venv.sh required_packages: - gcc - python3-tox