Skip to content

Commit 17a4ac8

Browse files
author
Pierre Duperray
committed
linting
1 parent 9a50394 commit 17a4ac8

17 files changed

Lines changed: 420 additions & 283 deletions

File tree

spack_repo/lihpc/meshing/packages/gmds/package.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
# CEA/DAM/DSSI, 2020
66
##############################################################################
77

8-
from spack.package import *
98
from spack_repo.builtin.build_systems.cmake import CMakePackage
109

10+
from spack.package import *
11+
1112

1213
class Gmds(CMakePackage):
1314
"""GMDS: Generic Mesh Data and Services."""

spack_repo/lihpc/meshing/packages/guitoolkitsvariables/package.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,19 @@
33
#
44
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
55

6-
from spack.package import *
76
from spack_repo.builtin.build_systems.cmake import CMakePackage
87

8+
from spack.package import *
9+
910

1011
class Guitoolkitsvariables(CMakePackage):
1112
"""Common cmake files used by projects of the magix3d ecosystem."""
1213

1314
homepage = "https://github.com/LIHPC-Computational-Geometry/guitoolkitsvariables"
14-
url = ("https://github.com/LIHPC-Computational-Geometry/"
15-
"guitoolkitsvariables/archive/refs/tags/0.0.0.tar.gz")
15+
url = (
16+
"https://github.com/LIHPC-Computational-Geometry/"
17+
"guitoolkitsvariables/archive/refs/tags/0.0.0.tar.gz"
18+
)
1619
git = "https://github.com/LIHPC-Computational-Geometry/guitoolkitsvariables.git"
1720
maintainers = ["meshing_team"]
1821

spack_repo/lihpc/meshing/packages/lima/package.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# -*- coding: utf-8 -*-
22
# From version 7.11.0 writing support for the mli format is no longer provided.
33

4-
from spack.package import *
54
from spack_repo.builtin.build_systems.cmake import CMakePackage
65

6+
from spack.package import *
7+
78

89
class Lima(CMakePackage):
910
"""Logiciel Interface MAillage"""
@@ -28,31 +29,31 @@ class Lima(CMakePackage):
2829
variant(
2930
"xlmlima",
3031
default=True,
31-
description="Build xlmlima tool (converts and prepares meshes for non-regression tests)"
32+
description="Build xlmlima tool (converts and prepares meshes for non-regression tests)",
3233
)
3334
variant(
3435
"mli2",
3536
default=True,
36-
description="Build Lima with mli2 format support (requires HDF5 >=1.10.0)"
37+
description="Build Lima with mli2 format support (requires HDF5 >=1.10.0)",
3738
)
3839
variant(
3940
"machinetypes",
4041
default=True,
41-
description="Build Lima MachineTypes API (shareable numeric types definitions)"
42+
description="Build Lima MachineTypes API (shareable numeric types definitions)",
4243
)
4344
variant("i4", default=False, description="int_type=int32 instead of int64")
4445
variant("r4", default=False, description="real=float instead of double")
4546
variant(
4647
"tests",
4748
default=True,
48-
description="Builds the mesh comparison tool (necessary for non-regression tests)"
49+
description="Builds the mesh comparison tool (necessary for non-regression tests)",
4950
)
5051
# disable_mli_warning=True for non regression testing,
5152
# false otherwise (blue warning message when obsolete mli format is used)
5253
variant(
5354
"disable_mli_warning",
5455
default=False,
55-
description="Disables warning messages displayed when reading or writing an mli file"
56+
description="Disables warning messages displayed when reading or writing an mli file",
5657
)
5758

5859
patch("cmake.patch", when="@7.4.3")
@@ -93,7 +94,7 @@ def cmake_args(self):
9394
self.define_from_variant("BUILD_TESTS", "tests"),
9495
self.define_from_variant("DISABLE_MLI_WARNING", "disable_mli_warning"),
9596
self.define_from_variant("FORMAT_MLI2", "mli2"),
96-
self.define_from_variant("MACHINE_TYPES", "machinetypes")
97+
self.define_from_variant("MACHINE_TYPES", "machinetypes"),
9798
]
9899

99100
args.append(self.define("MACHINE_TYPES", False))
@@ -117,7 +118,7 @@ def cmake_args(self):
117118
# find_package(Python) under cmake_minimum_required < 3.15 (CMP0094)
118119
self.define("Python_EXECUTABLE", py.command.path),
119120
# find_package(Python2/3) under cmake_minimum_required < 3.15 (CMP0094)
120-
self.define("Python{}_EXECUTABLE".format(py.version[0]), py.command.path)
121+
self.define("Python{}_EXECUTABLE".format(py.version[0]), py.command.path),
121122
]
122123
)
123124

spack_repo/lihpc/meshing/packages/machine_types/package.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,19 @@
44
#
55
##############################################################################
66

7-
from spack.package import *
87
from spack_repo.builtin.build_systems.cmake import CMakePackage
98

9+
from spack.package import *
10+
1011

1112
class MachineTypes(CMakePackage):
1213
"""Simple C numeric types definitions"""
1314

1415
homepage = "https://github.com/LIHPC-Computational-Geometry/machine-types"
15-
url = ("https://github.com/LIHPC-Computational-Geometry/"
16-
"machine-types/archive/refs/tags/0.0.0.tar.gz")
16+
url = (
17+
"https://github.com/LIHPC-Computational-Geometry/"
18+
"machine-types/archive/refs/tags/0.0.0.tar.gz"
19+
)
1720
git = "https://github.com/LIHPC-Computational-Geometry/machine-types.git"
1821

1922
version("2.0.1", sha256="c961e25f883cf1f48f3cbace1d4263292014f5fe863854f7094f745792e94a9c")

spack_repo/lihpc/meshing/packages/magix3d/package.py

Lines changed: 35 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# -*- coding: utf-8 -*-
22

3-
from spack.package import *
43
import os
4+
55
from spack_repo.builtin.build_systems.cmake import CMakePackage
66

7+
from spack.package import *
8+
79

810
class Magix3d(CMakePackage):
911
"""Mailleur 3D"""
@@ -18,9 +20,9 @@ class Magix3d(CMakePackage):
1820
variant("sepa3d", default=False, description="Outil de separatrices 3D")
1921
variant("smooth3d", default=False, description="Bibliotheque de lissage volumique Smooth3D")
2022
variant("triton2", default=True, description="Mailleur tetraedrique Tetgen")
21-
variant("pythonaddon",
22-
default=False,
23-
description="Additional python modules to enrich PYTHONPATH")
23+
variant(
24+
"pythonaddon", default=False, description="Additional python modules to enrich PYTHONPATH"
25+
)
2426
variant("doc", default=False, description="Installation de la documentation utilisateur")
2527

2628
version("2.7.0", sha256="362ac988f8d00e504d7a32f0dbc8e347a9625c344cc06aa24074ff4173442c8b")
@@ -100,7 +102,7 @@ class Magix3d(CMakePackage):
100102

101103
# setup PYTHON_PATH for documentation
102104
def setup_build_environment(self, env):
103-
if ("+doc" in self.spec.variants):
105+
if "+doc" in self.spec.variants:
104106
python_version = str(self.spec["python"].version).split(".")
105107
python_dir = "python" + python_version[0] + "." + python_version[1]
106108

@@ -109,8 +111,9 @@ def setup_build_environment(self, env):
109111
env.prepend_path("PYTHONPATH", sphinx_pythonpath)
110112

111113
def cmake_args(self):
112-
return self.fill_cmake_args(False, "undefined", "undefined",
113-
"undefined", "unavailable", "undefined", "undefined")
114+
return self.fill_cmake_args(
115+
False, "undefined", "undefined", "undefined", "unavailable", "undefined", "undefined"
116+
)
114117

