python-webencodings/python-webencodings.spec

121 lines
2.1 KiB
RPMSpec
Raw Normal View History

2019-09-30 11:15:39 -04:00
%bcond_without python2
%bcond_without python3
Name: python-webencodings
Version: 0.5.1
2020-09-08 16:08:24 +08:00
Release: 8
2019-09-30 11:15:39 -04:00
Summary: Character encoding for the web
License: BSD
URL: https://github.com/gsnedders/python-webencodings
BuildArch: noarch
2020-09-08 16:08:24 +08:00
Source0: %{url}/archive/v%{version}.tar.gz
2019-09-30 11:15:39 -04:00
%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.
%package help
Summary: Documentation for python-webencodings
Provides: python-webencodings-doc
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}
%{?python_provide:%python_provide python3-webencodings}
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
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
2020-09-08 16:08:24 +08:00
* Tue Sep 8 2020 shixuantong <shixuantong@huawei.com> - 0.5.1-8
- update Source0
2019-09-30 11:15:39 -04:00
* Tue Aug 27 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.5.1-7
- Package init