diff --git a/.gitignore b/.gitignore index f9671f3..78bcaf2 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ Werkzeug-0.6.2.tar.gz /Werkzeug-0.11.6.tar.gz /Werkzeug-0.11.10.tar.gz /Werkzeug-0.12.2.tar.gz +/Werkzeug-0.14.1.tar.gz diff --git a/1293.patch b/1293.patch new file mode 100644 index 0000000..9c35261 --- /dev/null +++ b/1293.patch @@ -0,0 +1,37 @@ +From 989e13e0514a97cd01234233dd85ebbd2805a3bb Mon Sep 17 00:00:00 2001 +From: Adam Williamson +Date: Wed, 9 May 2018 15:50:50 -0700 +Subject: [PATCH] Skip tests that use 'xprocess' fixture when not installed + +There's already a little trick to skip tests that use a fixture +called 'subprocess' when pytest-xprocess is not installed, but +many tests use the 'xprocess' fixture directly, and all of those +will still just fail. This just defines a dummy 'xprocess' +fixture as well as the dummy 'subprocess' fixture when xprocess +is not installed, so those tests as well will be skipped instead +of failing. + +I noticed this when trying to run the test suite during build +of the Fedora package - xprocess isn't packaged for Fedora yet, +so there's no way to run the tests that use it unfortunately. + +Signed-off-by: Adam Williamson +--- + tests/conftest.py | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/tests/conftest.py b/tests/conftest.py +index ce885777a..f4611d9d0 100644 +--- a/tests/conftest.py ++++ b/tests/conftest.py +@@ -29,6 +29,10 @@ + @pytest.fixture(scope='session') + def subprocess(): + pytest.skip('pytest-xprocess not installed.') ++ ++ @pytest.fixture(scope='session') ++ def xprocess(): ++ pytest.skip('pytest-xprocess not installed.') + else: + @pytest.fixture(scope='session') + def subprocess(xprocess): diff --git a/python-werkzeug.spec b/python-werkzeug.spec index 3ded80c..83176ad 100644 --- a/python-werkzeug.spec +++ b/python-werkzeug.spec @@ -1,8 +1,8 @@ %global srcname Werkzeug Name: python-werkzeug -Version: 0.12.2 -Release: 2%{?dist} +Version: 0.14.1 +Release: 1%{?dist} Summary: The Swiss Army knife of Python web development Group: Development/Libraries @@ -13,6 +13,11 @@ Source0: https://files.pythonhosted.org/packages/source/W/Werkzeug/%{srcn # See https://github.com/mitsuhiko/werkzeug/issues/761 Source1: werkzeug-sphinx-theme.tar.gz +# https://github.com/pallets/werkzeug/pull/1293 +# skip all tests that use xprocess when it's not installed (like here, +# as it's not packaged for Fedora...) +Patch0: 1293.patch + BuildArch: noarch %global _description\ @@ -41,6 +46,15 @@ Summary: %summary BuildRequires: python2-devel BuildRequires: python2-setuptools +# For tests +BuildRequires: python2-pytest +BuildRequires: python2-hypothesis +BuildRequires: python2-requests +BuildRequires: python2-pyOpenSSL +BuildRequires: python2-greenlet +BuildRequires: python2-redis +BuildRequires: python2-memcached +BuildRequires: python2-watchdog %{?python_provide:%python_provide python2-werkzeug} @@ -63,6 +77,15 @@ Summary: %summary BuildRequires: python3-devel BuildRequires: python3-setuptools +# For tests +BuildRequires: python3-pytest +BuildRequires: python3-hypothesis +BuildRequires: python3-requests +BuildRequires: python3-pyOpenSSL +BuildRequires: python3-greenlet +BuildRequires: python3-redis +BuildRequires: python3-memcached +BuildRequires: python3-watchdog %{?python_provide:%python_provide python3-werkzeug} @@ -82,7 +105,7 @@ Documentation and examples for python3-werkzeug. %prep -%setup -q -n %{srcname}-%{version} +%autosetup -p1 -n %{srcname}-%{version} %{__sed} -i 's/\r//' LICENSE %{__sed} -i '1d' tests/multipart/test_collect.py tar -xf %{SOURCE1} @@ -127,6 +150,13 @@ pushd %{py3dir} %{__rm} -rf examples/cupoftee/db.pyc popd +%check +PYTHONPATH=./ py.test-2 + +pushd %{py3dir} +PYTHONPATH=./ py.test-3 +popd + %files -n python2-werkzeug %license LICENSE %doc AUTHORS PKG-INFO CHANGES @@ -145,6 +175,10 @@ popd %changelog +* Wed May 09 2018 Adam Williamson - 0.14.1-1 +- Update to 0.14.1 (needed by httpbin) +- Run tests during build + * Fri Feb 09 2018 Fedora Release Engineering - 0.12.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild diff --git a/sources b/sources index f162321..66827c8 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (Werkzeug-0.12.2.tar.gz) = 9ff45aeb51a71fd5115e8cdee40a7b2fddfa0574c356686050cb1bdced5c6c18f672b601ca2637010c7f59be75c66ee558efb4ea05052c550ec7da3644b88e0a -SHA512 (werkzeug-sphinx-theme.tar.gz) = f98e00447afb5d2ecba707fd336f139c0268b0fef1557fed9aa02274c9b8c29980fb3efa3a26d3a81340e920ccc9ea610f5c5a0eeab0cda900b400d56148b98d +SHA512 (Werkzeug-0.14.1.tar.gz) = 64976cc46c1cee2203112c50aba6f9404d4e48d4a90f8b11837148b5415a28572b7e706095586045a46879e853fc5a80c63e7bf0c13eda29d564a37b4a554c0b