- Add patch pytest-requirement.patch to build with new pytest-runner

- Version update to 2.1.2:
  * Support new html5lib

- Convert to singlespec and enable tests/etc.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-bleach?expand=0&rev=13
This commit is contained in:
Tomáš Chvátal 2017-12-13 14:27:19 +00:00 committed by Git OBS Bridge
parent 3689b3a762
commit 9862f6181f
5 changed files with 53 additions and 17 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:760a9368002180fb8a0f4ea48dc6275378e6f311c39d0236d7b904fca1f5ea0d
size 58491

3
bleach-2.1.2.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:38fc8cbebea4e787d8db55d6f324820c7f74362b70db9142c1ac7920452d1a19
size 58954

13
pytest-requirement.patch Normal file
View File

@ -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',

View File

@ -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 Mon Dec 4 11:25:19 UTC 2017 - tampakrap@opensuse.org

View File

@ -16,37 +16,44 @@
# #
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-bleach Name: python-bleach
Version: 2.1.1 Version: 2.1.2
Release: 0 Release: 0
Summary: An easy safelist-based HTML-sanitizing tool Summary: An easy safelist-based HTML-sanitizing tool
License: Apache-2.0 License: Apache-2.0
Group: Development/Languages/Python Group: Development/Languages/Python
Url: https://github.com/mozilla/bleach Url: https://github.com/mozilla/bleach
Source: https://pypi.python.org/packages/source/b/bleach/bleach-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/b/bleach/bleach-%{version}.tar.gz
BuildRequires: python-devel Patch0: pytest-requirement.patch
BuildRequires: python-setuptools BuildRequires: %{python_module flake8 >= 3.3.0}
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: %{python_module html5lib} >= 1.0.1
%if 0%{?suse_version} && 0%{?suse_version} <= 1110 BuildRequires: %{python_module pytest >= 3.0.0}
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} BuildRequires: %{python_module pytest-runner}
%else BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
Requires: python-html5lib >= 1.0.1
BuildArch: noarch BuildArch: noarch
%endif %python_subpackages
%description %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 Djangos urlize filter cannot, and optionally setting rel attributes, even on links already in the text.
%prep %prep
%setup -q -n bleach-%{version} %setup -q -n bleach-%{version}
%autopatch -p1
%build %build
python setup.py build %python_build
%install %install
python setup.py install --prefix=%{_prefix} --root=%{buildroot} %python_install
%files %check
%defattr(-,root,root) %python_exec setup.py test
%files %{python_files}
%{python_sitelib}/* %{python_sitelib}/*
%changelog %changelog