From 94d6fb29efa4e478938aa6b91cdf566e30ea20b3205387837528310f86068409 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sat, 27 Jan 2024 11:13:10 +0000 Subject: [PATCH] - update to 2.0.0: * Ported codebase to Python 3. Dropped support for Python 2 * Removed nosetest in favour of unittest * Added a CLI: ``rqw`` * Updated for RDFLib >= 6.1.1 * Added type hints - drop no-2to3.patch (obsolete) - add no-2to3.patch for better compatibility with newer setuptools OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-SPARQLWrapper?expand=0&rev=25 --- SPARQLWrapper-1.8.5.tar.gz | 3 --- SPARQLWrapper-2.0.0.tar.gz | 3 +++ no-2to3.patch | 13 ------------- python-SPARQLWrapper.changes | 13 ++++++++++++- python-SPARQLWrapper.spec | 28 +++++++++++++++++++--------- 5 files changed, 34 insertions(+), 26 deletions(-) delete mode 100644 SPARQLWrapper-1.8.5.tar.gz create mode 100644 SPARQLWrapper-2.0.0.tar.gz delete mode 100644 no-2to3.patch diff --git a/SPARQLWrapper-1.8.5.tar.gz b/SPARQLWrapper-1.8.5.tar.gz deleted file mode 100644 index 00f4fc1..0000000 --- a/SPARQLWrapper-1.8.5.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d6a66b5b8cda141660e07aeb00472db077a98d22cb588c973209c7336850fb3c -size 89117 diff --git a/SPARQLWrapper-2.0.0.tar.gz b/SPARQLWrapper-2.0.0.tar.gz new file mode 100644 index 0000000..55a43a4 --- /dev/null +++ b/SPARQLWrapper-2.0.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3fed3ebcc77617a4a74d2644b86fd88e0f32e7f7003ac7b2b334c026201731f1 +size 98429 diff --git a/no-2to3.patch b/no-2to3.patch deleted file mode 100644 index 426027a..0000000 --- a/no-2to3.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: SPARQLWrapper-1.8.5/setup.py -=================================================================== ---- SPARQLWrapper-1.8.5.orig/setup.py -+++ SPARQLWrapper-1.8.5/setup.py -@@ -75,8 +75,6 @@ setup( - 'Topic :: Software Development :: Libraries :: Python Modules', - ], - keywords = ['python', 'sparql', 'rdf', 'rdflib'], -- use_2to3 = True, -- use_2to3_fixers = ['custom_fixers'], - project_urls={ - 'Home': 'https://rdflib.github.io/sparqlwrapper/', - 'Documentation': 'https://rdflib.github.io/sparqlwrapper/doc/', diff --git a/python-SPARQLWrapper.changes b/python-SPARQLWrapper.changes index 637c662..60ac491 100644 --- a/python-SPARQLWrapper.changes +++ b/python-SPARQLWrapper.changes @@ -1,7 +1,18 @@ +------------------------------------------------------------------- +Sat Jan 27 11:12:21 UTC 2024 - Dirk Müller + +- update to 2.0.0: + * Ported codebase to Python 3. Dropped support for Python 2 + * Removed nosetest in favour of unittest + * Added a CLI: ``rqw`` + * Updated for RDFLib >= 6.1.1 + * Added type hints +- drop no-2to3.patch (obsolete) + ------------------------------------------------------------------- Mon Mar 7 11:58:04 UTC 2022 - Dirk Müller -- add no-2to3.patch for better compatibility with newer setuptools +- add no-2to3.patch for better compatibility with newer setuptools ------------------------------------------------------------------- Wed Mar 11 17:00:28 UTC 2020 - Tomáš Chvátal diff --git a/python-SPARQLWrapper.spec b/python-SPARQLWrapper.spec index b19b0b2..c7748d5 100644 --- a/python-SPARQLWrapper.spec +++ b/python-SPARQLWrapper.spec @@ -1,7 +1,7 @@ # # spec file for package python-SPARQLWrapper # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,19 +16,22 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%{?sle15_python_module_pythons} Name: python-SPARQLWrapper -Version: 1.8.5 +Version: 2.0.0 Release: 0 Summary: SPARQL Endpoint interface to Python License: W3C URL: https://rdflib.dev/sparqlwrapper/ Source: https://files.pythonhosted.org/packages/source/S/SPARQLWrapper/SPARQLWrapper-%{version}.tar.gz -Patch1: no-2to3.patch +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-rdflib >= 4.0 +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %python_subpackages @@ -39,22 +42,29 @@ format. %prep %setup -q -n SPARQLWrapper-%{version} -%patch1 -p1 %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install +%python_clone -a %{buildroot}%{_bindir}/rqw %python_expand %fdupes %{buildroot}%{$python_sitelib} %check #%%pytest test +%post +%python_install_alternative rqw + +%postun +%python_uninstall_alternative rqw + %files %{python_files} %license LICENSE.txt %doc README.rst AUTHORS.md -%{python_sitelib}/SPARQLWrapper/ -%{python_sitelib}/SPARQLWrapper-%{version}-py*.egg-info +%python_alternative %{_bindir}/rqw +%{python_sitelib}/SPARQLWrapper +%{python_sitelib}/SPARQLWrapper-%{version}.dist-info %changelog