|
20 | 20 | # If they aren't provided by a system installed macro, define them |
21 | 21 | %{!?_defaultdocdir: %global _defaultdocdir %{_datadir}/doc} |
22 | 22 |
|
| 23 | +# Userland install of python modules such that new namespaces |
| 24 | +# gets added to this environment properly. I did not find another |
| 25 | +# way to install a python module as non root into this build environment |
| 26 | +# such that importlib.* methods would find them. With the former |
| 27 | +# pkg_resources this could be handled by setting the PYTHONPATH |
| 28 | +# variable but this doesn't work anymore with importlib. |
| 29 | +%global pip_install pip install --break-system-packages |
| 30 | + |
23 | 31 | %if 0%{?suse_version} && 0%{?suse_version} < 1600 |
24 | 32 | %global __python3 /usr/bin/python3.11 |
25 | 33 | %global python3_pkgversion 311 |
@@ -69,6 +77,12 @@ Source1: %{name}-rpmlintrc |
69 | 77 | ## PATCH-FIX-OPENSUSE kiwi-revert-bls-default-for-suse.patch -- temporary until opensuse has bls |
70 | 78 | Patch1001: kiwi-revert-bls-default-for-suse.patch |
71 | 79 | BuildRoot: %{_tmppath}/%{name}-%{version}-build |
| 80 | +BuildRequires: kiwi-systemdeps |
| 81 | +BuildRequires: python%{python3_pkgversion}-pytest |
| 82 | +BuildRequires: python%{python3_pkgversion}-pip |
| 83 | +BuildRequires: python%{python3_pkgversion}-anymarkup-core |
| 84 | +BuildRequires: python%{python3_pkgversion}-toml |
| 85 | +BuildRequires: python%{python3_pkgversion}-xmltodict |
72 | 86 | %if 0%{?fedora} || 0%{?suse_version} |
73 | 87 | BuildRequires: fdupes |
74 | 88 | %endif |
|
755 | 769 | %endif |
756 | 770 | %endif |
757 | 771 |
|
| 772 | +%check |
| 773 | +# install kiwi to userland and run the tests |
| 774 | +%pip_install dist/kiwi-%{version}-py3-none-any.whl |
| 775 | +cd test/unit && pytest |
| 776 | + |
758 | 777 | %files -n kiwi-systemdeps-core |
759 | 778 | # Empty metapackage |
760 | 779 |
|
|
0 commit comments