Skip to content

Commit 0b12717

Browse files
committed
style:: replace 'by "
add package for feelpp #4
1 parent 0fcf562 commit 0b12717

File tree

1 file changed

+63
-64
lines changed

1 file changed

+63
-64
lines changed

var/spack/repos/builtin/packages/feelpp/package.py

Lines changed: 63 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -14,97 +14,96 @@ class Feelpp(CMakePackage):
1414
the development of applications.
1515
"""
1616

17-
1817
homepage = "https://docs.feelpp.org"
19-
url = "https://github.com/feelpp/feelpp/archive/v0.110.2.tar.gz"
20-
git = "https://github.com/feelpp/feelpp.git"
18+
url = "https://github.com/feelpp/feelpp/archive/v0.110.2.tar.gz"
19+
git = "https://github.com/feelpp/feelpp.git"
2120

2221
license("LGPL-3.0-or-later AND GPL-3.0-or-later")
2322
maintainers( "prudhomm", "vincentchabannes" )
2423

25-
version('develop', branch='develop')
26-
version('preset', branch='2284-add-spack-environment-to-the-main-ci')
24+
version("develop", branch="develop")
25+
version("preset", branch="2284-add-spack-environment-to-the-main-ci")
2726

2827
# Define variants
29-
variant('toolboxes', default=False, description="Enable the Feel++ toolboxes")
30-
variant('mor', default=False, description="Enable Model Order Reduction (MOR)")
31-
variant('python', default=False, description="Enable Python wrappers")
32-
variant('quickstart', default=False, description="Enable the quickstart examples")
33-
variant('tests', default=False, description="Enable the tests")
28+
variant("toolboxes", default=False, description="Enable the Feel++ toolboxes")
29+
variant("mor", default=False, description="Enable Model Order Reduction (MOR)")
30+
variant("python", default=False, description="Enable Python wrappers")
31+
variant("quickstart", default=False, description="Enable the quickstart examples")
32+
variant("tests", default=False, description="Enable the tests")
3433

3534
# Add variants for C++ standards
36-
variant('cpp17', default=False, description="Use C++17 standard")
37-
variant('cpp20', default=True, description="Use C++20 standard")
38-
variant('cpp23', default=False, description="Use C++23 standard")
35+
variant("cpp17", default=False, description="Use C++17 standard")
36+
variant("cpp20", default=True, description="Use C++20 standard")
37+
variant("cpp23", default=False, description="Use C++23 standard")
3938

4039
# Define conflicts between the C++ standard variants
41-
conflicts('+cpp17', when='+cpp20', msg="Cannot enable both C++17 and C++20")
42-
conflicts('+cpp17', when='+cpp23', msg="Cannot enable both C++17 and C++23")
43-
conflicts('+cpp20', when='+cpp23', msg="Cannot enable both C++20 and C++23")
40+
conflicts("+cpp17", when="+cpp20", msg="Cannot enable both C++17 and C++20")
41+
conflicts("+cpp17", when="+cpp23", msg="Cannot enable both C++17 and C++23")
42+
conflicts("+cpp20", when="+cpp23", msg="Cannot enable both C++20 and C++23")
4443

4544

4645
# Specify dependencies with the required versions
47-
depends_on('[email protected]:', type='build') # Require CMake > 3.21
48-
depends_on('[email protected]: +regex+date_time+filesystem+iostreams+mpi+multithreaded+program_options+serialization+shared+system+test')
49-
depends_on('[email protected] +mumps+hwloc+ptscotch +suite-sparse+hdf5 +hypre+kokkos')
50-
depends_on('llvm@18:',type='build') # Require LLVM (Clang) version 18 or higher
51-
depends_on('slepc')
52-
depends_on('mpi')
53-
depends_on('[email protected]')
54-
depends_on('fftw')
55-
depends_on('libunwind')
56-
depends_on('libzip')
57-
depends_on('bison')
58-
depends_on('flex')
59-
depends_on('pugixml')
60-
depends_on('gsl')
61-
depends_on('glpk')
62-
depends_on('gl2ps')
63-
depends_on('ruby')
64-
depends_on('gmsh +opencascade+mmg+fltk')
65-
depends_on('ruby')
66-
depends_on('curl')
46+
depends_on("[email protected]:", type="build") # Require CMake > 3.21
47+
depends_on("[email protected]: +regex+date_time+filesystem+iostreams+mpi+multithreaded+program_options+serialization+shared+system+test")
48+
depends_on("[email protected] +mumps+hwloc+ptscotch +suite-sparse+hdf5 +hypre+kokkos")
49+
depends_on("llvm@18:",type="build") # Require LLVM (Clang) version 18 or higher
50+
depends_on("slepc")
51+
depends_on("mpi")
52+
depends_on("[email protected]")
53+
depends_on("fftw")
54+
depends_on("libunwind")
55+
depends_on("libzip")
56+
depends_on("bison")
57+
depends_on("flex")
58+
depends_on("pugixml")
59+
depends_on("gsl")
60+
depends_on("glpk")
61+
depends_on("gl2ps")
62+
depends_on("ruby")
63+
depends_on("gmsh +opencascade+mmg+fltk")
64+
depends_on("ruby")
65+
depends_on("curl")
6766

6867

6968

7069

7170
# Python dependencies if +python variant is enabled
72-
depends_on('py-pytest', when='+python')
73-
depends_on('py-pandas', when='+python')
74-
depends_on('py-petsc4py', when='+python')
75-
depends_on('py-slepc4py', when='+python')
76-
depends_on('py-numpy', when='+python')
77-
depends_on('py-pybind11', when='+python')
78-
depends_on('py-sympy', when='+python')
79-
depends_on('py-plotly', when='+python')
80-
depends_on('py-scipy', when='+python')
81-
depends_on('py-tabulate', when='+python')
82-
depends_on('py-ipykernel', when='+python')
83-
depends_on('py-mpi4py', when='+python')
84-
depends_on('[email protected]:', when='+python', type=('build', 'run'))
71+
depends_on("py-pytest", when="+python")
72+
depends_on("py-pandas", when="+python")
73+
depends_on("py-petsc4py", when="+python")
74+
depends_on("py-slepc4py", when="+python")
75+
depends_on("py-numpy", when="+python")
76+
depends_on("py-pybind11", when="+python")
77+
depends_on("py-sympy", when="+python")
78+
depends_on("py-plotly", when="+python")
79+
depends_on("py-scipy", when="+python")
80+
depends_on("py-tabulate", when="+python")
81+
depends_on("py-ipykernel", when="+python")
82+
depends_on("py-mpi4py", when="+python")
83+
depends_on("[email protected]:", when="+python", type=("build", "run"))
8584

8685
def get_cpp_version(self):
8786
"""Helper function to determine the C++ standard preset."""
88-
if '+cpp17' in self.spec:
89-
return 'cpp17'
90-
elif '+cpp20' in self.spec:
91-
return 'cpp20'
92-
elif '+cpp23' in self.spec:
93-
return 'cpp17'
87+
if "+cpp17" in self.spec:
88+
return "cpp17"
89+
elif "+cpp20" in self.spec:
90+
return "cpp20"
91+
elif "+cpp23" in self.spec:
92+
return "cpp17"
9493
else:
95-
return 'cpp20' # default
94+
return "cpp20" # default
9695

9796
def get_preset_name(self):
9897
cpp_version = self.get_cpp_version()
99-
preset_name = f'feelpp-clang-{cpp_version}-default-release'
98+
preset_name = f"feelpp-clang-{cpp_version}-default-release"
10099
return preset_name
101100

102101
def cmake_args(self):
103102
"""Define the CMake preset and CMake options based on variants"""
104103

105104
# Add options based on the variants
106105
args = [
107-
f'--preset={self.get_preset_name()}',
106+
f"--preset={self.get_preset_name()}",
108107
self.define_from_variant("FEELPP_ENABLE_QUICKSTART", "quickstart"),
109108
self.define_from_variant("FEELPP_ENABLE_TESTS", "tests"),
110109
self.define_from_variant("FEELPP_ENABLE_TOOLBOXES", "toolboxes"),
@@ -115,17 +114,17 @@ def cmake_args(self):
115114

116115
def build(self, spec, prefix):
117116
"""Override the default build command to use CMake presets."""
118-
cmake = which('cmake')
117+
cmake = which("cmake")
119118

120-
cmake('--build', '--preset', self.get_preset_name())
119+
cmake("--build", "--preset", self.get_preset_name())
121120

122121

123122
def install(self, spec, prefix):
124123
"""Override the default install command to use CMake presets."""
125-
cmake = which('cmake')
126-
cmake('--build', '--preset', self.get_preset_name(), '-t', 'install')
124+
cmake = which("cmake")
125+
cmake("--build", "--preset", self.get_preset_name(), "-t", "install")
127126

128127
def test(self, spec, prefix):
129128
"""Override the default test command to use CMake presets."""
130-
ctest = which('ctest')
131-
ctest('--preset', self.get_preset_name(), '-R', 'qs_laplacian')
129+
ctest = which("ctest")
130+
ctest("--preset", self.get_preset_name(), "-R", "qs_laplacian")

0 commit comments

Comments
 (0)