summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/apfel/package.py
blob: b76169d29fa294e763dc7cf53cf3bf03536b80f8 (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
32
33
34
35
36
37
38
39
40
# 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 Apfel(AutotoolsPackage):
    """APFEL is a library able to perform DGLAP evolution up to NNLO in QCD and
    to NLO in QED, both with pole and MSbar masses. The coupled DGLAP
    QCD+QED evolution equations are solved in x-space by means of higher
    order interpolations and Runge-Kutta techniques."""

    homepage = "https://github.com/scarrazza/apfel"
    url = "https://github.com/scarrazza/apfel/archive/3.0.4.tar.gz"

    tags = ["hep"]

    license("GPL-3.0-or-later")

    version("3.0.6", sha256="7063c9eee457e030b97926ac166cdaedd84625b31397e1dfd01ae47371fb9f61")
    version("3.0.4", sha256="c7bfae7fe2dc0185981850f2fe6ae4842749339d064c25bf525b4ef412bbb224")

    depends_on("swig", when="+python")
    depends_on("python", type=("build", "run"))
    depends_on("lhapdf", when="+lhapdf", type=("build", "run"))

    variant("python", description="Build python wrapper", default=False)
    variant("lhapdf", description="Link to LHAPDF", default=False)

    def configure_args(self):
        args = []
        if self.spec.satisfies("~python"):
            args.append("--disable-pywrap")
        else:
            args.append("--enable-pywrap")

        args += self.enable_or_disable("lhapdf")
        return args