From 5a69e818a41ace0eb35f2b9078819d168896430c112d9c0a180a4d730c9ed5f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 25 Mar 2019 08:44:31 +0000 Subject: [PATCH] Accepting request 681214 from home:jayvdb:branches:devel:languages:python - Remove bcond preventing tests from running, use IMAGEIO_NO_INTERNET to activate tests which can run without the internet, and skip currently failing tests on Python 2 and 3 - Remove unused test dependency nose - Recommend Pillow as it is a mandatory dependency of the test suite OBS-URL: https://build.opensuse.org/request/show/681214 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-imageio?expand=0&rev=11 --- python-imageio.changes | 9 +++++++++ python-imageio.spec | 28 ++++++++++++++-------------- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/python-imageio.changes b/python-imageio.changes index af6baec..c39bd1b 100644 --- a/python-imageio.changes +++ b/python-imageio.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Mar 4 06:52:01 UTC 2019 - John Vandenberg + +- Remove bcond preventing tests from running, use IMAGEIO_NO_INTERNET + to activate tests which can run without the internet, and skip + currently failing tests on Python 2 and 3 +- Remove unused test dependency nose +- Recommend Pillow as it is a mandatory dependency of the test suite + ------------------------------------------------------------------- Tue Dec 4 12:49:14 UTC 2018 - Matej Cepl diff --git a/python-imageio.spec b/python-imageio.spec index b6a9f3e..d3f2cf9 100644 --- a/python-imageio.spec +++ b/python-imageio.spec @@ -1,7 +1,7 @@ # # spec file for package python-imageio # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,8 +17,6 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} -# Tests don't work without internet -%bcond_with tests Name: python-imageio Version: 2.3.0 Release: 0 @@ -28,20 +26,20 @@ Group: Development/Languages/Python URL: http://imageio.github.io/ Source0: https://files.pythonhosted.org/packages/source/i/imageio/imageio-%{version}.tar.gz Source1: python-imageio-rpmlintrc -BuildRequires: %{python_module numpy} BuildRequires: %{python_module setuptools} BuildRequires: fdupes -BuildRequires: ffmpeg -BuildRequires: freeimage-devel BuildRequires: python-rpm-macros Requires: ffmpeg Requires: python-numpy +Recommends: python-Pillow Recommends: libfreeimageplus3 BuildArch: noarch -%if %{with tests} -BuildRequires: %{python_module nose} +# There are many other optional dependencies, but they are skipped anyway +BuildRequires: %{python_module Pillow} +BuildRequires: %{python_module numpy} +BuildRequires: %{python_module psutil} BuildRequires: %{python_module pytest} -%endif +BuildRequires: python-enum34 %python_subpackages %description @@ -67,14 +65,16 @@ export IMAGEIO_NO_INTERNET=1 %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} -%if %{with tests} %check pushd tests -%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib} -py.test-%{$python_bin_suffix} -} -popd +export IMAGEIO_NO_INTERNET=1 +PYTHONPATH=%{buildroot}%{python2_sitelib} python2 -m pytest -k 'not test_fei_file_fail' +%if %{python3_version_nodots} == 37 +PYTHONPATH=%{buildroot}%{python3_sitelib} python3 -m pytest -k 'not test_series_unclosed and not test_import_dependencies' +%else +PYTHONPATH=%{buildroot}%{python3_sitelib} python3 -m pytest -k 'not test_import_dependencies' %endif +popd %files %{python_files} %license LICENSE