!5 delete python2 dependency
From: @weiwei_150212 Reviewed-by: @xiezhipeng1 Signed-off-by: @xiezhipeng1
This commit is contained in:
commit
942769e03b
@ -1,9 +1,8 @@
|
||||
%bcond_without python2
|
||||
%bcond_without python3
|
||||
|
||||
Name: python-webencodings
|
||||
Version: 0.5.1
|
||||
Release: 8
|
||||
Release: 9
|
||||
Summary: Character encoding for the web
|
||||
License: BSD
|
||||
URL: https://github.com/gsnedders/python-webencodings
|
||||
@ -11,16 +10,10 @@ BuildArch: noarch
|
||||
|
||||
Source0: %{url}/archive/v%{version}.tar.gz
|
||||
|
||||
%if %{with python2}
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: python2-pytest
|
||||
%endif
|
||||
|
||||
%if %{with python3}
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-pytest
|
||||
BuildRequires: python3-sphinx
|
||||
%endif
|
||||
|
||||
%description
|
||||
This is a Python implementation of the WHATWG Encoding standard.
|
||||
@ -33,19 +26,7 @@ Obsoletes: python-webencodings-doc
|
||||
%description help
|
||||
Documentation for python-webencodings.
|
||||
|
||||
%if %{with python2}
|
||||
%package -n python2-webencodings
|
||||
Summary: %{summary}
|
||||
|
||||
%{?python_provide:%python_provide python2-webencodings}
|
||||
|
||||
Requires: python2
|
||||
|
||||
%description -n python2-webencodings
|
||||
This is a Python2 implementation of the WHATWG Encoding standard.
|
||||
%endif
|
||||
|
||||
%if %{with python3}
|
||||
%package -n python3-webencodings
|
||||
Summary: %{summary}
|
||||
|
||||
@ -55,19 +36,12 @@ Requires: python3
|
||||
|
||||
%description -n python3-webencodings
|
||||
This is a Python3 implementation of the WHATWG Encoding standard.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%autosetup -n python-webencodings-%{version}
|
||||
|
||||
%build
|
||||
%if %{with python2}
|
||||
%py2_build
|
||||
%endif
|
||||
|
||||
%if %{with python3}
|
||||
%py3_build
|
||||
%endif
|
||||
|
||||
PYTHONPATH=. sphinx-build-3 docs docs/_build
|
||||
|
||||
@ -75,44 +49,25 @@ rm -rf docs/_build/.buildinfo
|
||||
rm -rf docs/_build/.doctrees
|
||||
|
||||
%install
|
||||
%if %{with python2}
|
||||
%py2_install
|
||||
%endif
|
||||
|
||||
%if %{with python3}
|
||||
%py3_install
|
||||
%endif
|
||||
|
||||
|
||||
%check
|
||||
%if %{with python2}
|
||||
py.test-2
|
||||
%endif
|
||||
|
||||
%if %{with python3}
|
||||
py.test-3
|
||||
%endif
|
||||
|
||||
%files help
|
||||
%doc docs/_build
|
||||
|
||||
%if %{with python2}
|
||||
%files -n python2-webencodings
|
||||
%license LICENSE
|
||||
%doc README.rst
|
||||
%{python2_sitelib}/webencodings
|
||||
%{python2_sitelib}/*.egg-info
|
||||
%endif
|
||||
|
||||
%if %{with python3}
|
||||
%files -n python3-webencodings
|
||||
%license LICENSE
|
||||
%doc README.rst
|
||||
%{python3_sitelib}/webencodings
|
||||
%{python3_sitelib}/*.egg-info
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Thu Oct 29 2020 tianwei <tianwei12@huawei.com> - 0.5.1-9
|
||||
- delete python2
|
||||
|
||||
* Tue Sep 8 2020 shixuantong <shixuantong@huawei.com> - 0.5.1-8
|
||||
- update Source0
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user