fix for py_build_expected proposal

This commit is contained in:
Pavel Raiskup 2018-10-04 13:27:06 +02:00
commit 6ba7b17bb8

View file

@ -1,20 +1,3 @@
%if 0%{?fedora}
%bcond_without python3
%if 0%{?fedora} > 29
%bcond_with python2
%else
%bcond_without python2
%endif
%else
%if 0%{?rhel} > 7
%bcond_with python2
%bcond_without python3
%else
%bcond_without python2
%bcond_with python3
%endif
%endif
# Created by pyp2rpm-0.5.2
%global pypi_name progress
@ -28,12 +11,12 @@ URL: http://github.com/verigak/progress/
Source0: https://pypi.python.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch
%if %{with python2}
%if 0%{?py2_build_expected:1}
BuildRequires: python2-devel
BuildRequires: python2-setuptools
%endif
%if %{with python3}
%if 0%{?py3_build_expected:1}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%endif
@ -48,7 +31,7 @@ Collection of easy to use progress bars and spinners.\
%description %_description
%if 0%{with python2}
%if 0%{?py2_build_expected:1}
%package -n python2-%{pypi_name}
Summary: %summary
%{?python_provide:%python_provide python2-%{pypi_name}}
@ -57,7 +40,7 @@ Summary: %summary
%endif # python2
%if 0%{with python3}
%if 0%{?py3_build_expected:1}
%package -n python3-%{pypi_name}
Summary: Easy to use progress bars
@ -74,23 +57,23 @@ rm -rf %{pypi_name}.egg-info
%build
%{?with_python2: %py2_build}
%{?with_python3: %py3_build}
%{?py2_build_expected: %py2_build}
%{?py3_build_expected: %py3_build}
%install
%{?with_python2: %py2_install}
%{?with_python3: %py3_install}
%{?py2_build_expected: %py2_install}
%{?py3_build_expected: %py3_install}
%if 0%{with python2}
%if 0%{?py2_build_expected:1}
%files -n python2-%{pypi_name}
%doc README.rst LICENSE
%{python2_sitelib}/%{pypi_name}
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%endif
%if 0%{with python3}
%if 0%{?py3_build_expected:1}
%files -n python3-%{pypi_name}
%doc README.rst LICENSE
%{python3_sitelib}/%{pypi_name}