summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/py-seriate/package.py
blob: 0c357261ea9f0d13e81cbdfa3918a23308743b8d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)


from spack.package import *


class PySeriate(PythonPackage):
    """This is a Python implementation of Seriation
    algorithm. Seriation is an approach for ordering elements in a set
    so that the sum of the sequential pairwise distances is
    minimal. We state this task as a Travelling Salesman Problem (TSP)
    and leverage the powerful Google's or-tools to do
    heavy-lifting. Since TSP is NP-hard, it is not possible to
    calculate the precise solution for a big number of
    elements. However, the or-tools' heuristics work very well in
    practice, and they are used in e.g. Google Maps."""

    homepage = "https://github.com/src-d/seriate"
    url = "https://github.com/src-d/seriate/archive/1.1.2.tar.gz"

    license("Apache-2.0")

    version("1.1.2", sha256="5e031e865398fbe24aebdbb4a2e0015447aec50478830850f29d38660fd266e3")

    depends_on("py-setuptools", type="build")
    depends_on("py-numpy@1.0:", type=("build", "run"))
    depends_on("py-packaging@16.0:", type=("build", "run"))
    depends_on("py-or-tools", type=("build", "run"))