From 25272d7d36d7ccf33463f64e0e0e82904dfe70d9 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Tue, 21 Dec 2021 14:51:49 +0100 Subject: [PATCH] Let pytest see the package source code in the CI test run This fixes ImportError which was caused by an incomplete backport from Fedora (introduced in eb3f38c). Related: rhbz#1950291 --- python-rpm-macros.spec | 5 ++++- tests/tests.yml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/python-rpm-macros.spec b/python-rpm-macros.spec index b923d6d..138b69b 100644 --- a/python-rpm-macros.spec +++ b/python-rpm-macros.spec @@ -1,6 +1,6 @@ Name: python-rpm-macros Version: 3.9 -Release: 47%{?dist} +Release: 48%{?dist} Summary: The common Python RPM macros URL: https://src.fedoraproject.org/rpms/python-rpm-macros/ @@ -101,6 +101,9 @@ install -m 644 import_all_modules.py %{buildroot}%{_rpmconfigdir}/redhat/ %changelog +* Tue Dec 21 2021 Karolina Surma - 3.9-48 +- Fix CI test configuration, so that pytest can import the package code + * Wed Dec 08 2021 Miro HronĨok - 3.9-47 - Set %%__python3 value according to %%python3_pkgversion I.e. when %%python3_pkgversion is 3.12, %%__python3 is /usr/bin/python3.12 diff --git a/tests/tests.yml b/tests/tests.yml index 84c7075..8cfeacc 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -15,7 +15,7 @@ tests: - pytest: dir: . - run: ALTERNATE_PYTHON_VERSION=SKIP pytest -v + run: PYTHONPATH=/usr/lib/rpm/redhat ALTERNATE_PYTHON_VERSION=SKIP pytest -v - manual_byte_compilation: dir: . run: rpmbuild -ba pythontest.spec