|
|
|
@ -1,100 +1,114 @@
|
|
|
|
|
%global modulename html5lib
|
|
|
|
|
%if 0%{?fedora} || 0%{?rhel} > 7
|
|
|
|
|
%global with_python3 1
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
Name: python-%{modulename}
|
|
|
|
|
%global srcname html5lib
|
|
|
|
|
Name: python-%{srcname}
|
|
|
|
|
Summary: A python based HTML parser/tokenizer
|
|
|
|
|
Version: 0.999999999
|
|
|
|
|
Release: 8%{?dist}
|
|
|
|
|
Version: 1.0.1
|
|
|
|
|
Release: 1%{?dist}
|
|
|
|
|
Epoch: 1
|
|
|
|
|
Group: Development/Libraries
|
|
|
|
|
License: MIT
|
|
|
|
|
URL: https://pypi.python.org/pypi/%{modulename}
|
|
|
|
|
Source0: https://github.com/html5lib/html5lib-python/archive/%{version}.tar.gz
|
|
|
|
|
URL: https://github.com/html5lib/html5lib-python
|
|
|
|
|
Source0: %pypi_source
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
%?python_enable_dependency_generator
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
A python based HTML parser/tokenizer based on the WHATWG HTML5
|
|
|
|
|
specification for maximum compatibility with major desktop web browsers.
|
|
|
|
|
|
|
|
|
|
%package -n python2-%{modulename}
|
|
|
|
|
Summary: A python based HTML parser/tokenizer
|
|
|
|
|
Group: Development/Libraries
|
|
|
|
|
|
|
|
|
|
Requires: python2-six
|
|
|
|
|
Requires: python2-webencodings
|
|
|
|
|
BuildRequires: python2-setuptools
|
|
|
|
|
%package -n python2-%{srcname}
|
|
|
|
|
Summary: %summary
|
|
|
|
|
BuildRequires: python2-devel
|
|
|
|
|
BuildRequires: python2-nose
|
|
|
|
|
BuildRequires: python2-setuptools
|
|
|
|
|
|
|
|
|
|
# Test deps
|
|
|
|
|
BuildRequires: python2-mock
|
|
|
|
|
BuildRequires: python2-pytest
|
|
|
|
|
BuildRequires: python2-six
|
|
|
|
|
%{?python_provide:%python_provide python2-%{modulename}}
|
|
|
|
|
BuildRequires: python2-webencodings
|
|
|
|
|
|
|
|
|
|
# Optional test deps:
|
|
|
|
|
BuildRequires: python2-chardet
|
|
|
|
|
BuildRequires: python2-genshi
|
|
|
|
|
BuildRequires: python2-lxml
|
|
|
|
|
|
|
|
|
|
%description -n python2-%{modulename}
|
|
|
|
|
%{?python_provide:%python_provide python2-%{srcname}}
|
|
|
|
|
|
|
|
|
|
%description -n python2-%{srcname}
|
|
|
|
|
A python based HTML parser/tokenizer based on the WHATWG HTML5
|
|
|
|
|
specification for maximum compatibility with major desktop web browsers.
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
%package -n python3-%{modulename}
|
|
|
|
|
Summary: A python based HTML parser/tokenizer
|
|
|
|
|
Group: Development/Libraries
|
|
|
|
|
|
|
|
|
|
Requires: python3-six
|
|
|
|
|
Requires: python3-webencodings
|
|
|
|
|
%package -n python3-%{srcname}
|
|
|
|
|
Summary: %summary
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
|
BuildRequires: python3-nose
|
|
|
|
|
|
|
|
|
|
# Test deps
|
|
|
|
|
BuildRequires: python3-mock
|
|
|
|
|
BuildRequires: python3-pytest
|
|
|
|
|
BuildRequires: python3-six
|
|
|
|
|
%{?python_provide:%python_provide python3-%{modulename}}
|
|
|
|
|
BuildRequires: python3-webencodings
|
|
|
|
|
|
|
|
|
|
# Optional test deps:
|
|
|
|
|
BuildRequires: python3-chardet
|
|
|
|
|
BuildRequires: python3-genshi
|
|
|
|
|
BuildRequires: python3-lxml
|
|
|
|
|
|
|
|
|
|
%{?python_provide:%python_provide python3-%{srcname}}
|
|
|
|
|
|
|
|
|
|
%description -n python3-%{modulename}
|
|
|
|
|
%description -n python3-%{srcname}
|
|
|
|
|
A python based HTML parser/tokenizer based on the WHATWG HTML5
|
|
|
|
|
specification for maximum compatibility with major desktop web browsers.
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -n %{modulename}-python-%{version}
|
|
|
|
|
%autosetup -n %{srcname}-%{version}
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%py2_build
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
%py3_build
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
%py2_install
|
|
|
|
|
%py3_install
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%py2_install
|
|
|
|
|
|
|
|
|
|
#check
|
|
|
|
|
#nosetests-%{python2_version}
|
|
|
|
|
# we need python-webencodings packaged
|
|
|
|
|
%check
|
|
|
|
|
# we don't have pytest-expect, this is hack, TODO: package pytest-expect
|
|
|
|
|
sed -i \
|
|
|
|
|
-e 's/config.option.update_xfail/False/' \
|
|
|
|
|
-e 's/^fail_if_missing_pytest_expect.*//' \
|
|
|
|
|
html5lib/tests/conftest.py
|
|
|
|
|
|
|
|
|
|
# there are hundreds of tests in here, but lot of them xfail only with pytest-expect:
|
|
|
|
|
mv html5lib/tests/testdata{,_nope}
|
|
|
|
|
mkdir -p html5lib/tests/testdata/encoding/chardet/
|
|
|
|
|
cp html5lib/tests/testdata{_nope,}/encoding/chardet/test_big5.txt
|
|
|
|
|
# hack ends here
|
|
|
|
|
|
|
|
|
|
#if 0%{?with_python3}
|
|
|
|
|
#nosetests-%{python3_version}
|
|
|
|
|
#endif
|
|
|
|
|
%{__python2} -m pytest
|
|
|
|
|
%{__python3} -m pytest
|
|
|
|
|
|
|
|
|
|
%files -n python2-%{modulename}
|
|
|
|
|
|
|
|
|
|
%files -n python2-%{srcname}
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%doc CHANGES.rst README.rst
|
|
|
|
|
%{python2_sitelib}/%{modulename}-*.egg-info
|
|
|
|
|
%{python2_sitelib}/%{modulename}
|
|
|
|
|
%{python2_sitelib}/%{srcname}-*.egg-info/
|
|
|
|
|
%{python2_sitelib}/%{srcname}/
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
%files -n python3-%{modulename}
|
|
|
|
|
%files -n python3-%{srcname}
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%doc CHANGES.rst README.rst
|
|
|
|
|
%{python3_sitelib}/%{modulename}-*.egg-info
|
|
|
|
|
%{python3_sitelib}/%{modulename}
|
|
|
|
|
%endif
|
|
|
|
|
%{python3_sitelib}/%{srcname}-*.egg-info/
|
|
|
|
|
%{python3_sitelib}/%{srcname}/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Mon Aug 20 2018 Miro Hrončok <mhroncok@redhat.com> - 1:1.0.1-1
|
|
|
|
|
- Update to 1.0.1 (#1584176)
|
|
|
|
|
|
|
|
|
|
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.999999999-8
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|