diff --git a/pyxattr.spec b/pyxattr.spec index 7fe0895741513b6299f829d59151c3db0c462c8f..8013155ea1c39a1ca64d826d1b84e4295cd272da 100644 --- a/pyxattr.spec +++ b/pyxattr.spec @@ -1,7 +1,7 @@ Name: pyxattr Summary: Extended attributes library wrapper for Python Version: 0.6.1 -Release: 2 +Release: 3 License: LGPLv2+ URL: http://pyxattr.k1024.org/ Source: https://pyxattr.k1024.org/downloads/%{name}-%{version}.tar.gz @@ -53,12 +53,20 @@ pushd %{py3dir} popd %check -export TEST_IGNORE_XATTRS=security.selinux -%{__python2} setup.py test +touch check-xattr-support -pushd %{py3dir} -%{__python3} setup.py test -popd +if ! attr -s test -V test check-xattr-support >& /dev/null ;then + echo "skipping tests because BUILD_FILE seem to lack xattr support" +else + export TEST_IGNORE_XATTRS=security.selinux + %{__python2} setup.py test + + pushd %{py3dir} + %{__python3} setup.py test + popd +fi + +rm -rf check-xattr-support %files -n python2-%{name} %{python2_sitearch}/*.so @@ -75,6 +83,9 @@ popd %doc NEWS README.rst %changelog +* Tue Nov 23 2021 wangjie - 0.6.1-3 +- check if the build environment supports attr before executing test + * Tue Aug 18 2020 yangzhuangzhuang - 0.6.1-2 - rebuild for requirement package update