forked from pool/python-cluster
67 lines
2.5 KiB
RPMSpec
67 lines
2.5 KiB
RPMSpec
|
#
|
|||
|
# spec file for package python-cluster
|
|||
|
#
|
|||
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
|||
|
#
|
|||
|
# 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.
|
|||
|
|
|||
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|||
|
|
|||
|
|
|||
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|||
|
Name: python-cluster
|
|||
|
Version: 1.4.1
|
|||
|
Release: 0
|
|||
|
License: LGPL-2.0+
|
|||
|
Summary: Clustering library for python
|
|||
|
Url: https://github.com/exhuma/python-cluster
|
|||
|
Group: Development/Languages/Python
|
|||
|
Source: https://files.pythonhosted.org/packages/py2.py3/c/cluster/cluster-%{version}-py2.py3-none-any.whl
|
|||
|
Source10: https://raw.githubusercontent.com/exhuma/python-cluster/v%{version}/LICENSE
|
|||
|
BuildRequires: %{python_module devel}
|
|||
|
BuildRequires: %{python_module pip}
|
|||
|
BuildRequires: fdupes
|
|||
|
BuildRequires: python-rpm-macros
|
|||
|
Requires: python-numpy >= 1.2
|
|||
|
Requires: python-scipy >= 0.12
|
|||
|
Requires: python-matplotlib >= 1.2
|
|||
|
BuildArch: noarch
|
|||
|
|
|||
|
%python_subpackages
|
|||
|
|
|||
|
%description
|
|||
|
The python-cluster package allows you to create several groups
|
|||
|
(clusters) of objects from a list. It’s meant to be flexible and able
|
|||
|
to cluster any object. To ensure this kind of flexibility, you need
|
|||
|
not only to supply the list of objects, but also a function that
|
|||
|
calculates the similarity between two of those objects. For simple
|
|||
|
datatypes, like integers, this can be as simple as a subtraction, but
|
|||
|
more complex calculations are possible. Right now, it is possible to
|
|||
|
generate the clusters using a hierarchical clustering and the popular
|
|||
|
K-Means algorithm. For the hierarchical algorithm there are different
|
|||
|
“linkage” (single, complete, average and uclus) methods available.
|
|||
|
|
|||
|
%prep
|
|||
|
%setup -c -T
|
|||
|
cp %{SOURCE10} .
|
|||
|
|
|||
|
%build
|
|||
|
# Not Needed
|
|||
|
|
|||
|
%install
|
|||
|
%python_expand pip%{$python_bin_suffix} install --root=%{buildroot} %{SOURCE0}
|
|||
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|||
|
|
|||
|
%files %{python_files}
|
|||
|
%license LICENSE
|
|||
|
%{python_sitelib}/*
|
|||
|
|
|||
|
%changelog
|