From e85d116a82e5fa1dc0d60685c6e86a57fa51a830189f0144aea882080cc427b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 25 Feb 2019 08:58:28 +0000 Subject: [PATCH 1/2] Accepting request 678596 from home:jayvdb:pyexcel - Add %license - Run test suite on both Python 2 & 3 - Remove outdated build dependencies - Add minimum versions - Add python-coverage as build dependency as nose segfaults when missing OBS-URL: https://build.opensuse.org/request/show/678596 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyquery?expand=0&rev=29 --- python-pyquery.changes | 9 +++++++++ python-pyquery.spec | 17 ++++++++++------- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/python-pyquery.changes b/python-pyquery.changes index 474c5dd..901553b 100644 --- a/python-pyquery.changes +++ b/python-pyquery.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Feb 25 03:24:33 UTC 2019 - John Vandenberg + +- Add %license +- Run test suite on both Python 2 & 3 +- Remove outdated build dependencies +- Add minimum versions +- Add python-coverage as build dependency as nose segfaults when missing + ------------------------------------------------------------------- Tue Dec 4 12:52:42 UTC 2018 - Matej Cepl diff --git a/python-pyquery.spec b/python-pyquery.spec index 4836210..8214498 100644 --- a/python-pyquery.spec +++ b/python-pyquery.spec @@ -1,7 +1,7 @@ # # spec file for package python-pyquery # -# 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 @@ -28,20 +28,21 @@ License: BSD-3-Clause Group: Development/Languages/Python URL: http://pypi.python.org/pypi/pyquery Source: https://files.pythonhosted.org/packages/source/p/pyquery/pyquery-%{version}.tar.gz -BuildRequires: %{python_module cssselect} +BuildRequires: %{python_module cssselect > 0.7.9} BuildRequires: %{python_module lxml >= 2.1} BuildRequires: %{python_module setuptools} +# seg fault without coverage +BuildRequires: %{python_module coverage} BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: python-cssselect +Requires: python-cssselect > 0.7.9 Requires: python-lxml >= 2.1 BuildArch: noarch %if %{with test} -BuildRequires: %{python_module WebOb} +BuildRequires: %{python_module WebOb > 1.1.9} BuildRequires: %{python_module WebTest} -BuildRequires: %{python_module beautifulsoup} BuildRequires: %{python_module nose} -BuildRequires: %{python_module restkit} +BuildRequires: %{python_module requests} %endif %python_subpackages @@ -62,10 +63,12 @@ XML and HTML manipulation. %if %{with test} %check -nosetests -q tests +# Disable tests which perform live fetch +%python_exec -m nose tests -e test_get %endif %files %{python_files} +%license LICENSE.txt %doc CHANGES.rst README.rst %{python_sitelib}/* From 659c21ad9a971574718c01637a9ba131c86db58ed4cca69956205ec6640cd51d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 25 Feb 2019 09:01:13 +0000 Subject: [PATCH 2/2] - Use _multibuild to run tests OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyquery?expand=0&rev=30 --- _multibuild | 3 +++ python-pyquery.changes | 5 +++++ python-pyquery.spec | 18 +++++++++++++----- 3 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 _multibuild diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..fcc7b97 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/python-pyquery.changes b/python-pyquery.changes index 901553b..0763522 100644 --- a/python-pyquery.changes +++ b/python-pyquery.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Feb 25 09:00:58 UTC 2019 - Tomáš Chvátal + +- Use _multibuild to run tests + ------------------------------------------------------------------- Mon Feb 25 03:24:33 UTC 2019 - John Vandenberg diff --git a/python-pyquery.spec b/python-pyquery.spec index 8214498..4f1528b 100644 --- a/python-pyquery.spec +++ b/python-pyquery.spec @@ -17,10 +17,15 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} -# NOTE: circular dependency between python-pyquery and python-WebTest -# enable testing with a build conditional (off by default): +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} %bcond_with test -Name: python-pyquery +%endif +Name: python-pyquery%{psuffix} Version: 1.4.0 Release: 0 Summary: A jQuery-like library for python @@ -28,11 +33,10 @@ License: BSD-3-Clause Group: Development/Languages/Python URL: http://pypi.python.org/pypi/pyquery Source: https://files.pythonhosted.org/packages/source/p/pyquery/pyquery-%{version}.tar.gz +BuildRequires: %{python_module coverage} BuildRequires: %{python_module cssselect > 0.7.9} BuildRequires: %{python_module lxml >= 2.1} BuildRequires: %{python_module setuptools} -# seg fault without coverage -BuildRequires: %{python_module coverage} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-cssselect > 0.7.9 @@ -58,8 +62,10 @@ XML and HTML manipulation. %python_build %install +%if !%{with test} %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif %if %{with test} %check @@ -67,9 +73,11 @@ XML and HTML manipulation. %python_exec -m nose tests -e test_get %endif +%if !%{with test} %files %{python_files} %license LICENSE.txt %doc CHANGES.rst README.rst %{python_sitelib}/* +%endif %changelog