Fix Python module installation

This commit is contained in:
lingsheng 2021-07-01 16:08:51 +08:00
parent 10f3054a57
commit 704f7fb703
2 changed files with 50 additions and 1 deletions

View File

@ -0,0 +1,45 @@
From 874c746852c1922fbcc3c6bcb107cbfc30a14cc6 Mon Sep 17 00:00:00 2001
From: Ernestas Kulik <ekulik@redhat.com>
Date: Mon, 20 Jul 2020 06:37:55 +0200
Subject: [PATCH] Fix Python module installation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Currently, all sources are installed as “pure”, which does not apply to
the wrapper module. Moreover, Meson previously defaulted to “false” for
the “pure” kwarg, which was subsequently fixed. Both of these issues
make the RPM package unbuildable, which can be fixed by making all
sources unpure (they all share the same module name, so its either this
or renaming the wrapper module to avoid import conflicts).
https://github.com/mesonbuild/meson/commit/efb86088bcf89
---
src/gnome_abrt/meson.build | 1 +
src/gnome_abrt/wrappers/meson.build | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/gnome_abrt/meson.build b/src/gnome_abrt/meson.build
index 88489b5..f1844b9 100644
--- a/src/gnome_abrt/meson.build
+++ b/src/gnome_abrt/meson.build
@@ -42,6 +42,7 @@ foreach file: gnome_abrt_sources
endforeach
python_installation.install_sources(gnome_abrt_generated_sources + gnome_abrt_sources,
+ pure: false,
subdir: 'gnome_abrt',
)
diff --git a/src/gnome_abrt/wrappers/meson.build b/src/gnome_abrt/wrappers/meson.build
index 412b0e2..a185bf1 100644
--- a/src/gnome_abrt/wrappers/meson.build
+++ b/src/gnome_abrt/wrappers/meson.build
@@ -11,6 +11,7 @@ foreach file: gnome_abrt_wrappers_sources
endforeach
python_installation.install_sources(gnome_abrt_wrappers_sources,
+ pure: false,
subdir: 'gnome_abrt/wrappers',
)

View File

@ -2,7 +2,7 @@
%global shortcommit %(c=%{commit}; echo ${c:0:7})
Name: gnome-abrt
Version: 1.3.5
Release: 2
Release: 3
Summary: A utility for viewing problems that have occurred with the system
License: GPLv2+
URL: https://github.com/abrt/gnome-abrt
@ -11,6 +11,7 @@ Source0: %{url}/archive/%{commit}.tar.gz#/gnome-abrt-%{commit}.tar.g
%else
Source0: %{url}/archive/%{version}/gnome-abrt-%{version}.tar.gz
%endif
Patch0001: Fix-Python-module-installation.patch
BuildRequires: git-core meson gettext libtool python3-devel desktop-file-utils asciidoc xmlto
BuildRequires: pygobject3-devel libreport-gtk-devel > 2.4.0 python3-libreport
BuildRequires: abrt-gui-devel > 2.4.0 gtk3-devel
@ -49,6 +50,9 @@ provides them with convenient way for managing these problems.
%{_datadir}/icons/hicolor/*/apps/*
%changelog
* Thu Jul 1 2021 lingsheng <lingsheng@huawei.com> - 1.3.5-3
- Fix Python module installation
* Wed Jun 24 2020 huanghaitao <huanghaitao8@huawei.com> - 1.3.5-2
- Update to fix build error with python3.8