add a condition for running tests
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
This commit is contained in:
parent
066b437654
commit
f968e0d827
@ -1,4 +1,8 @@
|
|||||||
Name: python-urwid
|
%bcond_without tests
|
||||||
|
|
||||||
|
%global srcname urwid
|
||||||
|
|
||||||
|
Name: python-%{srcname}
|
||||||
Version: 2.0.1
|
Version: 2.0.1
|
||||||
Release: 6%{?dist}
|
Release: 6%{?dist}
|
||||||
Summary: Console user interface library
|
Summary: Console user interface library
|
||||||
@ -17,7 +21,7 @@ control.
|
|||||||
|
|
||||||
%description %_description
|
%description %_description
|
||||||
|
|
||||||
%package -n python3-urwid
|
%package -n python3-%{srcname}
|
||||||
Summary: %summary
|
Summary: %summary
|
||||||
%{?python_provide:%python_provide python3-urwid}
|
%{?python_provide:%python_provide python3-urwid}
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
@ -26,10 +30,10 @@ BuildRequires: python3-setuptools
|
|||||||
# needed by selftest suite for test.support
|
# needed by selftest suite for test.support
|
||||||
BuildRequires: python3-test
|
BuildRequires: python3-test
|
||||||
|
|
||||||
%description -n python3-urwid %_description
|
%description -n python3-%{srcname} %_description
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n urwid-%{version}
|
%setup -q -n %{srcname}-%{version}
|
||||||
find urwid -type f -name "*.py" -exec sed -i -e '/^#!\//, 1d' {} \;
|
find urwid -type f -name "*.py" -exec sed -i -e '/^#!\//, 1d' {} \;
|
||||||
find urwid -type f -name "*.py" -exec chmod 644 {} \;
|
find urwid -type f -name "*.py" -exec chmod 644 {} \;
|
||||||
|
|
||||||
@ -39,12 +43,14 @@ find urwid -type f -name "*.py" -exec chmod 644 {} \;
|
|||||||
find examples -type f -exec chmod 0644 \{\} \;
|
find examples -type f -exec chmod 0644 \{\} \;
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
%if %{with tests}
|
||||||
PYTHON=%{__python3} %{__python3} setup.py test
|
PYTHON=%{__python3} %{__python3} setup.py test
|
||||||
|
%endif # tests
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%py3_install
|
%py3_install
|
||||||
|
|
||||||
%files -n python3-urwid
|
%files -n python3-%{srcname}
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%doc README.rst examples docs
|
%doc README.rst examples docs
|
||||||
%{python3_sitearch}/urwid/
|
%{python3_sitearch}/urwid/
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user