Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ builtins = [
"bazel",
"cargo",
"cmake",
"cmake_cache_path",
"ctest",
"gem",
"glibtool",
Expand Down Expand Up @@ -264,7 +265,7 @@ skip-magic-trailing-comma = false

[tool.ruff.lint]
extend-select = ["I"]
ignore = ["E731", "E203", "F403", "F811"]
ignore = ["E731", "F403", "F811"]

[tool.ruff.lint.isort]
split-on-trailing-comma = false
Expand All @@ -280,10 +281,6 @@ section-order = [
[tool.ruff.lint.isort.sections]
spack = ["spack"]

[tool.ruff.lint.per-file-ignores]
"var/spack/*/package.py" = ["F403", "F405", "F811", "F821"]
"*-ci-package.py" = ["F403", "F405", "F821"]

[tool.black]
line-length = 99
include = "(repos/spack_repo|tests)/.*\\.pyi?$"
Expand Down
5 changes: 4 additions & 1 deletion repos/spack_repo/builtin/build_systems/aspell_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ class AspellBuilder(AutotoolsBuilder):
"""

def configure(
self, pkg: "AspellDictPackage", spec: Spec, prefix: Prefix # type: ignore[override]
self,
pkg: "AspellDictPackage",
spec: Spec,
prefix: Prefix, # type: ignore[override]
):
aspell = spec["aspell"].prefix.bin.aspell
prezip = spec["aspell"].prefix.bin.prezip
Expand Down
4 changes: 1 addition & 3 deletions repos/spack_repo/builtin/build_systems/lua.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,7 @@ def generate_luarocks_config(self, pkg: LuaPackage, spec: Spec, prefix: Prefix)
rocks_trees={{
{}
}}
""".format(
"\n".join(table_entries)
)
""".format("\n".join(table_entries))
)

def preprocess(self, pkg: LuaPackage, spec: Spec, prefix: Prefix) -> None:
Expand Down
3 changes: 1 addition & 2 deletions repos/spack_repo/builtin/packages/amg4psblas/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ class Amg4psblas(AutotoolsPackage):
variant(
"cuda",
default=False,
description="Activate CUDA support, requires a CUDA-capable psblas with right"
"cudacc flags",
description="Activate CUDA support, requires a CUDA-capable psblas with rightcudacc flags",
)
variant("openmp", default=False, description="Activate OpenMP support")
# Additional configure options
Expand Down
2 changes: 0 additions & 2 deletions repos/spack_repo/builtin/packages/castep/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ class Castep(CMakePackage, MakefilePackage):


class CMakeBuilder(cmake.CMakeBuilder):

@property
def build_targets(self):
spec = self.spec
Expand All @@ -108,7 +107,6 @@ def cmake_args(self):


class MakefileBuilder(makefile.MakefileBuilder):

def edit(self, pkg, spec, prefix):
if spec.satisfies("%gcc"):
if self.spec.satisfies("@21:21"):
Expand Down
2 changes: 1 addition & 1 deletion repos/spack_repo/builtin/packages/dbcsr/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class Dbcsr(CMakePackage, CudaPackage, ROCmPackage):
"gfx942",
"gfx950",
)
amd_msg = f"""DBCSR supports these AMD gpu targets: {', '.join(dbcsr_amdgpu_targets)}.
amd_msg = f"""DBCSR supports these AMD gpu targets: {", ".join(dbcsr_amdgpu_targets)}.
Set amdgpu_target explicitly to one of the supported targets"""

for arch in ROCmPackage.amdgpu_targets:
Expand Down
1 change: 0 additions & 1 deletion repos/spack_repo/builtin/packages/ed/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ class Ed(AutotoolsPackage, GNUMirrorPackage):
parallel = False

def configure_args(self):

args = []

args.append(f"CC={spack_cc}")
Expand Down
4 changes: 1 addition & 3 deletions repos/spack_repo/builtin/packages/fakexrandr/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ def edit(self, spec, prefix):
#define XRANDR_PATCH {2}
#define REAL_XRANDR_LIB "{3}"
#define FAKEXRANDR_INSTALL_DIR "{4}"
""".format(
version[0], version[1], version[2], spec["libxrandr"].libs[0], prefix.lib
)
""".format(version[0], version[1], version[2], spec["libxrandr"].libs[0], prefix.lib)
)

# Also need to hack Makefile
Expand Down
1 change: 0 additions & 1 deletion repos/spack_repo/builtin/packages/gsl/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ def force_autoreconf(self):
def configure_args(self):
configure_args = []
if self.spec.satisfies("+external-cblas"):

inc = self.spec["blas"].headers.include_flags
# openblas can install the headers into include/openblas which trips up the autoconf
if self.spec["blas"].name == "openblas":
Expand Down
3 changes: 2 additions & 1 deletion repos/spack_repo/builtin/packages/hdf5/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,8 @@ def cmake_args(self):
self.define("HDF5_BUILD_EXAMPLES", False),
self.define(
"BUILD_TESTING",
self.run_tests or
self.run_tests
or
# Version 1.8.22 fails to build the tools when shared libraries
# are enabled but the tests are disabled.
spec.satisfies("@1.8.22+shared+tools"),
Expand Down
1 change: 0 additions & 1 deletion repos/spack_repo/builtin/packages/hdfview/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ def setup_build_environment(self, env: EnvironmentModifications) -> None:
env.set("JAVA_HOME ", self.spec["java"].prefix)

def url_for_version(self, version):

# the new versions have a complex https://objects.githubusercontent.com url so use the
# github release
if version > Version("3.3.0"):
Expand Down
1 change: 0 additions & 1 deletion repos/spack_repo/builtin/packages/hip/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,6 @@ def setup_run_environment(self, env: EnvironmentModifications) -> None:
def setup_dependent_build_environment(
self, env: EnvironmentModifications, dependent_spec: Spec
) -> None:

env.set("HIPCC_COMPILE_FLAGS_APPEND", "")
if self.spec.satisfies("+rocm"):
paths = self.get_paths()
Expand Down
1 change: 0 additions & 1 deletion repos/spack_repo/builtin/packages/mbedtls/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ def cmake_args(self):


class MakefileBuilder(makefile.MakefileBuilder):

def setup_build_environment(self, env):
if self.spec.satisfies("libs=shared"):
env.set("SHARED", "yes")
Expand Down
3 changes: 1 addition & 2 deletions repos/spack_repo/builtin/packages/mfem/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -823,8 +823,7 @@ def find_optional_library(name, prefix):
lapack_blas = spec["lapack"].libs + spec["blas"].libs
options += [
# LAPACK_OPT is not used
"LAPACK_LIB=%s"
% ld_flags_from_library_list(lapack_blas)
"LAPACK_LIB=%s" % ld_flags_from_library_list(lapack_blas)
]

if "+superlu-dist" in spec:
Expand Down
1 change: 0 additions & 1 deletion repos/spack_repo/builtin/packages/mgis/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ class Mgis(CMakePackage):
version("1.0.1", sha256="6102621455bc5d9b1591cd33e93b2e15a9572d2ce59ca6dfa30ba57ae1265c08")

with default_args(deprecated=True):

version("3.0.1", sha256="fb9a7f5008a43c70bdb1c4b80f32f7fd3e4274c912b93c36af7011d3c4f93039")
version(
"3.0.0",
Expand Down
4 changes: 1 addition & 3 deletions repos/spack_repo/builtin/packages/nwchem/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,7 @@ def install(self, spec, prefix):
spce {data}/solvents/spce.rst
charmm_s {data}/charmm_s/
charmm_x {data}/charmm_x/
""".format(
data=share_path
)
""".format(data=share_path)
with open(".nwchemrc", "w") as f:
f.write(nwchemrc)
install(".nwchemrc", share_path)
Expand Down
4 changes: 1 addition & 3 deletions repos/spack_repo/builtin/packages/of_precice/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,7 @@ def configure(self, spec, prefix):
# Local build (for user appbin, libbin)
. ./change-userdir.sh $PWD/{user_dir}
#
""".format(
precice_dir=spec["precice"].prefix, user_dir=self.build_userdir
)
""".format(precice_dir=spec["precice"].prefix, user_dir=self.build_userdir)
)

def build(self, spec, prefix):
Expand Down
4 changes: 1 addition & 3 deletions repos/spack_repo/builtin/packages/openfoam/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -1168,9 +1168,7 @@ def create_rules(self, projdir, foam_pkg):
PINC = {PINC}
PLIBS = {PLIBS}
#-------
""".format(
**user_mpi
)
""".format(**user_mpi)
)


Expand Down
1 change: 0 additions & 1 deletion repos/spack_repo/builtin/packages/openmpi/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,6 @@ def patch(self):

# @:4 does not depend on prrte and used orte
with when("@5"):

# When an external PMIx is used, also an external PRRTE should be used
# https://github.com/open-mpi/ompi/issues/13275#issuecomment-2907903468
depends_on("prrte")
Expand Down
1 change: 0 additions & 1 deletion repos/spack_repo/builtin/packages/openvdb/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ class Openvdb(CMakePackage):
# depends_on("flex@2.6.4:", when="+ax")

def cmake_args(self):

args = [
self.define("OPENVDB_BUILD_CORE", True),
# Force the specific Spack-built Boost prefix
Expand Down
1 change: 0 additions & 1 deletion repos/spack_repo/builtin/packages/py_bottleneck/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ class PyBottleneck(PythonPackage):
depends_on("py-numpy", type=("build", "run"))

def url_for_version(self, version):

url = "https://files.pythonhosted.org/packages/source/b/Bottleneck/{0}-{1}.tar.gz"
if version > Version("1.3.8"):
name = "bottleneck"
Expand Down
2 changes: 1 addition & 1 deletion repos/spack_repo/builtin/packages/py_jaxlib/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def setup_run_environment(self, env: EnvironmentModifications) -> None:
for libdir in libs.directories:
env.append_path("LD_LIBRARY_PATH", libdir)

env.set("XLA_FLAGS", f'--xla_gpu_cuda_data_dir={self.spec["cuda"].prefix}')
env.set("XLA_FLAGS", f"--xla_gpu_cuda_data_dir={self.spec['cuda'].prefix}")

def install(self, spec, prefix):
# https://jax.readthedocs.io/en/latest/developer.html
Expand Down
4 changes: 1 addition & 3 deletions repos/spack_repo/builtin/packages/py_nltk/resourcegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@
when='+data',
sha256='{2}',
destination='nltk_data/{3}',
placement='{0}')""".format(
name, url, output_checksum, subdir
)
placement='{0}')""".format(name, url, output_checksum, subdir)
)
else:
print("""bad {0}""".format(url))
Expand Down
14 changes: 8 additions & 6 deletions repos/spack_repo/builtin/packages/py_nvidia_dali/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ class PyNvidiaDali(PythonPackage):
system = platform.system().lower()
arch = platform.machine()
if "linux" in system and arch == "x86_64":
version(
"1.52.0-cuda130",
sha256="37369fb30e9c66f710b29836688c90abc36793bbe757cd3ad699fac76ba07119",
url="https://developer.download.nvidia.com/compute/redist/nvidia-dali-cuda130/nvidia_dali_cuda130-1.52.0-py3-none-manylinux_2_28_x86_64.whl",
expand=False,
),
(
version(
"1.52.0-cuda130",
sha256="37369fb30e9c66f710b29836688c90abc36793bbe757cd3ad699fac76ba07119",
url="https://developer.download.nvidia.com/compute/redist/nvidia-dali-cuda130/nvidia_dali_cuda130-1.52.0-py3-none-manylinux_2_28_x86_64.whl",
expand=False,
),
)
version(
"1.52.0-cuda120",
sha256="52310878e2c6ced901c8e9fde8f8ac79b65537abc2a290a1cbf1f53f44072206",
Expand Down
3 changes: 1 addition & 2 deletions repos/spack_repo/builtin/packages/regenie/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ def dep_dirs(dep):

# Avoid using vendored dependencies distribued with bgen
if satisfies("~bgen-bundled-deps"):

# zstd and sqlite can be replaced with subsitutions
for dep, lib_name, old_lib, old_inc in [
("zstd", "zstd", "zstd-1.1.0", "zstd-1.1.0/lib"),
Expand Down Expand Up @@ -154,7 +153,7 @@ def dep_dirs(dep):
' HINTS "${BGEN_PATH}/build/3rd_party/boost_1_55_0" REQUIRED)'
)
boost_pkg = (
f"find_package(Boost {boost_vers}" f" COMPONENTS {' '.join(boost_comps)} REQUIRED)"
f"find_package(Boost {boost_vers} COMPONENTS {' '.join(boost_comps)} REQUIRED)"
)
for find, replace in [
(boost_lib, boost_pkg),
Expand Down
1 change: 0 additions & 1 deletion repos/spack_repo/builtin/packages/samrai/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ def cmake_args(self):


class CachedCMakeBuilder(CachedCMakeBuilder):

@property
def libs(self):
libs = [
Expand Down
4 changes: 1 addition & 3 deletions repos/spack_repo/builtin/packages/sarus/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,5 @@ def build_perms_script(self):

https://sarus.readthedocs.io/en/stable/install/post-installation.html#security-related

""".format(
script_sh
)
""".format(script_sh)
)
1 change: 0 additions & 1 deletion repos/spack_repo/builtin/packages/silo/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ class Silo(autotools.AutotoolsPackage, cmake.CMakePackage):


class AutotoolsBuilder(autotools.AutotoolsBuilder):

def flag_handler(self, name, flags):
spec = self.spec
if name == "ldflags":
Expand Down
1 change: 0 additions & 1 deletion repos/spack_repo/builtin/packages/tfel/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ class Tfel(CMakePackage):
version("3.0.16", sha256="3e03778ee3514304b008d40c0f7ec5c22a9ec56bc7d26d84d81ae3a32709e8e3")

with default_args(deprecated=True):

version("5.0.1", sha256="820b2f9d54e237b2c2d9d6f06aaf7d4a1d3f34fb373e6549bee4fd8b55ecfad1")
version("5.0.0", sha256="fe1ec39eba7f23571c2b0c773dab1cc274fee4512c5b2f2fc54b231da4502e87")
version("4.2.3", sha256="a4f636ff9aeb6146a2d4f4bfd261092d6aa6c89be1ca725cefa8c02a5ec5183a")
Expand Down
1 change: 0 additions & 1 deletion repos/spack_repo/builtin/packages/xictools/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ class Xictools(MakefilePackage):
patch("Makefile.in.patch", when="@4:")

def edit(self, spec: Spec, prefix: Prefix) -> None:

# Copy Makefile.sample to Makefile
shutil.copy("Makefile.sample", "Makefile")

Expand Down
8 changes: 2 additions & 6 deletions repos/spack_repo/builtin/packages/xios/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,7 @@ def xios_fcm(self):
%CPP {CC} -E
%FPP {CC} -E -P -x c
%MAKE make
""".format(
**param
)
""".format(**param)
elif spec.satisfies("%cce"):
# In the CC compiler prior to cce/8.3.7,
# optimisation must be reduced to avoid a bug,
Expand Down Expand Up @@ -181,9 +179,7 @@ def xios_fcm(self):
%CPP cpp
%FPP cpp -P -CC
%MAKE gmake
""".format(
**param
)
""".format(**param)
else:
raise InstallError("Unsupported compiler.")

Expand Down
Loading