spack/var/spack/repos/spack_repo/builtin/packages/fides/package.py
Harmen Stoppels b932c14008
builtin: use api v2.0 and update dir structure (#49275)
* 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]
2025-05-06 12:05:44 +02:00

54 lines
2.0 KiB
Python

# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class Fides(CMakePackage):
"""A library that provides a schema for ADIOS2 streams."""
homepage = "https://gitlab.kitware.com/vtk/fides"
url = "https://gitlab.kitware.com/vtk/fides/-/archive/v1.0.0/fides-v1.0.0.tar.gz"
git = "https://gitlab.kitware.com/vtk/fides.git"
maintainers("caitlinross", "dpugmire")
version("master", branch="master")
version("1.2.0", sha256="12be939d75c765dab9241f9ed2b64af01cce2b10281de402f64fb685e6ccd7df")
version("1.1.0", sha256="40d2e08b8d5cfdfc809eae6ed2ae0731108ce3b1383485f4934a5ec8aaa9425e")
version("1.0.0", sha256="c355fdb4ca3790c1fa9a4491a0d294b8f883b6946c540ad9e5633c9fd8c8c3aa")
variant("mpi", default=True, description="build mpi support")
depends_on("c", type="build")
depends_on("cxx", type="build")
# Certain CMake versions have been found to break for our use cases
depends_on("cmake@3.14.1:3.14,3.18.2:", type="build")
depends_on("mpi", when="+mpi")
depends_on("adios2")
# adios2::Mode::ReadRandomAccess requires adios2 2.8.0.
# older adios2 supported in https://gitlab.kitware.com/vtk/fides/-/merge_requests/146
depends_on("adios2@2.8:", when="@1.2")
depends_on("adios2@2.7:2.8", when="@1.1")
depends_on("vtk-m@1.9:")
# vtk-m 2.0 has a breaking change in cmake target name
depends_on("vtk-m@:1.9", when="@:1.1")
# Fix missing implicit includes
@when("%gcc@7:")
def setup_build_environment(self, env: EnvironmentModifications) -> None:
env.append_flags("CXXFLAGS", "-include limits -include numeric")
def cmake_args(self):
spec = self.spec
options = [
self.define("VTKm_DIR", spec["vtk-m"].prefix),
self.define("ADIOS2_DIR", spec["adios2"].prefix),
self.define("FIDES_ENABLE_TESTING", "OFF"),
self.define("FIDES_ENABLE_EXAMPLES", "OFF"),
]
return options