diff --git a/0001-setup.py-don-t-hardcode-pytest-versions.patch b/0001-setup.py-don-t-hardcode-pytest-versions.patch new file mode 100644 index 0000000..603d921 --- /dev/null +++ b/0001-setup.py-don-t-hardcode-pytest-versions.patch @@ -0,0 +1,30 @@ +From 8237cc544c01d6785f6744adfabb8f19704f530e Mon Sep 17 00:00:00 2001 +From: Igor Gnatenko +Date: Mon, 2 Jan 2017 02:08:47 +0100 +Subject: [PATCH] setup.py: don't hardcode pytest versions + +Signed-off-by: Igor Gnatenko +--- + setup.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/setup.py b/setup.py +index 26f7eef..42741e4 100644 +--- a/setup.py ++++ b/setup.py +@@ -7,10 +7,10 @@ from distutils.util import convert_path + 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') + + tests_require = [ +- 'pytest==3.0.3', ++ 'pytest', + ] + + install_requires = [ +-- +2.11.0 + diff --git a/python-bleach.spec b/python-bleach.spec index 4f56d8d..bc3ec8d 100644 --- a/python-bleach.spec +++ b/python-bleach.spec @@ -9,6 +9,9 @@ License: ASL 2.0 URL: http://github.com/jsocol/bleach Source0: %{url}/archive/v%{version}/%{modname}-%{version}.tar.gz +# https://github.com/mozilla/bleach/issues/244 +Patch0001: 0001-setup.py-don-t-hardcode-pytest-versions.patch + BuildArch: noarch %global _description \ @@ -22,7 +25,8 @@ Summary: %{summary} %{?python_provide:%python_provide python2-%{modname}} BuildRequires: python2-devel BuildRequires: python2-setuptools -BuildRequires: python2-nose +BuildRequires: python2-pytest +BuildRequires: python2-pytest-runner BuildRequires: python2-six BuildRequires: python-html5lib Requires: python2-six @@ -37,7 +41,8 @@ Summary: An easy whitelist-based HTML-sanitizing tool %{?python_provide:%python_provide python3-%{modname}} BuildRequires: python3-devel BuildRequires: python3-setuptools -BuildRequires: python3-nose +BuildRequires: python3-pytest +BuildRequires: python3-pytest-runner BuildRequires: python3-six BuildRequires: python3-html5lib Requires: python3-six @@ -48,7 +53,7 @@ Requires: python3-html5lib Python 3 version. %prep -%autosetup -n %{modname}-%{version} +%autosetup -n %{modname}-%{version} -p1 %build %py2_build