remove python2 require
This commit is contained in:
parent
35ce218eb2
commit
4e712248d4
@ -1,4 +1,3 @@
|
|||||||
%bcond_without python2
|
|
||||||
%bcond_without python3
|
%bcond_without python3
|
||||||
|
|
||||||
%global modname six
|
%global modname six
|
||||||
@ -6,7 +5,7 @@
|
|||||||
|
|
||||||
Name: python-six
|
Name: python-six
|
||||||
Version: 1.15.0
|
Version: 1.15.0
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: It is a Python 2 and 3 compatibility library
|
Summary: It is a Python 2 and 3 compatibility library
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://pypi.python.org/pypi/%{modname}
|
URL: https://pypi.python.org/pypi/%{modname}
|
||||||
@ -14,21 +13,7 @@ Source0: https://files.pythonhosted.org/packages/source/%(n=%{modname}; e
|
|||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Python-six provides simple utilities for wrapping over differences
|
Python-six provides simple utilities for wrapping over differences Python 3.
|
||||||
between Python 2 and Python 3.
|
|
||||||
|
|
||||||
%if %{with python2}
|
|
||||||
%package -n python2-%{modname}
|
|
||||||
Summary: Compatibility library for python 2
|
|
||||||
BuildRequires: python2-devel python2-setuptools
|
|
||||||
BuildRequires: python2-pytest python2-tkinter
|
|
||||||
BuildRequires: python2-pip python2-wheel
|
|
||||||
|
|
||||||
%{?python_provide:%python_provide python2-%{modname}}
|
|
||||||
|
|
||||||
%description -n python2-%{modname}
|
|
||||||
Compatibility library for python 2.
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if %{with python3}
|
%if %{with python3}
|
||||||
%package -n python3-%{modname}
|
%package -n python3-%{modname}
|
||||||
@ -48,41 +33,20 @@ Compatibility library for python 3.
|
|||||||
%autosetup -n %{modname}-%{version}
|
%autosetup -n %{modname}-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if %{with python2}
|
|
||||||
%py2_build_wheel
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if %{with python3}
|
%if %{with python3}
|
||||||
%py3_build_wheel
|
%py3_build_wheel
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%if %{with python2}
|
|
||||||
%py2_install_wheel %{python_wheelname}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if %{with python3}
|
%if %{with python3}
|
||||||
%py3_install_wheel %{python_wheelname}
|
%py3_install_wheel %{python_wheelname}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%if %{with python2}
|
|
||||||
PYTHONPATH=%{buildroot}%{python2_sitelib} py.test-2 -rfsxX test_six.py
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if %{with python3}
|
%if %{with python3}
|
||||||
PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-3 -rfsxX test_six.py
|
PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-3 -rfsxX test_six.py
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with python2}
|
|
||||||
%files -n python2-%{modname}
|
|
||||||
%license LICENSE
|
|
||||||
%doc README* documentation/index*
|
|
||||||
%{python2_sitelib}/%{modname}-*.dist-info/
|
|
||||||
%exclude %{python2_sitelib}/%{modname}-*.dist-info/LICENSE*
|
|
||||||
%{python2_sitelib}/%{modname}.py*
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if %{with python3}
|
%if %{with python3}
|
||||||
%files -n python3-%{modname}
|
%files -n python3-%{modname}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
@ -94,6 +58,12 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-3 -rfsxX test_six.py
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Aug 7 2020 wenzhanli<wenzhanli2@huawei.com> - 1.15.0-2
|
||||||
|
- Type:bugfixl
|
||||||
|
- ID:NAl
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:remove python2 require
|
||||||
|
|
||||||
* Mon Jul 27 2020 tianwei<tianwei123@huawei.com> -1.15.0-1
|
* Mon Jul 27 2020 tianwei<tianwei123@huawei.com> -1.15.0-1
|
||||||
- Type:enhancement
|
- Type:enhancement
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user