From 8411ed293ceab98ad13344b9284f5da2de105f0e7bd31c1697a21acaf4004c58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 3 Jan 2018 18:08:30 +0000 Subject: [PATCH] - Make sure to not bail out when building with py3 only - Do not recommend already required package OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-SPARQLWrapper?expand=0&rev=13 --- python-SPARQLWrapper.changes | 6 ++++++ python-SPARQLWrapper.spec | 27 ++++++++++++--------------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/python-SPARQLWrapper.changes b/python-SPARQLWrapper.changes index f575c7b..070e4dc 100644 --- a/python-SPARQLWrapper.changes +++ b/python-SPARQLWrapper.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jan 3 18:11:19 UTC 2018 - tchvatal@suse.com + +- Make sure to not bail out when building with py3 only +- Do not recommend already required package + ------------------------------------------------------------------- Mon May 8 19:48:46 UTC 2017 - toddrme2178@gmail.com diff --git a/python-SPARQLWrapper.spec b/python-SPARQLWrapper.spec index 6ffe6eb..79a6ed8 100644 --- a/python-SPARQLWrapper.spec +++ b/python-SPARQLWrapper.spec @@ -1,7 +1,7 @@ # # spec file for package python-SPARQLWrapper # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 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 @@ -16,9 +16,13 @@ # -%bcond_without tests - %{?!python_module:%define python_module() python-%{**} python3-%{**}} +# Tests are not compatible with python3 +%if 0%{?have_python2} +%bcond_without tests +%else +%bcond_with tests +%endif Name: python-SPARQLWrapper Version: 1.8.0 Release: 0 @@ -27,16 +31,13 @@ License: W3C Group: Development/Languages/Python Url: http://sparql-wrapper.sourceforge.net/ Source: https://files.pythonhosted.org/packages/source/S/SPARQLWrapper/SPARQLWrapper-%{version}.tar.gz -BuildRequires: fdupes -BuildRequires: python-rpm-macros -BuildRequires: python3-2to3 -BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} # Only used during installation BuildRequires: %{python_module six} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildRequires: python3-2to3 Requires: python-rdflib >= 4.0 -Recommends: python-rdflib >= 4.0 -BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch %python_subpackages @@ -57,15 +58,11 @@ format. %if %{with tests} %check -# Tests are not compatible with python3 -%if %have_python2 -python test/wrapper_test.py -%endif +python2 test/wrapper_test.py %endif %files %{python_files} -%defattr(-,root,root,-) -%doc README.md AUTHORS.md LICENSE.txt +%doc README.md AUTHORS.md LICENSE.txt %{python_sitelib}/SPARQLWrapper/ %{python_sitelib}/SPARQLWrapper-%{version}-py*.egg-info