15
0

Accepting request 622526 from home:apersaud:branches:devel:languages:python

update to latest version

OBS-URL: https://build.opensuse.org/request/show/622526
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-SPARQLWrapper?expand=0&rev=15
This commit is contained in:
Tomáš Chvátal
2018-07-14 09:01:34 +00:00
committed by Git OBS Bridge
parent 8411ed293c
commit 0c7003cdcd
4 changed files with 39 additions and 16 deletions

View File

@@ -17,26 +17,21 @@
%{?!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
Version: 1.8.2
Release: 0
Summary: SPARQL Endpoint interface to Python
License: W3C
Group: Development/Languages/Python
Url: http://sparql-wrapper.sourceforge.net/
URL: http://sparql-wrapper.sourceforge.net/
Source: https://files.pythonhosted.org/packages/source/S/SPARQLWrapper/SPARQLWrapper-%{version}.tar.gz
BuildRequires: %{python_module setuptools}
# Only used during installation
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: python3-2to3
BuildRequires: python3-tools
Requires: python-rdflib >= 4.0
BuildArch: noarch
%python_subpackages
@@ -56,13 +51,20 @@ format.
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with tests}
%check
python2 test/wrapper_test.py
%if %python3_version_nodots > 34
# taken from https://github.com/RDFLib/sparqlwrapper/blob/master/run_tests_py3.sh
cp -r %{buildroot}%{python_sitelib}/SPARQLWrapper test/
2to3 -wn --no-diffs test
sed -i.bak s/urllib2._opener/urllib.request._opener/g test/wrapper_test.py
python3 -m pytest test
%else
python -m pytest test
%endif
%files %{python_files}
%doc README.md AUTHORS.md LICENSE.txt
%license LICENSE.txt
%doc README.md AUTHORS.md
%{python_sitelib}/SPARQLWrapper/
%{python_sitelib}/SPARQLWrapper-%{version}-py*.egg-info