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
This commit is contained in:
Karolina Surma 2021-12-21 14:51:49 +01:00
parent c7a9537dba
commit 25272d7d36
2 changed files with 5 additions and 2 deletions

View File

@ -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 <ksurma@redhat.com> - 3.9-48
- Fix CI test configuration, so that pytest can import the package code
* Wed Dec 08 2021 Miro Hrončok <mhroncok@redhat.com> - 3.9-47
- Set %%__python3 value according to %%python3_pkgversion
I.e. when %%python3_pkgversion is 3.12, %%__python3 is /usr/bin/python3.12

View File

@ -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