diff --git a/package/python-kiwi-spec-template b/package/python-kiwi-spec-template index aeaf11dd..83630ceb 100644 --- a/package/python-kiwi-spec-template +++ b/package/python-kiwi-spec-template @@ -92,7 +92,7 @@ Requires: python%{python3_pkgversion}-docopt Requires: python%{python3_pkgversion}-lxml Requires: python%{python3_pkgversion}-requests Requires: python%{python3_pkgversion}-setuptools -%if 0%{?suse_version} +%if (0%{?suse_version} && 0%{?suse_version} < 1550) Requires: python%{python3_pkgversion}-xattr %else Requires: python%{python3_pkgversion}-pyxattr @@ -355,6 +355,11 @@ Provides manual pages to describe the kiwi commands # as an independent script sed -e "s|#!/usr/bin/env python||" -i kiwi/xml_parse.py +%if 0%{?suse_version} && 0%{?suse_version} < 1550 +# For older SUSE distributions, use the other xattr Python module +sed -e "s|pyxattr|xattr|" -i setup.py +%endif + %build # Build Python 3 version python3 setup.py build --cflags="${RPM_OPT_FLAGS}" diff --git a/setup.py b/setup.py index 3c75a274..034e3b7d 100755 --- a/setup.py +++ b/setup.py @@ -186,7 +186,7 @@ config = { 'install_requires': [ 'docopt>=0.6.2', 'lxml', - 'xattr', + 'pyxattr', 'requests', 'PyYAML' ],