Blame SPECS/python-webencodings.spec

03a8fa
%global srcname webencodings
03a8fa
%global desc This is a Python implementation of the WHATWG Encoding standard.
03a8fa
03a8fa
%if 0%{?rhel} > 7
03a8fa
# Disable python2 build by default
03a8fa
%bcond_with python2
03a8fa
%else
03a8fa
%bcond_without python2
03a8fa
%endif
03a8fa
03a8fa
Name: python-%{srcname}
03a8fa
Version: 0.5.1
03a8fa
Release: 6%{?dist}
03a8fa
BuildArch: noarch
03a8fa
03a8fa
License: BSD
03a8fa
Summary: Character encoding for the web
03a8fa
URL: https://github.com/gsnedders/python-%{srcname}
03a8fa
Source0: %{url}/archive/v%{version}/%{srcname}-%{version}.tar.gz
03a8fa
03a8fa
%if %{with python2}
03a8fa
BuildRequires: python2-devel
03a8fa
BuildRequires: python2-pytest
03a8fa
%endif # with python2
03a8fa
BuildRequires: python3-devel
03a8fa
BuildRequires: python3-pytest
03a8fa
BuildRequires: python3-sphinx
03a8fa
03a8fa
03a8fa
%description
03a8fa
%{desc}
03a8fa
03a8fa
03a8fa
%package doc
03a8fa
Summary: Documentation for python-webencodings
03a8fa
03a8fa
03a8fa
%description doc
03a8fa
Documentation for python-webencodings.
03a8fa
03a8fa
%if %{with python2}
03a8fa
%package -n python2-%{srcname}
03a8fa
Summary: %{summary}
03a8fa
03a8fa
%{?python_provide:%python_provide python2-%{srcname}}
03a8fa
03a8fa
Requires: python2
03a8fa
03a8fa
03a8fa
%description -n python2-%{srcname}
03a8fa
%{desc}
03a8fa
%endif # with python2
03a8fa
03a8fa
03a8fa
%package -n python3-%{srcname}
03a8fa
Summary: %{summary}
03a8fa
03a8fa
%{?python_provide:%python_provide python3-%{srcname}}
03a8fa
03a8fa
%{?__python3:Requires: %{__python3}}
03a8fa
03a8fa
03a8fa
%description -n python3-%{srcname}
03a8fa
%{desc}
03a8fa
03a8fa
03a8fa
%prep
03a8fa
%autosetup -n python-%{srcname}-%{version}
03a8fa
03a8fa
03a8fa
%build
03a8fa
%if %{with python2}
03a8fa
%py2_build
03a8fa
%endif # with python2
03a8fa
%py3_build
03a8fa
03a8fa
PYTHONPATH=. sphinx-build-3 docs docs/_build
03a8fa
03a8fa
# Remove unneeded build artifacts.
03a8fa
rm -rf docs/_build/.buildinfo
03a8fa
rm -rf docs/_build/.doctrees
03a8fa
03a8fa
03a8fa
%install
03a8fa
%if %{with python2}
03a8fa
%py2_install
03a8fa
%endif # with python2
03a8fa
%py3_install
03a8fa
03a8fa
03a8fa
%check
03a8fa
%if %{with python2}
03a8fa
py.test-2
03a8fa
%endif # with python2
03a8fa
py.test-3
03a8fa
03a8fa
03a8fa
%files doc
03a8fa
%license LICENSE
03a8fa
%doc docs/_build
03a8fa
03a8fa
%if %{with python2}
03a8fa
%files -n python2-%{srcname}
03a8fa
%license LICENSE
03a8fa
%doc README.rst
03a8fa
%{python2_sitelib}/%{srcname}
03a8fa
%{python2_sitelib}/*.egg-info
03a8fa
%endif # with python2
03a8fa
03a8fa
%files -n python3-%{srcname}
03a8fa
%license LICENSE
03a8fa
%doc README.rst
03a8fa
%{python3_sitelib}/%{srcname}
03a8fa
%{python3_sitelib}/*.egg-info
03a8fa
03a8fa
03a8fa
%changelog
03a8fa
* Tue Sep 25 2018 Tomas Orsava <torsava@redhat.com> - 0.5.1-6
03a8fa
- Require the Python interpreter directly instead of using the package name
03a8fa
- Resolves: rhbz#1633609
03a8fa
03a8fa
* Fri Jun 22 2018 Charalampos Stratakis <cstratak@redhat.com> - 0.5.1-5
03a8fa
- Conditionalize the python2 subpackage
03a8fa
03a8fa
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-4
03a8fa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
03a8fa
03a8fa
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-3
03a8fa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
03a8fa
03a8fa
* Tue Jul 25 2017 Randy Barlow <bowlofeggs@fedoraproject.org> - 0.5.1-2
03a8fa
- Set the PYTHONPATH when building docs so the library is found.
03a8fa
03a8fa
* Tue Jul 25 2017 Randy Barlow <bowlofeggs@fedoraproject.org> - 0.5.1-1
03a8fa
- Initial release