From a45f4e982edfb10e5ec9dae376ba282d6030e88e Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Thu, 20 May 2021 00:10:33 +0200 Subject: [PATCH] Add virtual provides for the bundled libmpdec (rhbz#1943359) --- pypy3.spec | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/pypy3.spec b/pypy3.spec index 57590db..2184360 100644 --- a/pypy3.spec +++ b/pypy3.spec @@ -2,7 +2,7 @@ Name: pypy3 Version: %{basever}.1 %global pyversion 3.6 -Release: 4%{?dist} +Release: 5%{?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,6 +14,13 @@ URL: http://pypy.org/ # High-level configuration of the build: +# libmpdec (mpdecimal package in Fedora) is tightly coupled with the +# decimal module. We keep it bundled as to avoid incompatibilities +# 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 + # Whether to use RPM build wheels from the python-{pip,setuptools}-wheel package # Uses upstream bundled prebuilt wheels otherwise %bcond_without rpmwheels @@ -276,6 +283,10 @@ Provides: bundled(python3-pip) = 20.0.2 Provides: bundled(python3-setuptools) = 44.0.0 %endif +# Provides for the bundled libmpdec +Provides: bundled(mpdecimal) = %{libmpdec_version} +Provides: bundled(libmpdec) = %{libmpdec_version} + %description libs Libraries required by the various PyPy implementations of Python 3. @@ -693,6 +704,13 @@ rm -f %{buildroot}%{pypyprefix}/bin/libpypy3-c.so.debug %check + +# 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) SkipTest() { @@ -860,6 +878,9 @@ CheckPyPy %{name}-stackless %changelog +* Wed May 19 2021 Charalampos Stratakis - 7.3.1-5 +- Add virtual provides for the bundled libmpdec (rhbz#1943359) + * Wed Jan 27 2021 Fedora Release Engineering - 7.3.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild