2017-05-17 15:52:30 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-HeapDict
|
|
|
|
|
#
|
2019-09-24 09:16:47 +00:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2017-05-17 15:52:30 +00:00
|
|
|
#
|
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
2018-12-04 13:31:50 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-05-17 15:52:30 +00:00
|
|
|
#
|
|
|
|
|
|
2018-12-04 13:31:50 +00:00
|
|
|
|
2018-12-04 17:14:21 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2017-05-17 15:52:30 +00:00
|
|
|
Name: python-HeapDict
|
2019-09-24 09:16:47 +00:00
|
|
|
Version: 1.0.1
|
2017-05-17 15:52:30 +00:00
|
|
|
Release: 0
|
|
|
|
|
Summary: A heap with decrease-key and increase-key operations
|
|
|
|
|
License: BSD-3-Clause
|
|
|
|
|
Group: Development/Languages/Python
|
2018-12-04 17:14:21 +00:00
|
|
|
URL: http://stutzbachenterprises.com/
|
2017-05-17 15:52:30 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/H/HeapDict/HeapDict-%{version}.tar.gz
|
|
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
|
BuildRequires: fdupes
|
|
|
|
|
BuildRequires: python-rpm-macros
|
2018-12-06 23:27:59 +00:00
|
|
|
# These packages contain module test from stdlib,
|
|
|
|
|
# it has nothing to do with this package being noarch
|
2018-12-06 16:57:05 +00:00
|
|
|
BuildRequires: python2-devel
|
2017-05-17 15:52:30 +00:00
|
|
|
BuildRequires: python3-testsuite
|
2019-09-24 09:16:47 +00:00
|
|
|
BuildArch: noarch
|
2017-05-17 15:52:30 +00:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
HeapDict implements the MutableMapping ABC, meaning it works pretty
|
|
|
|
|
much like a regular Python dict. It's designed to be used as a
|
|
|
|
|
priority queue.
|
|
|
|
|
|
|
|
|
|
Unlike the Python standard library's heapq module, the HeapDict
|
|
|
|
|
supports efficiently changing the priority of an existing object
|
|
|
|
|
(often called "decrease-key" in textbooks). Altering the priority is
|
|
|
|
|
important for many algorithms such as Dijkstra's Algorithm and A*.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n HeapDict-%{version}
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%python_install
|
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%python_exec test_heap.py
|
|
|
|
|
|
|
|
|
|
%files %{python_files}
|
2018-12-04 17:14:21 +00:00
|
|
|
%license LICENSE
|
|
|
|
|
%doc README.rst
|
2017-05-17 15:52:30 +00:00
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
|
|
%changelog
|