From dea75cdaf61bc9de8702692a8e9e3415250bc003c49d1745ad89f3f9b3e0ee00 Mon Sep 17 00:00:00 2001 From: Frederic Crozat Date: Mon, 18 Jul 2022 08:27:27 +0000 Subject: [PATCH] Accepting request 989741 from home:bnavigator:branches:devel:languages:python - Work around vendored distutils in setuptools >= 60 incorrectly installing pkgconfig files into the wrong libdir - Deduplicate files in python_sitearch OBS-URL: https://build.opensuse.org/request/show/989741 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pycairo?expand=0&rev=14 --- python-pycairo.changes | 7 +++++++ python-pycairo.spec | 10 +++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/python-pycairo.changes b/python-pycairo.changes index 961d347..f22d303 100644 --- a/python-pycairo.changes +++ b/python-pycairo.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sat Jul 16 22:51:05 UTC 2022 - Ben Greiner + +- Work around vendored distutils in setuptools >= 60 incorrectly + installing pkgconfig files into the wrong libdir +- Deduplicate files in python_sitearch + ------------------------------------------------------------------- Thu Aug 12 08:07:16 UTC 2021 - Frederic Crozat diff --git a/python-pycairo.spec b/python-pycairo.spec index 07ec417..b83bbe7 100644 --- a/python-pycairo.spec +++ b/python-pycairo.spec @@ -1,7 +1,7 @@ # # spec file for package python-pycairo # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -30,6 +30,7 @@ BuildRequires: %{python_module devel} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: cairo-devel >= 1.15.10 +BuildRequires: fdupes BuildRequires: python-rpm-macros Provides: python-cairo = %{version} Obsoletes: python-cairo < %{version} @@ -77,6 +78,13 @@ packages that depend on Pycairo. %install %python_install +# Incorrectly installed by a python38-setuptools vendored distutils +# which does not play well with the distro patched python38. +# Later flavors installed the correct files into lib64 as well +if [ "%{_libdir}" != "%{_prefix}/lib" -a -d %{buildroot}%{_prefix}/lib/pkgconfig ]; then + rm -r %{buildroot}%{_prefix}/lib/pkgconfig +fi +%python_expand %fdupes %{buildroot}%{$python_sitearch} %check # this is not the deprecated setuptools test call but a custom setup compiling stuff and running pytest