From 57c0042ead87249bed5964eeec45b97543674060 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mat=C4=9Bj=20Grabovsk=C3=BD?= <mgrabovs@redhat.com>
Date: Wed, 16 Oct 2019 11:27:54 +0200
Subject: [PATCH] python: Use correct paths for installed modules

Non-compiled (without C bits) Python modules should be installed into
architecture-independent directory (/usr/lib/python3.x/site-packages
in the case of Fedora).

This commit fixes both
*   the spec file, where %{python3_sitelib} should be used rather than
    %{python3_sitearch} which is to be used for compiled extensions; and
*   the automake scripts, where $(pythondir) should be used in place of
    $(pyexecdir) for the same reason.

This is a follow-up to 20dcf7fb4.
---
 abrt.spec.in                    | 14 +++++++-------
 src/cli/abrtcli/Makefile.am     |  2 +-
 src/cli/abrtcli/cli/Makefile.am |  2 +-
 src/hooks/Makefile.am           |  2 +-
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/abrt.spec.in b/abrt.spec.in
index 1c6c48ad..fe0b2278 100644
--- a/abrt.spec.in
+++ b/abrt.spec.in
@@ -935,14 +935,14 @@ killall abrt-dbus >/dev/null 2>&1 || :
 %{_journalcatalogdir}/python3_abrt.catalog
 %config(noreplace) %{_sysconfdir}/libreport/plugins/catalog_python3_format.conf
 %{_mandir}/man5/python3_event.conf.5*
-%{python3_sitearch}/abrt3.pth
-%{python3_sitearch}/abrt_exception_handler3.py
-%{python3_sitearch}/__pycache__/abrt_exception_handler3.*
+%{python3_sitelib}/abrt3.pth
+%{python3_sitelib}/abrt_exception_handler3.py
+%{python3_sitelib}/__pycache__/abrt_exception_handler3.*
 
 %files -n python3-abrt-container-addon
-%{python3_sitearch}/abrt3_container.pth
-%{python3_sitearch}/abrt_exception_handler3_container.py
-%{python3_sitearch}/__pycache__/abrt_exception_handler3_container.*
+%{python3_sitelib}/abrt3_container.pth
+%{python3_sitelib}/abrt_exception_handler3_container.py
+%{python3_sitelib}/__pycache__/abrt_exception_handler3_container.*
 %endif # with python3
 
 %files plugin-sosreport
@@ -959,7 +959,7 @@ killall abrt-dbus >/dev/null 2>&1 || :
 %config(noreplace) %{_sysconfdir}/bash_completion.d/abrt.bash_completion
 %{_bindir}/abrt
 %{_bindir}/abrt-cli
-%{python3_sitearch}/abrtcli/
+%{python3_sitelib}/abrtcli/
 %{_mandir}/man1/abrt.1*
 %{_mandir}/man1/abrt-cli.1*
 %endif # with python3
diff --git a/src/cli/abrtcli/Makefile.am b/src/cli/abrtcli/Makefile.am
index d11355a2..a599d0b5 100644
--- a/src/cli/abrtcli/Makefile.am
+++ b/src/cli/abrtcli/Makefile.am
@@ -9,7 +9,7 @@ PYFILES= \
 	utils.py
 
 abrtcli_PYTHON = $(PYFILES)
-abrtclidir = $(pyexecdir)/abrtcli
+abrtclidir = $(pythondir)/abrtcli
 
 config.py: config.py.in
 	sed -e s,\@LOCALE_DIR\@,$(localedir),g \
diff --git a/src/cli/abrtcli/cli/Makefile.am b/src/cli/abrtcli/cli/Makefile.am
index 17ff216b..c796074d 100644
--- a/src/cli/abrtcli/cli/Makefile.am
+++ b/src/cli/abrtcli/cli/Makefile.am
@@ -10,4 +10,4 @@ abrtclicommands_PYTHON = \
 	retrace.py \
 	status.py
 
-abrtclicommandsdir = $(pyexecdir)/abrtcli/cli
+abrtclicommandsdir = $(pythondir)/abrtcli/cli
diff --git a/src/hooks/Makefile.am b/src/hooks/Makefile.am
index 6e35887f..bdef0329 100644
--- a/src/hooks/Makefile.am
+++ b/src/hooks/Makefile.am
@@ -35,7 +35,7 @@ EXTRA_DIST = \
 ALL_DEPENDENCES =
 
 if BUILD_PYTHON3
-py3hookdir = $(pyexecdir)
+py3hookdir = $(pythondir)
 dist_pluginsconf_DATA += python3.conf
 ALL_DEPENDENCES += abrt_exception_handler3.py
 
-- 
2.21.0

