!19 delete "%bcond_with python3" and add "%bcond_with test"

From: @wangjiang37 
Reviewed-by: @xiezhipeng1 
Signed-off-by: @xiezhipeng1
This commit is contained in:
openeuler-ci-bot 2022-04-01 06:12:27 +00:00 committed by Gitee
commit 72ba391321
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,11 +1,11 @@
%bcond_without python3 %bcond_with test
%global modname six %global modname six
%global python_wheelname %{modname}-%{version}-py2.py3-none-any.whl %global python_wheelname %{modname}-%{version}-py2.py3-none-any.whl
Name: python-six Name: python-six
Version: 1.16.0 Version: 1.16.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}
@ -15,12 +15,14 @@ BuildArch: noarch
%description %description
Python-six provides simple utilities for wrapping over differences Python 3. Python-six provides simple utilities for wrapping over differences Python 3.
%if %{with python3}
%package -n python3-%{modname} %package -n python3-%{modname}
Summary: Compatibility library for python 3 Summary: Compatibility library for python 3
BuildRequires: python3-devel python3-setuptools BuildRequires: python3-devel python3-setuptools
BuildRequires: python3-pytest python3-tkinter BuildRequires: python3-tkinter
BuildRequires: python3-pip python3-wheel BuildRequires: python3-pip python3-wheel
%if %{with test}
BuildRequires: python3-pytest
%endif
Provides: python%{python3_pkgversion}dist(six) = %{version} Provides: python%{python3_pkgversion}dist(six) = %{version}
Provides: python%{python3_version}dist(six) = %{version} Provides: python%{python3_version}dist(six) = %{version}
@ -29,27 +31,21 @@ Obsoletes: platform-python-%{modname} < %{version}-%{release}
%description -n python3-%{modname} %description -n python3-%{modname}
Compatibility library for python 3. Compatibility library for python 3.
%endif
%prep %prep
%autosetup -n %{modname}-%{version} %autosetup -n %{modname}-%{version}
%build %build
%if %{with python3}
%py3_build_wheel %py3_build_wheel
%endif
%install %install
%if %{with python3}
%py3_install_wheel %{python_wheelname} %py3_install_wheel %{python_wheelname}
%endif
%check %check
%if %{with python3} %if %{with test}
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 python3}
%files -n python3-%{modname} %files -n python3-%{modname}
%license LICENSE %license LICENSE
%doc README* documentation/index* %doc README* documentation/index*
@ -57,9 +53,14 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-3 -rfsxX test_six.py
%exclude %{python3_sitelib}/%{modname}-*.dist-info/LICENSE* %exclude %{python3_sitelib}/%{modname}-*.dist-info/LICENSE*
%{python3_sitelib}/%{modname}.py %{python3_sitelib}/%{modname}.py
%{python3_sitelib}/__pycache__/%{modname}.* %{python3_sitelib}/__pycache__/%{modname}.*
%endif
%changelog %changelog
* Web Mar 30 2022 wangjiang <wangjiang@h-partners.com> - 1.16.0-2
- Type: bugfix
- ID: NA
- SUG: NA
- DESC:delete "%bcond_with python3" and add "%bcond_with test"
* Tue Dec 21 2021 shixuantong <shixuantong@huawei.com> - 1.16.0-1 * Tue Dec 21 2021 shixuantong <shixuantong@huawei.com> - 1.16.0-1
- Type:enhancement - Type:enhancement
- ID:NA - ID:NA