2014-12-09 15:25:27 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-sortedcontainers
|
|
|
|
#
|
2020-06-14 09:09:03 +00:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2014-12-09 15:25:27 +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 14:04:52 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2014-12-09 15:25:27 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2017-07-17 05:03:01 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2020-08-11 07:24:43 +00:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "test"
|
|
|
|
%define psuffix -test
|
|
|
|
%bcond_without test
|
|
|
|
%else
|
|
|
|
%define psuffix %{nil}
|
|
|
|
%bcond_with test
|
|
|
|
%endif
|
|
|
|
Name: python-sortedcontainers%{psuffix}
|
2020-06-14 09:09:03 +00:00
|
|
|
Version: 2.2.2
|
2014-12-09 15:25:27 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Sorted container data types
|
|
|
|
License: Apache-2.0
|
2018-05-31 02:10:24 +00:00
|
|
|
URL: https://github.com/grantjenks/python-sortedcontainers
|
2019-03-26 11:39:34 +00:00
|
|
|
Source: https://github.com/grantjenks/python-sortedcontainers/archive/v%{version}.tar.gz
|
2017-07-17 05:03:01 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2020-08-11 07:24:43 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
%if %{with test}
|
2018-05-31 02:10:24 +00:00
|
|
|
BuildRequires: %{python_module matplotlib}
|
|
|
|
BuildRequires: %{python_module numpy}
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
BuildRequires: %{python_module scipy}
|
2020-08-11 07:24:43 +00:00
|
|
|
%endif
|
2017-07-17 05:03:01 +00:00
|
|
|
%python_subpackages
|
2014-12-09 15:25:27 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
SortedContainers is an Apache2 licensed containers library, written in
|
|
|
|
pure-Python, and fast as C-extensions.
|
|
|
|
|
|
|
|
Python's standard library is great until you need a sorted container type. Many
|
|
|
|
will attest that you can get really far without one, but the moment you **really
|
|
|
|
need** a sorted list, dict, or set, you're faced with a dozen different
|
|
|
|
implementations, most using C-extensions without great documentation and
|
|
|
|
benchmarking.
|
|
|
|
|
|
|
|
SortedContainers takes all of the work out of Python sorted types - making your
|
|
|
|
deployment and use of Python easy. There's no need to install a C compiler or
|
|
|
|
pre-build and distribute custom extensions. Performance is a feature and testing
|
|
|
|
has 100% coverage with unit tests and hours of stress.
|
|
|
|
|
|
|
|
%prep
|
2019-03-26 11:39:34 +00:00
|
|
|
%setup -q -n python-sortedcontainers-%{version}
|
2017-07-17 05:03:01 +00:00
|
|
|
rm -rf sortedcontainers.egg-info
|
2014-12-09 15:25:27 +00:00
|
|
|
|
|
|
|
%build
|
2017-07-17 05:03:01 +00:00
|
|
|
%python_build
|
2014-12-09 15:25:27 +00:00
|
|
|
|
|
|
|
%install
|
2020-08-11 07:24:43 +00:00
|
|
|
%if !%{with test}
|
2017-07-17 05:03:01 +00:00
|
|
|
%python_install
|
2018-05-31 02:10:24 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2020-08-11 07:24:43 +00:00
|
|
|
%endif
|
2017-07-17 05:03:01 +00:00
|
|
|
|
|
|
|
%check
|
2020-08-11 07:24:43 +00:00
|
|
|
%if %{with test}
|
2019-03-26 11:39:34 +00:00
|
|
|
%pytest tests
|
2020-08-11 07:24:43 +00:00
|
|
|
%endif
|
2014-12-09 15:25:27 +00:00
|
|
|
|
2020-08-11 07:24:43 +00:00
|
|
|
%if !%{with test}
|
2017-07-17 05:03:01 +00:00
|
|
|
%files %{python_files}
|
2018-05-12 05:49:17 +00:00
|
|
|
%license LICENSE
|
|
|
|
%doc README.rst
|
2014-12-09 15:25:27 +00:00
|
|
|
%{python_sitelib}/*
|
2020-08-11 07:24:43 +00:00
|
|
|
%endif
|
2014-12-09 15:25:27 +00:00
|
|
|
|
|
|
|
%changelog
|