forked from pool/python-PyTrie
- Sync with python-pytrie to obsolete it, wrong camelcase name there
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyTrie?expand=0&rev=2
This commit is contained in:
committed by
Git OBS Bridge
parent
7030da34b9
commit
e5cfb9b67c
@@ -17,7 +17,6 @@
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%bcond_without test
|
||||
Name: python-PyTrie
|
||||
Version: 0.3.1
|
||||
Release: 0
|
||||
@@ -26,27 +25,32 @@ 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
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module pytest}
|
||||
Source1: https://raw.githubusercontent.com/gsakkis/pytrie/master/LICENSE
|
||||
Patch0: fix-sorting-py2.patch
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module sortedcontainers}
|
||||
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
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
Pytrie is a a pure Python (2 and 3) implementation of the trie data structure.
|
||||
pytrie is a a pure Python (2 and 3) implementation of the trie data structure.
|
||||
|
||||
A trie is an ordered tree data structure that is used to store a mapping
|
||||
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
|
||||
implementing the mapping interface, tries allow finding the items for a given
|
||||
prefix, and vice versa, finding the items whose keys are prefixes of a given key.
|
||||
|
||||
%prep
|
||||
%setup -q -n PyTrie-%{version}
|
||||
cp %{SOURCE1} .
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%python_build
|
||||
@@ -56,10 +60,10 @@ prefix, and vice versa, finding the items whose keys are prefixes of a given key
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
%python_expand py.test-%{$python_bin_suffix} -v -k 'not (test_empty_string or test_items_wprefix or test_keys_wprefix or test_values_wprefix)'
|
||||
|
||||
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python -m unittest discover
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
%doc README.md
|
||||
%{python_sitelib}/*
|
||||
|
||||
|
||||
Reference in New Issue
Block a user