Advertisement
Guest User

Heyoka spack package.py

a guest
Dec 15th, 2023
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 4.10 KB | None | 0 0
  1. # Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
  2. # Spack Project Developers. See the top-level COPYRIGHT file for details.
  3. #
  4. # SPDX-License-Identifier: (Apache-2.0 OR MIT)
  5.  
  6. # ----------------------------------------------------------------------------
  7. # If you submit this package back to Spack as a pull request,
  8. # please first remove this boilerplate and all FIXME comments.
  9. #
  10. # This is a template package file for Spack.  We've put "FIXME"
  11. # next to all the things you'll want to change. Once you've handled
  12. # them, you can save this file and test your package like this:
  13. #
  14. #     spack install heyoka
  15. #
  16. # You can edit this file again by typing:
  17. #
  18. #     spack edit heyoka
  19. #
  20. # See the Spack documentation for more information on packaging.
  21. # ----------------------------------------------------------------------------
  22.  
  23. from spack.package import *
  24.  
  25.  
  26. class Heyoka(CMakePackage):
  27.     """heyoka is a C++ library for integration of ODEs via Taylor’s method"""
  28.  
  29.     homepage = "https://bluescarni.github.io/heyoka"
  30.     url = "https://github.com/bluescarni/heyoka/archive/refs/tags/v3.2.0.tar.gz"
  31.  
  32.     # A list of GitHub accounts to notify when the package is updated.
  33.     maintainers("bluescarni")
  34.  
  35.     # SPDX identifier of the project's license.
  36.     license("MPL-2.0")
  37.  
  38.     version("3.2.0", sha256="37db24fbaf0e65d740ffb20f76ac1c8ab9fbd6893dc87dfd483c965b71dbf465")
  39.     version("3.1.0", sha256="7eecab47f44a9fff022cf24f226763dab8b075a9fdaa543a42f64bb2634b3ad8")
  40.     version("3.0.0", sha256="03ccb6fb015ad43877781763c0f2f49bd6db64c8b9493174e589c970ef00d7f2")
  41.     version("2.0.0", sha256="418ce55557496d3ff1383e8b64663661d9b6a5f39dc7080e401d6537db0c4cd2")
  42.     version("1.0.0", sha256="96f2e049e0518c49dbe224fc268ab1ad80abeaa306e2fe7a30e2acffb79c04af")
  43.     version("0.21.0", sha256="16d22e99397139d25b2a0c418a654e9cba3684c7eb28933791526bb163f50f27")
  44.     version("0.20.1", sha256="7abd68d319dd2740ca8440d41602ceefb45809d6fadbbf31728c5cb003511f8c")
  45.     version("0.20.0", sha256="d6b4601ee28fc2dbb84c317bbe2619c776ce448f782c045a801dfa46b0d5e52c")
  46.     version("0.19.0", sha256="7a7634379233be778fd6b15090df287787cc429314ec521d0336cdc1ae26642a")
  47.     version("0.18.0", sha256="2a14a988d973d9a76424df05d38f89ae64f7a1e1c12131022e338fe2de2dcb94")
  48.  
  49.     # Define variants of the package
  50.     # FIXME: I couldn't find a spack package for mp++
  51.     # variant("mppp", default=False,
  52.     #         description="enable features relying on the mp++ library")
  53.     variant("sleef", default=False,
  54.             description="enable features relying on the SLEEF library")
  55.     variant("tests", default=False,
  56.             description="build the test suite")
  57.     variant("benchmarks", default=False,
  58.             description="build the benchmarking suite")
  59.     variant("tutorials", default=False,
  60.             description="build the tutorials")
  61.     variant("static", default=False,
  62.             description=("build heyoka as a static library, instead of a "
  63.                          "dynamic library"))
  64.     variant("ipo", default=False,
  65.             description=("enable link-time optimisations when building the "
  66.                          "heyoka library (requires compiler support)"))
  67.  
  68.     # Dependencies
  69.     # FIXME: Specify version requirements
  70.  
  71.     # Build dependencies
  72.     depends_on("cmake@3.18:", type="build")
  73.  
  74.     # Required dependencies
  75.     depends_on("llvm")
  76.     depends_on("boost +serialization")
  77.     depends_on("fmt")
  78.     depends_on("spdlog +fmt_external")
  79.     depends_on("intel-tbb")
  80.  
  81.     # Optional dependencies
  82.     # depends_on("mppp", when="+mppp")
  83.     depends_on("sleef", when="+sleef")
  84.  
  85.     def cmake_args(self):
  86.         args = [
  87.             self.define_from_variant("HEYOKA_WITH_SLEEF", "sleef"),
  88.             self.define_from_variant("HEYOKA_BUILD_TESTS", "tests"),
  89.             self.define_from_variant("HEYOKA_BUILD_BENCHMARKS", "benchmarks"),
  90.             self.define_from_variant("HEYOKA_BUILD_TUTORIALS", "tutorials"),
  91.             self.define_from_variant("HEYOKA_BUILD_STATIC_LIBRARY", "static"),
  92.             self.define_from_variant("HEYOKA_ENABLE_IPO", "ipo"),
  93.         ]
  94.         return args
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement