diff --git a/python-linecache2.spec b/python-linecache2.spec index 39cc7cfce7c0eae225e7ed3d2719a5e2ceae6791..59a4c2a9dccbcb18365795fb699e61029722e361 100644 --- a/python-linecache2.spec +++ b/python-linecache2.spec @@ -4,16 +4,21 @@ attempting to optimize internally, using a cache, the common case where many \ lines are read from a single file. This package provides a backport of \ linecache to older supported Python versions. +%bcond_with tests + Name: python-linecache2 Version: 1.0.0 -Release: 20 +Release: 21 Summary: A backport of linecache to older supported Python versions License: Python URL: https://github.com/testing-cabal/linecache2 Source0: https://pypi.python.org/packages/source/l/linecache2/linecache2-%{version}.tar.gz BuildArch: noarch -BuildRequires: python3-devel python3-pbr python3-fixtures python3-unittest2 +BuildRequires: python3-devel python3-pbr +%if %{with tests} +BuildRequires: python3-unittest2 python3-fixtures +%endif %description %{package_description} @@ -33,15 +38,21 @@ mv linecache2/tests . %install %py3_install +%check +%if %{with tests} mv tests linecache2/ %{__python3} -m unittest2 -v mv linecache2/tests . +%endif %files -n python3-linecache2 %doc AUTHORS ChangeLog README.rst %{python3_sitelib}/* %changelog +* Wed Nov 20 2024 wangkai <13474090681@163.com> - 1.0.0-21 +- Disable test for fix build error + * Tue Sep 29 2020 liuweibo - 1.0.0-20 - Fix Source0