
* Bump the package API of the `builtin` repo to `v2.0` * Move `var/spack/repos/builtin` -> `var/spack/repos/spack_repo/builtin` * Move test repos `var/spack/repos/{builtin.mock,tutorial,...}` -> `var/spack/test_repos/` * Update package dir names to v2 format (`-` -> `_` etc) * Change absolute imports `from spack.pkg.builtin.my_pkg ...` to relative imports `from ..my_pkg.package ...` Users who have a repo on top of builtin should change imports from ```python from spack.pkg.builtin.my_pkg import MyPkg ``` to ```python from spack_repo.builtin.packages.my_pkg.package import MyPkg ``` and can configure their editors with ``` PYTHONPATH=$spack/lib/spack:$spack/var/spack/repos ``` [skip-verify-checksums]
39 lines
1.4 KiB
Python
39 lines
1.4 KiB
Python
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
|
#
|
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
|
|
from spack.package import *
|
|
|
|
|
|
class Ensmallen(CMakePackage):
|
|
"""ensmallen is a high-quality C++ library for non-linear numerical
|
|
optimization.
|
|
|
|
ensmallen provides many types of optimizers that can be used for
|
|
virtually any numerical optimization task. This includes gradient
|
|
descent techniques, gradient-free optimizers, and constrained
|
|
optimization. ensmallen also allows optional callbacks to customize
|
|
the optimization process."""
|
|
|
|
homepage = "https://ensmallen.org"
|
|
url = "https://github.com/mlpack/ensmallen/archive/refs/tags/2.19.1.tar.gz"
|
|
|
|
license("BSD-3-Clause")
|
|
|
|
version("2.22.1", sha256="daf53fe96783043ca33151a3851d054a826fab8d9a173e6bcbbedd4a7eabf5b1")
|
|
version("2.21.1", sha256="820eee4d8aa32662ff6a7d883a1bcaf4e9bf9ca0a3171d94c5398fe745008750")
|
|
version("2.19.1", sha256="f36ad7f08b0688d2a8152e1c73dd437c56ed7a5af5facf65db6ffd977b275b2e")
|
|
|
|
variant("openmp", default=True, description="Use OpenMP for parallelization")
|
|
|
|
depends_on("c", type="build")
|
|
depends_on("cxx", type="build")
|
|
|
|
depends_on("cmake@3.3.2:")
|
|
depends_on("armadillo@9.800.0:")
|
|
depends_on("armadillo@10.8.2:", when="@2.22:")
|
|
|
|
def cmake_args(self):
|
|
args = [self.define_from_variant("USE_OPENMP", "openmp")]
|
|
return args
|