115118
def fill_cmake_args(self, batch, t_ext, erd_ext, team, dkoc_lic, url_wiki, url_doc_qualif):
116119
args = []
@@ -120,7 +123,7 @@ def fill_cmake_args(self, batch, t_ext, erd_ext, team, dkoc_lic, url_wiki, url_d
120123
# On installe => mode production pour les scripts fixant l"environnement python d"execution
121124
args.append("-DPRODUCTION:BOOL=ON")
122125
if self.spec.satisfies("%intel"):
123-
args.append("-DCMAKE_CXX_FLAGS=\"-std=c++11\"")
126+
args.append('-DCMAKE_CXX_FLAGS="-std=c++11"')
124127

125128
args.append(self.define_from_variant("DKOC", "dkoc"))
126129
args.append(self.define_from_variant("MDLPARSER", "mdlparser"))
@@ -140,23 +143,38 @@ def fill_cmake_args(self, batch, t_ext, erd_ext, team, dkoc_lic, url_wiki, url_d
140143
args.append(self.define("BUILD_MAGIX3D", True))
141144
args.append(self.define("BUILD_MAGIX3DBATCH", batch))
142145

143-
if ("+doc" in self.spec.variants):
146+
if "+doc" in self.spec.variants:
144147
args.append("-DSPHINX_WARNINGS_AS_ERRORS=OFF")
145148

146149
# only py-numpy py-matplotlib py-scipy are necessary
147150
# the rest are here because we are not in an environment
148151
if "+pythonaddon" in self.spec:
149152
python_version = self.spec["python"].version.up_to(2)
150-
py_depends = ["py-numpy", "py-matplotlib", "py-scipy",
151-
"py-cycler", "py-kiwisolver",
152-
"py-pillow", "py-pyparsing", "py-python-dateutil",
153-
"py-pytz", "py-setuptools", "py-setuptools-scm",
154-
"py-six", "py-packaging"]
153+
py_depends = [
154+
"py-numpy",
155+
"py-matplotlib",
156+
"py-scipy",
157+
"py-cycler",
158+
"py-kiwisolver",
159+
"py-pillow",
160+
"py-pyparsing",
161+
"py-python-dateutil",
162+
"py-pytz",
163+
"py-setuptools",
164+
"py-setuptools-scm",
165+
"py-six",
166+
"py-packaging",
167+
]
155168
python_path = []
156169
for py_dep in py_depends:
157-
python_path.append(os.path.join(self.spec[py_dep].prefix, "lib",
158-
"python" + str(python_version),
159-
"site-packages"))
170+
python_path.append(
171+
os.path.join(
172+
self.spec[py_dep].prefix,
173+
"lib",
174+
"python" + str(python_version),
175+
"site-packages",
176+
)
177+
)
160178
args.append("-DADDPYTHONPACKAGES=" + ":".join(python_path) + ":")
161179

162180
return args

spack_repo/lihpc/meshing/packages/preferences/package.py

Lines changed: 37 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,19 @@
55
# CEA/DAM/DSSI, 2020
66
##############################################################################
77

8-
from spack.package import *
98
from spack_repo.builtin.build_systems.cmake import CMakePackage
109

10+
from spack.package import *
11+
1112

1213
class Preferences(CMakePackage):
1314
"""Bibliotheque d'utilitaires de preferences utilisateur reposant sur XercesC et Qt"""
1415

1516
homepage = "https://github.com/LIHPC-Computational-Geometry/preferences"
16-
url = ("https://github.com/LIHPC-Computational-Geometry/"
17-
"preferences/archive/refs/tags/0.0.0.tar.gz")
17+
url = (
18+
"https://github.com/LIHPC-Computational-Geometry/"
19+
"preferences/archive/refs/tags/0.0.0.tar.gz"
20+
)
1821
git = "https://github.com/LIHPC-Computational-Geometry/preferences.git"
1922

2023
maintainers = ["meshing_team"]
@@ -34,24 +37,36 @@ class Preferences(CMakePackage):
3437
version("6.2.0", sha256="f7e7fe9ad7f7c5578e1bfbfd3318a04e15e6891459559f8d8971279701b0d458")
3538
version("5.6.2", sha256="f734cc05483303b5e5168da55537e212037108360c0981ae3816d034ac3214fc")
3639
# versions below are deprecated as sources are in the infinite void of space
37-
version("5.5.7",
38-
sha256="09600a039e8458993eecaa8d7a6a8396f910caeddb3aecb4a7873d1cbaea31ae",
39-
deprecated=True)
40-
version("5.5.3",
41-
sha256="9077607e1ed81d83ea675112f1be6e6d82b314a7756eef67da85cee9dad7642f",
42-
deprecated=True)
43-
version("5.5.2",
44-
sha256="7f5544912c4b1044e398b5dc06ad21b5c918b461166ddc407e07396befb34137",
45-
deprecated=True)
46-
version("5.1.0",
47-
sha256="8add5bcdd2ff0e70cfca49f00c4b848e771da4295143638e4978d0563050c0ed",
48-
deprecated=True)
49-
version("5.0.2",
50-
sha256="2baa60b1d249c0af491a883f3fe4acd1d98a778136fef7713bbf69d83dc5c982",
51-
deprecated=True)
52-
version("5.0.0",
53-
sha256="15a19af6009da3e9365684007cab7fa138d6040b01e365b0d2a8b2a0064d08e3",
54-
deprecated=True)
40+
version(
41+
"5.5.7",
42+
sha256="09600a039e8458993eecaa8d7a6a8396f910caeddb3aecb4a7873d1cbaea31ae",
43+
deprecated=True,
44+
)
45+
version(
46+
"5.5.3",
47+
sha256="9077607e1ed81d83ea675112f1be6e6d82b314a7756eef67da85cee9dad7642f",
48+
deprecated=True,
49+
)
50+
version(
51+
"5.5.2",
52+
sha256="7f5544912c4b1044e398b5dc06ad21b5c918b461166ddc407e07396befb34137",
53+
deprecated=True,
54+
)
55+
version(
56+
"5.1.0",
57+
sha256="8add5bcdd2ff0e70cfca49f00c4b848e771da4295143638e4978d0563050c0ed",
58+
deprecated=True,
59+
)
60+
version(
61+
"5.0.2",
62+
sha256="2baa60b1d249c0af491a883f3fe4acd1d98a778136fef7713bbf69d83dc5c982",
63+
deprecated=True,
64+
)
65+
version(
66+
"5.0.0",
67+
sha256="15a19af6009da3e9365684007cab7fa138d6040b01e365b0d2a8b2a0064d08e3",
68+
deprecated=True,
69+
)
5570

5671
depends_on("cxx", type="build") # generated
5772

@@ -61,6 +76,6 @@ def cmake_args(self):
6176
args = []
6277
args.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared"))
6378
if self.spec.satisfies("%intel"):
64-
args.append("-DCMAKE_CXX_FLAGS=\"-std=c++11\"")
79+
args.append('-DCMAKE_CXX_FLAGS="-std=c++11"')
6580

6681
return args

spack_repo/lihpc/meshing/packages/pythonutil/package.py

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
# -*- coding: utf-8 -*-
22
##############################################################################
33

4-
from spack.package import *
54
from spack_repo.builtin.build_systems.cmake import CMakePackage
65

6+
from spack.package import *
7+
78

89
class Pythonutil(CMakePackage):
910
"""Utilitaires python-cpp."""
1011

1112
homepage = "https://github.com/LIHPC-Computational-Geometry/pythonutil"
12-
url = ("https://github.com/LIHPC-Computational-Geometry/"
13-
"pythonutil/archive/refs/tags/0.0.0.tar.gz")
13+
url = (
14+
"https://github.com/LIHPC-Computational-Geometry/"
15+
"pythonutil/archive/refs/tags/0.0.0.tar.gz"
16+
)
1417
git = "https://github.com/LIHPC-Computational-Geometry/pythonutil.git"
1518
maintainers = ["meshing_team"]
1619

@@ -37,13 +40,15 @@ def cmake_args(self):
3740

3841
# Fix cmake taking python3 even if `which python` is python2
3942
py = self.spec["python"]
40-
args.extend([
41-
# find_package(PythonInterp) # Deprecated, but used by pybind11
42-
self.define("PYTHON_EXECUTABLE", py.command.path),
43-
# find_package(Python) under cmake_minimum_required < 3.15 (CMP0094)
44-
self.define("Python_EXECUTABLE", py.command.path),
45-
# find_package(Python2/3) under cmake_minimum_required < 3.15 (CMP0094)
46-
self.define("Python{}_EXECUTABLE".format(py.version[0]), py.command.path),
47-
])
43+
args.extend(
44+
[
45+
# find_package(PythonInterp) # Deprecated, but used by pybind11
46+
self.define("PYTHON_EXECUTABLE", py.command.path),
47+
# find_package(Python) under cmake_minimum_required < 3.15 (CMP0094)
48+
self.define("Python_EXECUTABLE", py.command.path),
49+
# find_package(Python2/3) under cmake_minimum_required < 3.15 (CMP0094)
50+
self.define("Python{}_EXECUTABLE".format(py.version[0]), py.command.path),
51+
]
52+
)
4853

4954
return args

0 commit comments

Comments
 (0)