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