diff --git a/bleach-2.1.1.tar.gz b/bleach-2.1.1.tar.gz deleted file mode 100644 index 7f9c05d..0000000 --- a/bleach-2.1.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:760a9368002180fb8a0f4ea48dc6275378e6f311c39d0236d7b904fca1f5ea0d -size 58491 diff --git a/bleach-2.1.2.tar.gz b/bleach-2.1.2.tar.gz new file mode 100644 index 0000000..e5726f0 --- /dev/null +++ b/bleach-2.1.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:38fc8cbebea4e787d8db55d6f324820c7f74362b70db9142c1ac7920452d1a19 +size 58954 diff --git a/pytest-requirement.patch b/pytest-requirement.patch new file mode 100644 index 0000000..4c7111a --- /dev/null +++ b/pytest-requirement.patch @@ -0,0 +1,13 @@ +Index: bleach-2.1.2/setup.py +=================================================================== +--- bleach-2.1.2.orig/setup.py ++++ bleach-2.1.2/setup.py +@@ -11,7 +11,7 @@ from setuptools import setup, find_packa + setup_requires = [] + if 'test' in sys.argv: + # Only add pytest-runner to setup_requires if running tests +- setup_requires.append('pytest-runner>=2.0,<3dev') ++ setup_requires.append('pytest-runner>=2.0') + + tests_require = [ + 'pytest>=3.0.0', diff --git a/python-bleach.changes b/python-bleach.changes index e53c500..a3ff661 100644 --- a/python-bleach.changes +++ b/python-bleach.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Wed Dec 13 14:29:13 UTC 2017 - tchvatal@suse.com + +- Add patch pytest-requirement.patch to build with new pytest-runner + +------------------------------------------------------------------- +Wed Dec 13 14:16:03 UTC 2017 - tchvatal@suse.com + +- Version update to 2.1.2: + * Support new html5lib + +------------------------------------------------------------------- +Wed Dec 13 14:15:21 UTC 2017 - tchvatal@suse.com + +- Convert to singlespec and enable tests/etc. + ------------------------------------------------------------------- Mon Dec 4 11:25:19 UTC 2017 - tampakrap@opensuse.org diff --git a/python-bleach.spec b/python-bleach.spec index 2717107..0b993ec 100644 --- a/python-bleach.spec +++ b/python-bleach.spec @@ -16,37 +16,44 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-bleach -Version: 2.1.1 +Version: 2.1.2 Release: 0 Summary: An easy safelist-based HTML-sanitizing tool License: Apache-2.0 Group: Development/Languages/Python Url: https://github.com/mozilla/bleach -Source: https://pypi.python.org/packages/source/b/bleach/bleach-%{version}.tar.gz -BuildRequires: python-devel -BuildRequires: python-setuptools -BuildRoot: %{_tmppath}/%{name}-%{version}-build -%if 0%{?suse_version} && 0%{?suse_version} <= 1110 -%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%else +Source: https://files.pythonhosted.org/packages/source/b/bleach/bleach-%{version}.tar.gz +Patch0: pytest-requirement.patch +BuildRequires: %{python_module flake8 >= 3.3.0} +BuildRequires: %{python_module html5lib} >= 1.0.1 +BuildRequires: %{python_module pytest >= 3.0.0} +BuildRequires: %{python_module pytest-runner} +BuildRequires: %{python_module setuptools} +BuildRequires: python-rpm-macros +Requires: python-html5lib >= 1.0.1 BuildArch: noarch -%endif +%python_subpackages %description +Bleach is an allowed-list-based HTML sanitizing library that escapes or strips markup and attributes. +Bleach can also linkify text safely, applying filters that Django’s urlize filter cannot, and optionally setting rel attributes, even on links already in the text. %prep %setup -q -n bleach-%{version} +%autopatch -p1 %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install -%files -%defattr(-,root,root) +%check +%python_exec setup.py test + +%files %{python_files} %{python_sitelib}/* %changelog -