forked from pool/python-PyTrie
- Update to 0.4.0:
* Drop Python 2.7 support - LICENSE now included in the tarball, drop the separate Source. - Drop fix-sorting-py2.patch, Python 2 not supported - Drop no-import-from-collections.patch, included upstream - No longer BuildRequire python-devel, and switch to the macro for testsuite OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyTrie?expand=0&rev=12
This commit is contained in:
21
LICENSE
21
LICENSE
@@ -1,21 +0,0 @@
|
||||
Copyright (c) 2009, George Sakkis
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* The names of its contributors may not be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3bb7d122a549d8006c9cba2feecac20bceda9f8c0e2a3fa99a5584cfe0dec523
|
||||
size 94678
|
||||
3
PyTrie-0.4.0.tar.gz
Normal file
3
PyTrie-0.4.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8f4488f402d3465993fb6b6efa09866849ed8cda7903b50647b7d0342b805379
|
||||
size 95139
|
||||
@@ -1,33 +0,0 @@
|
||||
Index: PyTrie-0.3.1/pytrie.py
|
||||
===================================================================
|
||||
--- PyTrie-0.3.1.orig/pytrie.py
|
||||
+++ PyTrie-0.3.1/pytrie.py
|
||||
@@ -51,24 +51,11 @@ import sortedcontainers
|
||||
|
||||
# Python 3 interoperability
|
||||
PY3 = sys.version_info[0] == 3
|
||||
-if PY3:
|
||||
- def itervalues(d): # pylint: disable=invalid-name
|
||||
- return d.values()
|
||||
+def itervalues(d): # pylint: disable=invalid-name
|
||||
+ return d.values()
|
||||
|
||||
- def iteritems(d): # pylint: disable=invalid-name
|
||||
- return d.items()
|
||||
-else:
|
||||
- def itervalues(d): # pylint: disable=invalid-name
|
||||
- if hasattr(d, 'itervalues'):
|
||||
- return d.itervalues()
|
||||
-
|
||||
- return d.values()
|
||||
-
|
||||
- def iteritems(d): # pylint: disable=invalid-name
|
||||
- if hasattr(d, 'iteritems'):
|
||||
- return d.iteritems()
|
||||
-
|
||||
- return d.items()
|
||||
+def iteritems(d): # pylint: disable=invalid-name
|
||||
+ return d.items()
|
||||
|
||||
|
||||
# Singleton sentinel - works with pickling
|
||||
@@ -1,28 +0,0 @@
|
||||
From 242b04de42f4c78ef5c86df55ff41b222986d268 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= <mcepl@cepl.eu>
|
||||
Date: Tue, 3 Dec 2019 16:09:20 +0100
|
||||
Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20import=20from=20collections=20g?=
|
||||
=?UTF-8?q?enerally,=20but=20directly=20from=20collections.abc.?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Fixes #1
|
||||
---
|
||||
pytrie.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/pytrie.py
|
||||
+++ b/pytrie.py
|
||||
@@ -45,7 +45,10 @@ __all__ = ['Trie', 'StringTrie', 'Sorted
|
||||
|
||||
import sys
|
||||
from copy import copy
|
||||
-from collections import MutableMapping
|
||||
+try:
|
||||
+ from collections.abc import MutableMapping
|
||||
+except ImportError:
|
||||
+ from collections import MutableMapping
|
||||
|
||||
import sortedcontainers
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 11 01:51:53 UTC 2020 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Update to 0.4.0:
|
||||
* Drop Python 2.7 support
|
||||
- LICENSE now included in the tarball, drop the separate Source.
|
||||
- Drop fix-sorting-py2.patch, Python 2 not supported
|
||||
- Drop no-import-from-collections.patch, included upstream
|
||||
- No longer BuildRequire python-devel, and switch to the macro for
|
||||
testsuite
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 3 15:14:36 UTC 2019 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-PyTrie
|
||||
#
|
||||
# Copyright (c) 2019 SUSE LLC
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -17,26 +17,19 @@
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%define skip_python2 1
|
||||
Name: python-PyTrie
|
||||
Version: 0.3.1
|
||||
Version: 0.4.0
|
||||
Release: 0
|
||||
Summary: A pure Python implementation of the trie data structure
|
||||
License: BSD-3-Clause
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/gsakkis/pytrie/
|
||||
Source: https://files.pythonhosted.org/packages/source/P/PyTrie/PyTrie-%{version}.tar.gz
|
||||
Source1: https://raw.githubusercontent.com/gsakkis/pytrie/master/LICENSE
|
||||
Patch0: fix-sorting-py2.patch
|
||||
# PATCH-FIX-UPSTREAM no-import-from-collections.patch gh#gsakkis/pytrie#5 mcepl@suse.com
|
||||
# Don't import directly from collections.
|
||||
Patch1: no-import-from-collections.patch
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module sortedcontainers}
|
||||
BuildRequires: %{python_module testsuite}
|
||||
BuildRequires: fdupes
|
||||
# needs tests, on py2 they are in devel
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: python3-testsuite
|
||||
Requires: python-sortedcontainers
|
||||
Provides: python-pytrie
|
||||
Obsoletes: python-pytrie
|
||||
@@ -44,7 +37,7 @@ BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
pytrie is a pure Python (2 and 3) implementation of the trie data structure.
|
||||
pytrie is a pure Python 3 implementation of the trie data structure.
|
||||
|
||||
A trie is an ordered tree data structure that is used to store a mapping
|
||||
where the keys are sequences, usually strings over an alphabet. In addition to
|
||||
@@ -53,7 +46,6 @@ prefix, and vice versa, finding the items whose keys are prefixes of a given key
|
||||
|
||||
%prep
|
||||
%setup -q -n PyTrie-%{version}
|
||||
cp %{SOURCE1} .
|
||||
%autopatch -p1
|
||||
|
||||
%build
|
||||
|
||||
Reference in New Issue
Block a user