diff --git a/python-six.spec b/python-six.spec index 18d4ce4..f674e77 100644 --- a/python-six.spec +++ b/python-six.spec @@ -1,13 +1,10 @@ %global modname six -%bcond_without wheel %bcond_without tests %bcond_without python2 -%bcond_without python3 -%global python2_wheelname %{modname}-%{version}-py2.py3-none-any.whl -%global python3_wheelname %python2_wheelname +%global python_wheelname %{modname}-%{version}-py2.py3-none-any.whl Name: python-%{modname} Version: 1.12.0 @@ -38,10 +35,7 @@ BuildRequires: python2-pytest BuildRequires: python2-tkinter %endif -%if %{with wheel} BuildRequires: python2-pip -BuildRequires: python2-wheel -%endif %description -n python2-%{modname} %{_description} Python 2 version. @@ -49,7 +43,6 @@ Python 2 version. %endif -%if %{with python3} %package -n python3-%{modname} Summary: %{summary} %{?python_provide:%python_provide python3-%{modname}} @@ -62,56 +55,27 @@ BuildRequires: python3-pytest BuildRequires: python3-tkinter %endif -%if %{with wheel} BuildRequires: python%{python3_pkgversion}-pip BuildRequires: python%{python3_pkgversion}-wheel -%endif %description -n python3-%{modname} %{_description} Python 3 version. -%endif - %prep %autosetup -n %{modname}-%{version} %build -%if %{with python2} -%if %{with wheel} -%py2_build_wheel -%else -%py2_build -%endif -%endif - -%if %{with python3} -%if %{with wheel} %py3_build_wheel -%else -%py3_build -%endif -%endif %install +%py3_install_wheel %{python_wheelname} + %if %{with python2} -%if %{with wheel} -%py2_install_wheel %{python2_wheelname} -%else -%py2_install +%py2_install_wheel %{python_wheelname} %endif -%endif - -%if %{with python3} -%if %{with wheel} -%py3_install_wheel %{python3_wheelname} -%else -%py3_install -%endif -%endif - %if %{with tests} %check @@ -129,14 +93,12 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-3 -rfsxX test_six.py %{python2_sitelib}/%{modname}.py* %endif -%if %{with python3} %files -n python3-%{modname} %license LICENSE %doc README.rst documentation/index.rst %{python3_sitelib}/%{modname}-*.dist-info/ %{python3_sitelib}/%{modname}.py %{python3_sitelib}/__pycache__/%{modname}.* -%endif %changelog