remove with_python3 conditionals
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
This commit is contained in:
parent
ffbd796d24
commit
fdb06d9ad2
@ -1,7 +1,3 @@
|
||||
%if 0%{?fedora}
|
||||
%global with_python3 1
|
||||
%endif
|
||||
|
||||
Name: python-urwid
|
||||
Version: 1.3.1
|
||||
Release: 1%{?dist}
|
||||
@ -25,13 +21,11 @@ BuildRequires: pygobject2
|
||||
BuildRequires: python2-test
|
||||
# needed by selftest suite for test.support
|
||||
|
||||
%if 0%{?with_python3}
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-test
|
||||
# needed by selftest suite for test.support
|
||||
BuildRequires: /usr/bin/2to3
|
||||
%endif # if with_python3
|
||||
|
||||
%global _description\
|
||||
Urwid is a Python library for making text console applications. It has\
|
||||
@ -49,7 +43,6 @@ Summary: %summary
|
||||
|
||||
%description -n python2-urwid %_description
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%package -n python3-urwid
|
||||
Summary: Urwid console user interface library for Python 3
|
||||
Group: Development/Languages
|
||||
@ -63,7 +56,6 @@ mix of widget types. It is flexible, modular, and leaves the developer in
|
||||
control.
|
||||
|
||||
This package contains the urwid module built for use with python3.
|
||||
%endif # with_python3
|
||||
|
||||
%prep
|
||||
%setup -q -n urwid-%{version}
|
||||
@ -71,41 +63,33 @@ This package contains the urwid module built for use with python3.
|
||||
find urwid -type f -name "*.py" -exec sed -i -e '/^#!\//, 1d' {} \;
|
||||
find urwid -type f -name "*.py" -exec chmod 644 {} \;
|
||||
|
||||
%if 0%{?with_python3}
|
||||
rm -rf %{py3dir}
|
||||
cp -a . %{py3dir}
|
||||
%endif # with_python3
|
||||
|
||||
%build
|
||||
%py2_build
|
||||
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
%py3_build
|
||||
popd
|
||||
%endif # with_python3
|
||||
|
||||
find examples -type f -exec chmod 0644 \{\} \;
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
%py3_install
|
||||
popd
|
||||
%endif # with_python3
|
||||
|
||||
%py2_install
|
||||
|
||||
%check
|
||||
%{__python2} setup.py test
|
||||
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
%{__python3} setup.py test
|
||||
popd
|
||||
%endif
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
@ -116,13 +100,11 @@ rm -rf %{buildroot}
|
||||
%{python_sitearch}/urwid
|
||||
%{python_sitearch}/urwid-%{version}*.egg-info
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files -n python3-urwid
|
||||
%defattr(-,root,root,-)
|
||||
%doc COPYING README.rst examples docs
|
||||
%{python3_sitearch}/urwid
|
||||
%{python3_sitearch}/urwid-%{version}*.egg-info
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Sat Aug 19 2017 Petr Viktorin <pviktori@redhat.com> - 1.3.1-1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user