py-igraph: new package with version 0.10.6 (#39179)
This commit is contained in:
parent
0eb22ef770
commit
a72e5e762e
2 changed files with 64 additions and 1 deletions
|
@ -6,12 +6,47 @@
|
|||
from spack.package import *
|
||||
|
||||
|
||||
class Igraph(AutotoolsPackage):
|
||||
class Igraph(CMakePackage, AutotoolsPackage):
|
||||
"""igraph is a library for creating and manipulating graphs."""
|
||||
|
||||
homepage = "https://igraph.org/"
|
||||
url = "https://github.com/igraph/igraph/releases/download/0.7.1/igraph-0.7.1.tar.gz"
|
||||
|
||||
version("0.10.6", sha256="99bf91ee90febeeb9a201f3e0c1d323c09214f0b5f37a4290dc3b63f52839d6d")
|
||||
version("0.7.1", sha256="d978030e27369bf698f3816ab70aa9141e9baf81c56cc4f55efbe5489b46b0df")
|
||||
|
||||
variant("shared", default=False, description="Enable shared build")
|
||||
|
||||
build_system(
|
||||
conditional("cmake", when="@0.9:"), conditional("autotools", when="@:0.8"), default="cmake"
|
||||
)
|
||||
|
||||
with when("build_system=cmake"):
|
||||
depends_on("arpack-ng")
|
||||
depends_on("blas")
|
||||
depends_on("glpk+gmp@4.57:")
|
||||
depends_on("gmp")
|
||||
depends_on("lapack")
|
||||
|
||||
depends_on("libxml2")
|
||||
|
||||
def cmake_args(self):
|
||||
args = [
|
||||
"-DIGRAPH_ENABLE_LTO=AUTO",
|
||||
"-DIGRAPH_GLPK_SUPPORT=ON",
|
||||
"-DIGRAPH_GRAPHML_SUPPORT=ON",
|
||||
"-DIGRAPH_USE_INTERNAL_ARPACK=OFF",
|
||||
"-DIGRAPH_USE_INTERNAL_BLAS=OFF",
|
||||
"-DIGRAPH_USE_INTERNAL_GLPK=OFF",
|
||||
"-DIGRAPH_USE_INTERNAL_GMP=OFF",
|
||||
"-DIGRAPH_USE_INTERNAL_LAPACK=OFF",
|
||||
"-DIGRAPH_USE_INTERNAL_PLFIT=ON",
|
||||
"-DBLA_VENDOR=OpenBLAS",
|
||||
]
|
||||
|
||||
if "+shared" in self.spec:
|
||||
args.append("-DBUILD_SHARED_LIBS=ON")
|
||||
else:
|
||||
args.append("-DBUILD_SHARED_LIBS=OFF")
|
||||
|
||||
return args
|
||||
|
|
28
var/spack/repos/builtin/packages/py-igraph/package.py
Normal file
28
var/spack/repos/builtin/packages/py-igraph/package.py
Normal file
|
@ -0,0 +1,28 @@
|
|||
# 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 PyIgraph(PythonPackage):
|
||||
"""Python interface to the igraph high performance graph library,
|
||||
primarily aimed at complex network research and analysis."""
|
||||
|
||||
homepage = "https://github.com/igraph/python-igraph"
|
||||
pypi = "igraph/igraph-0.10.6.tar.gz"
|
||||
|
||||
version("0.10.6", sha256="76f7aad294514412f835366a7d9a9c1e7a34c3e6ef0a6c3a1a835234323228e8")
|
||||
|
||||
variant("matplotlib", default=False, description="Enable plotting with Matplotlib")
|
||||
|
||||
depends_on("cmake", type="build")
|
||||
depends_on("igraph+shared@0.10.6", when="@0.10.6")
|
||||
depends_on("pkgconfig", type="build")
|
||||
depends_on("py-setuptools", type="build")
|
||||
depends_on("py-texttable@1.6.2:", type=("build", "run"))
|
||||
depends_on("py-matplotlib@3.5", type="run", when="+matplotlib")
|
||||
|
||||
def setup_build_environment(self, env):
|
||||
env.set("IGRAPH_USE_PKG_CONFIG", "1")
|
Loading…
Reference in a new issue