From 10f2cf28889d2995fdcecebbb6deee34dde70127 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Mon, 17 Mar 2014 19:35:04 +0000 Subject: [PATCH] Do not install into python_sitelib The .pyc and .pyo files are actually architecture specific and this causes PackageKit to fail the RHEL multilib self tests. --- configure.ac | 11 +++++++++-- contrib/PackageKit.spec.in | 5 +++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 68ce26a7d..8cdabd742 100644 --- a/configure.ac +++ b/configure.ac @@ -91,8 +91,14 @@ if test x$enable_python3 = xyes; then else AM_PATH_PYTHON([2.7]) fi - -PYTHON_PACKAGE_DIR=${pythondir}/packagekit +AC_ARG_WITH([python_package_dir], + AS_HELP_STRING([--with-python-package-dir=], + [Location for python modules])) +if test -z "$with_python_package_dir" ; then + PYTHON_PACKAGE_DIR=${pythondir}/packagekit +else + PYTHON_PACKAGE_DIR=${with_python_package_dir}/packagekit +fi AC_SUBST(PYTHON_PACKAGE_DIR) if test "$GCC" = "yes"; then @@ -683,6 +689,7 @@ echo " systemd-updates: ${build_systemd_updates} python3: ${enable_python3} systemd system unit dir: ${with_systemdsystemunitdir} + python package dir: ${with_python_package_dir} Backends: ALPM backend: ${enable_alpm} diff --git a/contrib/PackageKit.spec.in b/contrib/PackageKit.spec.in index 0065332dc..3fc795519 100644 --- a/contrib/PackageKit.spec.in +++ b/contrib/PackageKit.spec.in @@ -166,6 +166,7 @@ using PackageKit. --disable-bash-completion \ %endif --with-default-backend=auto \ + --with-python-package-dir=%{python3_sitearch} \ --disable-local \ --disable-strict \ --disable-silent-rules \ @@ -229,12 +230,12 @@ popd > /dev/null %dir %{_sysconfdir}/PackageKit/events/pre-transaction.d %{_sysconfdir}/PackageKit/events/*.d/README %dir %{_localstatedir}/lib/PackageKit -%dir %{python_sitelib}/packagekit +%dir %{python3_sitearch}/packagekit %dir %{_localstatedir}/cache/PackageKit %ghost %verify(not md5 size mtime) %{_localstatedir}/cache/PackageKit/groups.sqlite %dir %{_localstatedir}/cache/PackageKit/downloads %dir %{_localstatedir}/cache/PackageKit/metadata -%{python_sitelib}/packagekit/*py* +%{python3_sitearch}/packagekit/*py* %if !0%{?rhel} %{_datadir}/bash-completion/completions/pkcon %endif