From 8021fe8eeacb4b11c2f20ef57d3e755c6cd1d3a0 Mon Sep 17 00:00:00 2001 From: Evan Goode Date: Mon, 23 Sep 2024 22:55:16 +0000 Subject: [PATCH 1/2] CMakeLists.txt: Allow overriding PYTHON_INSTALL_DIR Useful for testing. The dnf-plugins-core RPM installs Python modules to /usr/lib/python3.XX/site-packages whereas a `make install` will by default install files to /usr/local/lib/python3.XX/site-packages. --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a54e2c6e..fcb6364b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,9 @@ ELSE () MESSAGE (FATAL_ERROR "Invalid PYTHON_DESIRED value: " ${PYTHON_DESIRED}) ENDIF() -EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from sysconfig import get_path; stdout.write(get_path('purelib'))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR) +IF (NOT PYTHON_INSTALL_DIR) + EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from sysconfig import get_path; stdout.write(get_path('purelib'))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR) +ENDIF() MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}") SET (SYSCONFDIR /etc) From b4e6e0d622a3d13bf695d6c2c501e70dcbd5dff6 Mon Sep 17 00:00:00 2001 From: Steven Sklar Date: Tue, 24 Sep 2024 10:58:58 -0400 Subject: [PATCH 2/2] Add Amazon Linux to copr chroots --- plugins/copr.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/copr.py b/plugins/copr.py index afb83243..87319a72 100644 --- a/plugins/copr.py +++ b/plugins/copr.py @@ -487,6 +487,8 @@ def _guess_chroot(self): chroot = ("opensuse-tumbleweed-{}".format(distarch)) else: chroot = ("opensuse-leap-{0}-{1}".format(dist[1], distarch)) + elif "Amazon Linux" in dist[0]: + chroot = "amazonlinux-{}-{}".format(dist[1], distarch if distarch else "x86_64") else: chroot = ("epel-{}-{}".format(dist[1].split(".", 1)[0], distarch if distarch else "x86_64")) return chroot