Compare commits

..

16 Commits

Author SHA1 Message Date
Adrien Bernede
b2e526678a Merge branch 'develop' into woptim/extend-commit-fetch 2023-02-27 16:15:46 +01:00
Adrien M. BERNEDE
ecdde4a7fb Remove shallow clone fetch 2023-02-27 11:48:58 +01:00
Adrien M. BERNEDE
cbf2cb1a49 Fix wrong syntax 2023-02-27 11:36:06 +01:00
Adrien M. BERNEDE
5de57e6450 Missing repository arg 2023-02-27 11:29:09 +01:00
Adrien M. BERNEDE
a5d71af83a Attempt at getting the commit with a fetch 2023-02-27 11:27:23 +01:00
Harmen Stoppels
773fd5ad84 hpctoolkit: fix broken patches (#35711)
The patches don't have a stable checksum.
2023-02-27 10:50:48 +01:00
Seth R. Johnson
9b46e92e13 Celeritas: new versions 0.2.1 and 0.1.5 (#35704)
* celeritas: new versions 0.1.5 and 0.2.1

* celeritas: deprecate old versions
2023-02-27 09:36:28 +00:00
Howard Pritchard
f004311611 OpenMPI: add the 4.1.5 release (#35677)
Signed-off-by: Howard Pritchard <howardp@lanl.gov>
2023-02-27 00:57:36 -08:00
Glenn Johnson
a4b949492b r-twosamplemr: add new package and dependencies (#35683) 2023-02-27 07:38:27 +01:00
Larry Knox
6ab792fb03 hdf5-vol-cache: add v1.1 (#35685) 2023-02-27 07:35:30 +01:00
Alex Richert
313c7386c4 go: set GOMAXPROCS to limit number of build processes (#35703) 2023-02-27 07:26:50 +01:00
Adam J. Stewart
b0b4a05d44 py-nbqa: add new package (#35707) 2023-02-27 07:22:48 +01:00
Alberto Invernizzi
4e13b5374f fix dump problem (#35673)
if dump file existed it was not truncating the file, resulting in
a file with unaltered filesize, with the new content at the beginning,
"padded" with the tail of the old content, since the new content was
not enough to overwrite it.
2023-02-24 21:32:33 -08:00
Vinícius
07897900eb ompss-2 dependencies (#35642) 2023-02-24 21:22:17 -08:00
Axel Huebl
d286146c64 WarpX 23.02 (#35633)
Update `warpx` & `py-warpx` to the latest release.
2023-02-23 17:09:28 -08:00
Adrien M. BERNEDE
9331d47808 Add a step that forces the fetch of the specific commit
This will fetch even if the commit is on a PR from a fork
2023-02-23 16:38:58 +01:00
62 changed files with 895 additions and 164 deletions

View File

@@ -16,6 +16,7 @@
import sys
import tempfile
from contextlib import contextmanager
from sys import platform as _platform
from typing import Callable, List, Match, Optional, Tuple, Union
from llnl.util import tty
@@ -25,7 +26,9 @@
from spack.util.executable import Executable, which
from spack.util.path import path_to_os_path, system_path_filter
if sys.platform != "win32":
is_windows = _platform == "win32"
if not is_windows:
import grp
import pwd
else:
@@ -151,7 +154,7 @@ def lookup(name):
def getuid():
if sys.platform == "win32":
if is_windows:
import ctypes
if ctypes.windll.shell32.IsUserAnAdmin() == 0:
@@ -164,7 +167,7 @@ def getuid():
@system_path_filter
def rename(src, dst):
# On Windows, os.rename will fail if the destination file already exists
if sys.platform == "win32":
if is_windows:
# Windows path existence checks will sometimes fail on junctions/links/symlinks
# so check for that case
if os.path.exists(dst) or os.path.islink(dst):
@@ -193,7 +196,7 @@ def _get_mime_type():
"""Generate method to call `file` system command to aquire mime type
for a specified path
"""
if sys.platform == "win32":
if is_windows:
# -h option (no-dereference) does not exist in Windows
return file_command("-b", "--mime-type")
else:
@@ -548,7 +551,7 @@ def get_owner_uid(path, err_msg=None):
else:
p_stat = os.stat(path)
if sys.platform != "win32":
if _platform != "win32":
owner_uid = p_stat.st_uid
else:
sid = win32security.GetFileSecurity(
@@ -581,7 +584,7 @@ def group_ids(uid=None):
Returns:
(list of int): gids of groups the user is a member of
"""
if sys.platform == "win32":
if is_windows:
tty.warn("Function is not supported on Windows")
return []
@@ -601,7 +604,7 @@ def group_ids(uid=None):
@system_path_filter(arg_slice=slice(1))
def chgrp(path, group, follow_symlinks=True):
"""Implement the bash chgrp function on a single path"""
if sys.platform == "win32":
if is_windows:
raise OSError("Function 'chgrp' is not supported on Windows")
if isinstance(group, str):
@@ -1128,7 +1131,7 @@ def open_if_filename(str_or_file, mode="r"):
@system_path_filter
def touch(path):
"""Creates an empty file at the specified path."""
if sys.platform == "win32":
if is_windows:
perms = os.O_WRONLY | os.O_CREAT
else:
perms = os.O_WRONLY | os.O_CREAT | os.O_NONBLOCK | os.O_NOCTTY
@@ -1190,7 +1193,7 @@ def temp_cwd():
yield tmp_dir
finally:
kwargs = {}
if sys.platform == "win32":
if is_windows:
kwargs["ignore_errors"] = False
kwargs["onerror"] = readonly_file_handler(ignore_errors=True)
shutil.rmtree(tmp_dir, **kwargs)
@@ -1435,7 +1438,7 @@ def visit_directory_tree(root, visitor, rel_path="", depth=0):
try:
isdir = f.is_dir()
except OSError as e:
if sys.platform == "win32" and hasattr(e, "winerror") and e.winerror == 5 and islink:
if is_windows and hasattr(e, "winerror") and e.winerror == 5 and islink:
# if path is a symlink, determine destination and
# evaluate file vs directory
link_target = resolve_link_target_relative_to_the_link(f)
@@ -1544,11 +1547,11 @@ def readonly_file_handler(ignore_errors=False):
"""
def error_remove_readonly(func, path, exc):
if sys.platform != "win32":
if not is_windows:
raise RuntimeError("This method should only be invoked on Windows")
excvalue = exc[1]
if (
sys.platform == "win32"
is_windows
and func in (os.rmdir, os.remove, os.unlink)
and excvalue.errno == errno.EACCES
):
@@ -1578,7 +1581,7 @@ def remove_linked_tree(path):
# Windows readonly files cannot be removed by Python
# directly.
if sys.platform == "win32":
if is_windows:
kwargs["ignore_errors"] = False
kwargs["onerror"] = readonly_file_handler(ignore_errors=True)
@@ -2092,7 +2095,7 @@ def names(self):
# on non Windows platform
# Windows valid library extensions are:
# ['.dll', '.lib']
valid_exts = [".dll", ".lib"] if sys.platform == "win32" else [".dylib", ".so", ".a"]
valid_exts = [".dll", ".lib"] if is_windows else [".dylib", ".so", ".a"]
for ext in valid_exts:
i = name.rfind(ext)
if i != -1:
@@ -2240,7 +2243,7 @@ def find_libraries(libraries, root, shared=True, recursive=False, runtime=True):
message = message.format(find_libraries.__name__, type(libraries))
raise TypeError(message)
if sys.platform == "win32":
if is_windows:
static_ext = "lib"
# For linking (runtime=False) you need the .lib files regardless of
# whether you are doing a shared or static link
@@ -2272,7 +2275,7 @@ def find_libraries(libraries, root, shared=True, recursive=False, runtime=True):
# finally search all of root recursively. The search stops when the first
# match is found.
common_lib_dirs = ["lib", "lib64"]
if sys.platform == "win32":
if is_windows:
common_lib_dirs.extend(["bin", "Lib"])
for subdir in common_lib_dirs:
@@ -2407,7 +2410,7 @@ def _link(self, path, dest_dir):
# For py2 compatibility, we have to catch the specific Windows error code
# associate with trying to create a file that already exists (winerror 183)
except OSError as e:
if sys.platform == "win32" and e.winerror == 183:
if e.winerror == 183:
# We have either already symlinked or we are encoutering a naming clash
# either way, we don't want to overwrite existing libraries
already_linked = islink(dest_file)

View File

@@ -3,14 +3,12 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import contextlib
import errno
import os
import socket
import sys
import time
from datetime import datetime
from typing import Callable, Optional, Union
import llnl.util.tty as tty
from llnl.util.lang import pretty_seconds
@@ -548,11 +546,11 @@ def upgrade_read_to_write(self, timeout=None):
else:
raise LockUpgradeError(self.path)
def release_read(self, release_fn: Callable = None):
def release_read(self, release_fn=None):
"""Releases a read lock.
Arguments:
release_fn (Callable): function to call *before* the last recursive
release_fn (typing.Callable): function to call *before* the last recursive
lock (read or write) is released.
If the last recursive lock will be released, then this will call
@@ -588,7 +586,7 @@ def release_write(self, release_fn=None):
"""Releases a write lock.
Arguments:
release_fn (Callable): function to call before the last recursive
release_fn (typing.Callable): function to call before the last recursive
write is released.
If the last recursive *write* lock will be released, then this
@@ -686,6 +684,18 @@ def _status_msg(self, locktype, status):
class LockTransaction(object):
"""Simple nested transaction context manager that uses a file lock.
Arguments:
lock (Lock): underlying lock for this transaction to be accquired on
enter and released on exit
acquire (typing.Callable or contextlib.contextmanager): function to be called
after lock is acquired, or contextmanager to enter after acquire and leave
before release.
release (typing.Callable): function to be called before release. If
``acquire`` is a contextmanager, this will be called *after*
exiting the nexted context and before the lock is released.
timeout (float): number of seconds to set for the timeout when
accquiring the lock (default no timeout)
If the ``acquire_fn`` returns a value, it is used as the return value for
``__enter__``, allowing it to be passed as the ``as`` argument of a
``with`` statement.
@@ -699,27 +709,7 @@ class LockTransaction(object):
"""
def __init__(
self,
lock: Lock,
acquire: Optional[Union[Callable, contextlib.contextmanager]] = None,
release: Optional[Callable] = None,
timeout: Optional[float] = None,
):
"""
Arguments:
lock: underlying lock for this transaction to be accquired on
enter and released on exit
acquire: function to be called
after lock is acquired, or contextmanager to enter after acquire and leave
before release.
release: function to be called before release. If
``acquire`` is a contextmanager, this will be called *after*
exiting the nexted context and before the lock is released.
timeout: number of seconds to set for the timeout when
accquiring the lock (default no timeout)
"""
def __init__(self, lock, acquire=None, release=None, timeout=None):
self._lock = lock
self._timeout = timeout
self._acquire_fn = acquire

View File

@@ -5,13 +5,15 @@
import errno
import os
import shutil
import sys
import tempfile
from os.path import exists, join
from sys import platform as _platform
from llnl.util import lang
if sys.platform == "win32":
is_windows = _platform == "win32"
if is_windows:
from win32file import CreateHardLink
@@ -21,7 +23,7 @@ def symlink(real_path, link_path):
On Windows, use junctions if os.symlink fails.
"""
if sys.platform != "win32":
if not is_windows:
os.symlink(real_path, link_path)
elif _win32_can_symlink():
# Windows requires target_is_directory=True when the target is a dir.
@@ -97,7 +99,7 @@ def _win32_is_junction(path):
if os.path.islink(path):
return False
if sys.platform == "win32":
if is_windows:
import ctypes.wintypes
GetFileAttributes = ctypes.windll.kernel32.GetFileAttributesW

View File

@@ -14,7 +14,6 @@
import traceback
from datetime import datetime
from sys import platform as _platform
from typing import Optional
if _platform != "win32":
import fcntl
@@ -164,13 +163,14 @@ def get_timestamp(force=False):
return ""
def msg(message, *args, newline=True):
def msg(message, *args, **kwargs):
if not msg_enabled():
return
if isinstance(message, Exception):
message = "%s: %s" % (message.__class__.__name__, str(message))
newline = kwargs.get("newline", True)
st_text = ""
if _stacktrace:
st_text = process_stacktrace(2)
@@ -182,18 +182,19 @@ def msg(message, *args, newline=True):
print(indent + _output_filter(str(arg)))
def info(
message, *args, format="*b", stream=None, wrap=False, break_long_words=False, countback=3
):
def info(message, *args, **kwargs):
if isinstance(message, Exception):
message = "%s: %s" % (message.__class__.__name__, str(message))
if stream is None:
stream = sys.stdout
format = kwargs.get("format", "*b")
stream = kwargs.get("stream", sys.stdout)
wrap = kwargs.get("wrap", False)
break_long_words = kwargs.get("break_long_words", False)
st_countback = kwargs.get("countback", 3)
st_text = ""
if _stacktrace:
st_text = process_stacktrace(countback)
st_text = process_stacktrace(st_countback)
cprint(
"@%s{%s==>} %s%s"
% (format, st_text, get_timestamp(), cescape(_output_filter(str(message)))),
@@ -251,7 +252,10 @@ def die(message, *args, **kwargs):
sys.exit(1)
def get_number(prompt, default=None, abort=None):
def get_number(prompt, **kwargs):
default = kwargs.get("default", None)
abort = kwargs.get("abort", None)
if default is not None and abort is not None:
prompt += " (default is %s, %s to abort) " % (default, abort)
elif default is not None:
@@ -279,12 +283,14 @@ def get_number(prompt, default=None, abort=None):
return number
def get_yes_or_no(prompt, default: Optional[bool] = None):
if default is None:
def get_yes_or_no(prompt, **kwargs):
default_value = kwargs.get("default", None)
if default_value is None:
prompt += " [y/n] "
elif default is True:
elif default_value is True:
prompt += " [Y/n] "
elif default is False:
elif default_value is False:
prompt += " [y/N] "
else:
raise ValueError("default for get_yes_no() must be True, False, or None.")
@@ -294,7 +300,7 @@ def get_yes_or_no(prompt, default: Optional[bool] = None):
msg(prompt, newline=False)
ans = input().lower()
if not ans:
result = default
result = default_value
if result is None:
print("Please enter yes or no.")
else:
@@ -305,13 +311,20 @@ def get_yes_or_no(prompt, default: Optional[bool] = None):
return result
def hline(label=None, char="-", max_width=64):
def hline(label=None, **kwargs):
"""Draw a labeled horizontal line.
Keyword Arguments:
char (str): Char to draw the line with. Default '-'
max_width (int): Maximum width of the line. Default is 64 chars.
"""
char = kwargs.pop("char", "-")
max_width = kwargs.pop("max_width", 64)
if kwargs:
raise TypeError(
"'%s' is an invalid keyword argument for this function." % next(kwargs.iterkeys())
)
rows, cols = terminal_size()
if not cols:
cols = max_width

View File

@@ -326,7 +326,8 @@ def __init__(self, stream, color=None):
self._stream = stream
self._color = color
def write(self, string, raw=False):
def write(self, string, **kwargs):
raw = kwargs.get("raw", False)
raw_write = getattr(self._stream, "write")
color = self._color
@@ -337,6 +338,7 @@ def write(self, string, raw=False):
color = get_color_when()
raw_write(colorize(string, color=color))
def writelines(self, sequence, raw=False):
def writelines(self, sequence, **kwargs):
raw = kwargs.get("raw", False)
for string in sequence:
self.write(string, raw=raw)
self.write(string, self.color, raw=raw)

View File

@@ -26,6 +26,7 @@
description = "run spack's unit tests (wrapper around pytest)"
section = "developer"
level = "long"
is_windows = sys.platform == "win32"
def setup_parser(subparser):
@@ -211,7 +212,7 @@ def unit_test(parser, args, unknown_args):
# mock configuration used by unit tests
# Note: skip on windows here because for the moment,
# clingo is wholly unsupported from bootstrap
if sys.platform != "win32":
if not is_windows:
with spack.bootstrap.ensure_bootstrap_configuration():
spack.bootstrap.ensure_core_dependencies()
if pytest is None:

View File

@@ -28,6 +28,8 @@
__all__ = ["Compiler"]
is_windows = sys.platform == "win32"
@llnl.util.lang.memoized
def _get_compiler_version_output(compiler_path, version_arg, ignore_errors=()):
@@ -596,7 +598,7 @@ def search_regexps(cls, language):
suffixes = [""]
# Windows compilers generally have an extension of some sort
# as do most files on Windows, handle that case here
if sys.platform == "win32":
if is_windows:
ext = r"\.(?:exe|bat)"
cls_suf = [suf + ext for suf in cls.suffixes]
ext_suf = [ext]

View File

@@ -29,6 +29,7 @@
import spack.util.spack_yaml
import spack.util.windows_registry
is_windows = sys.platform == "win32"
#: Information on a package that has been detected
DetectedPackage = collections.namedtuple("DetectedPackage", ["spec", "prefix"])
@@ -183,7 +184,7 @@ def library_prefix(library_dir):
elif "lib" in lowered_components:
idx = lowered_components.index("lib")
return os.sep.join(components[:idx])
elif sys.platform == "win32" and "bin" in lowered_components:
elif is_windows and "bin" in lowered_components:
idx = lowered_components.index("bin")
return os.sep.join(components[:idx])
else:
@@ -259,13 +260,13 @@ def find_windows_compiler_bundled_packages():
class WindowsKitExternalPaths(object):
if sys.platform == "win32":
if is_windows:
plat_major_ver = str(winOs.windows_version()[0])
@staticmethod
def find_windows_kit_roots():
"""Return Windows kit root, typically %programfiles%\\Windows Kits\\10|11\\"""
if sys.platform != "win32":
if not is_windows:
return []
program_files = os.environ["PROGRAMFILES(x86)"]
kit_base = os.path.join(
@@ -358,7 +359,7 @@ def compute_windows_program_path_for_package(pkg):
pkg (spack.package_base.PackageBase): package for which
Program Files location is to be computed
"""
if sys.platform != "win32":
if not is_windows:
return []
# note windows paths are fine here as this method should only ever be invoked
# to interact with Windows
@@ -378,7 +379,7 @@ def compute_windows_user_path_for_package(pkg):
installs see:
https://learn.microsoft.com/en-us/dotnet/api/system.environment.specialfolder?view=netframework-4.8
"""
if sys.platform != "win32":
if not is_windows:
return []
# Current user directory

View File

@@ -31,6 +31,8 @@
path_to_dict,
)
is_windows = sys.platform == "win32"
def common_windows_package_paths():
paths = WindowsCompilerExternalPaths.find_windows_compiler_bundled_packages()
@@ -55,7 +57,7 @@ def executables_in_path(path_hints):
path_hints (list): list of paths to be searched. If None the list will be
constructed based on the PATH environment variable.
"""
if sys.platform == "win32":
if is_windows:
path_hints.extend(common_windows_package_paths())
search_paths = llnl.util.filesystem.search_paths_for_executables(*path_hints)
return path_to_dict(search_paths)
@@ -147,7 +149,7 @@ def by_library(packages_to_check, path_hints=None):
path_to_lib_name = (
libraries_in_ld_and_system_library_path(path_hints=path_hints)
if sys.platform != "win32"
if not is_windows
else libraries_in_windows_paths(path_hints)
)

View File

@@ -21,6 +21,7 @@
import spack.util.spack_json as sjson
from spack.error import SpackError
is_windows = sys.platform == "win32"
# Note: Posixpath is used here as opposed to
# os.path.join due to spack.spec.Spec.format
# requiring forward slash path seperators at this stage
@@ -345,7 +346,7 @@ def remove_install_directory(self, spec, deprecated=False):
# Windows readonly files cannot be removed by Python
# directly, change permissions before attempting to remove
if sys.platform == "win32":
if is_windows:
kwargs = {
"ignore_errors": False,
"onerror": fs.readonly_file_handler(ignore_errors=False),

View File

@@ -28,6 +28,7 @@
import os.path
import re
import shutil
import sys
import urllib.parse
from typing import List, Optional
@@ -52,6 +53,7 @@
#: List of all fetch strategies, created by FetchStrategy metaclass.
all_strategies = []
is_windows = sys.platform == "win32"
CONTENT_TYPE_MISMATCH_WARNING_TEMPLATE = (
"The contents of {subject} look like {content_type}. Either the URL"
@@ -860,6 +862,9 @@ def clone(self, dest=None, commit=None, branch=None, tag=None, bare=False):
)
with working_dir(dest):
# By defaults, on all references are fetched by the clone
fetch_args = ["fetch", "origin", commit]
git(*fetch_args)
checkout_args = ["checkout", commit]
if not debug:
checkout_args.insert(1, "--quiet")

View File

@@ -30,7 +30,8 @@
#: Groupdb does not exist on Windows, prevent imports
#: on supported systems
if sys.platform != "win32":
is_windows = sys.platform == "win32"
if not is_windows:
import grp
#: Spack itself also limits the shebang line to at most 4KB, which should be plenty.

View File

@@ -84,6 +84,9 @@
#: queue invariants).
STATUS_REMOVED = "removed"
is_windows = sys.platform == "win32"
is_osx = sys.platform == "darwin"
class InstallAction(object):
#: Don't perform an install
@@ -166,9 +169,9 @@ def _do_fake_install(pkg):
if not pkg.name.startswith("lib"):
library = "lib" + library
plat_shared = ".dll" if sys.platform == "win32" else ".so"
plat_static = ".lib" if sys.platform == "win32" else ".a"
dso_suffix = ".dylib" if sys.platform == "darwin" else plat_shared
plat_shared = ".dll" if is_windows else ".so"
plat_static = ".lib" if is_windows else ".a"
dso_suffix = ".dylib" if is_osx else plat_shared
# Install fake command
fs.mkdirp(pkg.prefix.bin)

View File

@@ -92,6 +92,9 @@
_spack_configure_argsfile = "spack-configure-args.txt"
is_windows = sys.platform == "win32"
def deprecated_version(pkg, version):
"""Return True if the version is deprecated, False otherwise.
@@ -162,7 +165,7 @@ def windows_establish_runtime_linkage(self):
Performs symlinking to incorporate rpath dependencies to Windows runtime search paths
"""
if sys.platform == "win32":
if is_windows:
self.win_rpath.add_library_dependent(*self.win_add_library_dependent())
self.win_rpath.add_rpath(*self.win_add_rpath())
self.win_rpath.establish_link()
@@ -207,7 +210,7 @@ def to_windows_exe(exe):
plat_exe = []
if hasattr(cls, "executables"):
for exe in cls.executables:
if sys.platform == "win32":
if is_windows:
exe = to_windows_exe(exe)
plat_exe.append(exe)
return plat_exe
@@ -2398,7 +2401,7 @@ def rpath(self):
# on Windows, libraries of runtime interest are typically
# stored in the bin directory
if sys.platform == "win32":
if is_windows:
rpaths = [self.prefix.bin]
rpaths.extend(d.prefix.bin for d in deps if os.path.isdir(d.prefix.bin))
else:

View File

@@ -54,6 +54,7 @@
import itertools
import os
import re
import sys
import warnings
from typing import Tuple
@@ -117,6 +118,7 @@
"SpecDeprecatedError",
]
is_windows = sys.platform == "win32"
#: Valid pattern for an identifier in Spack
identifier_re = r"\w[\w-]*"

View File

@@ -16,6 +16,8 @@
from spack.main import SpackCommand
from spack.spec import Spec
is_windows = sys.platform == "win32"
@pytest.fixture
def executables_found(monkeypatch):
@@ -37,7 +39,7 @@ def _win_exe_ext():
def define_plat_exe(exe):
if sys.platform == "win32":
if is_windows:
exe += ".bat"
return exe

View File

@@ -7,6 +7,7 @@
from spack.main import SpackCommand
is_windows = sys.platform == "win32"
resource = SpackCommand("resource")
#: these are hashes used in mock packages
@@ -22,7 +23,7 @@
"bf07a7fbb825fc0aae7bf4a1177b2b31fcf8a3feeaf7092761e18c859ee52a9c",
"7d865e959b2466918c9863afca942d0fb89d7c9ac0c99bafc3749504ded97730",
]
if sys.platform != "win32"
if not is_windows
else [
"abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234",
"1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd",
@@ -67,7 +68,7 @@ def test_resource_list_only_hashes(mock_packages, capfd):
def test_resource_show(mock_packages, capfd):
test_hash = (
"c45c1564f70def3fc1a6e22139f62cb21cd190cc3a7dbe6f4120fa59ce33dcb8"
if sys.platform != "win32"
if not is_windows
else "3c5b65abcd6a3b2c714dbf7c31ff65fe3748a1adc371f030c283007ca5534f11"
)
with capfd.disabled():

View File

@@ -14,6 +14,8 @@
import spack.extensions
import spack.main
is_windows = sys.platform == "win32"
class Extension:
"""Helper class to simplify the creation of simple command extension
@@ -272,7 +274,7 @@ def test_variable_in_extension_path(config, working_env):
os.environ["_MY_VAR"] = os.path.join("my", "var")
ext_paths = [os.path.join("~", "${_MY_VAR}", "spack-extension-1")]
# Home env variable is USERPROFILE on Windows
home_env = "USERPROFILE" if sys.platform == "win32" else "HOME"
home_env = "USERPROFILE" if is_windows else "HOME"
expected_ext_paths = [
os.path.join(os.environ[home_env], os.environ["_MY_VAR"], "spack-extension-1")
]

View File

@@ -25,6 +25,8 @@
from spack.spec import Spec
from spack.version import ver
is_windows = sys.platform == "win32"
def check_spec(abstract, concrete):
if abstract.versions.concrete:
@@ -1136,7 +1138,7 @@ def test_custom_compiler_version(self):
def test_all_patches_applied(self):
uuidpatch = (
"a60a42b73e03f207433c5579de207c6ed61d58e4d12dd3b5142eb525728d89ea"
if sys.platform != "win32"
if not is_windows
else "d0df7988457ec999c148a4a2af25ce831bfaad13954ba18a4446374cb0aef55e"
)
localpatch = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"

View File

@@ -54,6 +54,8 @@
from spack.util.pattern import Bunch
from spack.util.web import FetchError
is_windows = sys.platform == "win32"
def ensure_configuration_fixture_run_before(request):
"""Ensure that fixture mutating the configuration run before the one where
@@ -619,7 +621,7 @@ def ensure_debug(monkeypatch):
tty.set_debug(current_debug_level)
@pytest.fixture(autouse=sys.platform == "win32", scope="session")
@pytest.fixture(autouse=is_windows, scope="session")
def platform_config():
spack.config.add_default_platform_scope(spack.platforms.real_host().name)
@@ -631,7 +633,7 @@ def default_config():
This ensures we can test the real default configuration without having
tests fail when the user overrides the defaults that we test against."""
defaults_path = os.path.join(spack.paths.etc_path, "defaults")
if sys.platform == "win32":
if is_windows:
defaults_path = os.path.join(defaults_path, "windows")
with spack.config.use_configuration(defaults_path) as defaults_config:
yield defaults_config
@@ -688,7 +690,7 @@ def configuration_dir(tmpdir_factory, linux_os):
tmpdir.ensure("user", dir=True)
# Slightly modify config.yaml and compilers.yaml
if sys.platform == "win32":
if is_windows:
locks = False
else:
locks = True
@@ -1673,11 +1675,11 @@ def mock_executable(tmpdir):
"""
import jinja2
shebang = "#!/bin/sh\n" if sys.platform != "win32" else "@ECHO OFF"
shebang = "#!/bin/sh\n" if not is_windows else "@ECHO OFF"
def _factory(name, output, subdir=("bin",)):
f = tmpdir.ensure(*subdir, dir=True).join(name)
if sys.platform == "win32":
if is_windows:
f += ".bat"
t = jinja2.Template("{{ shebang }}{{ output }}\n")
f.write(t.render(shebang=shebang, output=output))

View File

@@ -33,6 +33,8 @@
from spack.schema.database_index import schema
from spack.util.executable import Executable
is_windows = sys.platform == "win32"
pytestmark = pytest.mark.db
@@ -449,7 +451,7 @@ def test_005_db_exists(database):
lock_file = os.path.join(database.root, ".spack-db", "lock")
assert os.path.exists(str(index_file))
# Lockfiles not currently supported on Windows
if sys.platform != "win32":
if not is_windows:
assert os.path.exists(str(lock_file))
with open(index_file) as fd:

View File

@@ -24,6 +24,8 @@
import spack.store
import spack.util.lock as lk
is_windows = sys.platform == "win32"
def _mock_repo(root, namespace):
"""Create an empty repository at the specified root
@@ -526,7 +528,7 @@ def _repoerr(repo, name):
# The call to install_tree will raise the exception since not mocking
# creation of dependency package files within *install* directories.
with pytest.raises(IOError, match=path if sys.platform != "win32" else ""):
with pytest.raises(IOError, match=path if not is_windows else ""):
inst.dump_packages(spec, path)
# Now try the error path, which requires the mock directory structure
@@ -877,7 +879,7 @@ def _chgrp(path, group, follow_symlinks=True):
metadatadir = spack.store.layout.metadata_path(spec)
# Regex matching with Windows style paths typically fails
# so we skip the match check here
if sys.platform == "win32":
if is_windows:
metadatadir = None
# Should fail with a "not a directory" error
with pytest.raises(OSError, match=metadatadir):

View File

@@ -11,8 +11,9 @@
import spack.paths
from spack.compiler import _parse_non_system_link_dirs
is_windows = sys.platform == "win32"
drive = ""
if sys.platform == "win32":
if is_windows:
match = re.search(r"[A-Za-z]:", spack.paths.test_path)
if match:
drive = match.group()
@@ -209,7 +210,7 @@ def test_obscure_parsing_rules():
]
# TODO: add a comment explaining why this happens
if sys.platform == "win32":
if is_windows:
paths.remove(os.path.join(root, "second", "path"))
check_link_paths("obscure-parsing-rules.txt", paths)

View File

@@ -13,6 +13,8 @@
import spack.paths
is_windows = sys.platform == "win32"
@pytest.fixture()
def library_list():
@@ -26,7 +28,7 @@ def library_list():
"/dir3/libz.so",
"libmpi.so.20.10.1", # shared object libraries may be versioned
]
if sys.platform != "win32"
if not is_windows
else [
"/dir1/liblapack.lib",
"/dir2/libpython3.6.dll",
@@ -57,10 +59,10 @@ def header_list():
# TODO: Remove below when llnl.util.filesystem.find_libraries becomes spec aware
plat_static_ext = "lib" if sys.platform == "win32" else "a"
plat_static_ext = "lib" if is_windows else "a"
plat_shared_ext = "dll" if sys.platform == "win32" else "so"
plat_shared_ext = "dll" if is_windows else "so"
plat_apple_shared_ext = "dylib"
@@ -76,8 +78,7 @@ def test_joined_and_str(self, library_list):
expected = " ".join(
[
"/dir1/liblapack.%s" % plat_static_ext,
"/dir2/libpython3.6.%s"
% (plat_apple_shared_ext if sys.platform != "win32" else "dll"),
"/dir2/libpython3.6.%s" % (plat_apple_shared_ext if not is_windows else "dll"),
"/dir1/libblas.%s" % plat_static_ext,
"/dir3/libz.%s" % plat_shared_ext,
"libmpi.%s.20.10.1" % plat_shared_ext,
@@ -92,8 +93,7 @@ def test_joined_and_str(self, library_list):
expected = ";".join(
[
"/dir1/liblapack.%s" % plat_static_ext,
"/dir2/libpython3.6.%s"
% (plat_apple_shared_ext if sys.platform != "win32" else "dll"),
"/dir2/libpython3.6.%s" % (plat_apple_shared_ext if not is_windows else "dll"),
"/dir1/libblas.%s" % plat_static_ext,
"/dir3/libz.%s" % plat_shared_ext,
"libmpi.%s.20.10.1" % plat_shared_ext,

View File

@@ -62,7 +62,8 @@
import llnl.util.multiproc as mp
from llnl.util.filesystem import getuid, touch
if sys.platform != "win32":
is_windows = sys.platform == "win32"
if not is_windows:
import fcntl
pytestmark = pytest.mark.skipif(sys.platform == "win32", reason="does not run on windows")
@@ -126,7 +127,7 @@ def make_readable(*paths):
# stat.S_IREAD constants or a corresponding integer value). All other
# bits are ignored."
for path in paths:
if sys.platform != "win32":
if not is_windows:
mode = 0o555 if os.path.isdir(path) else 0o444
else:
mode = stat.S_IREAD
@@ -135,7 +136,7 @@ def make_readable(*paths):
def make_writable(*paths):
for path in paths:
if sys.platform != "win32":
if not is_windows:
mode = 0o755 if os.path.isdir(path) else 0o744
else:
mode = stat.S_IWRITE
@@ -615,7 +616,7 @@ def test_read_lock_read_only_dir_writable_lockfile(lock_dir, lock_path):
pass
@pytest.mark.skipif(False if sys.platform == "win32" else getuid() == 0, reason="user is root")
@pytest.mark.skipif(False if is_windows else getuid() == 0, reason="user is root")
def test_read_lock_no_lockfile(lock_dir, lock_path):
"""read-only directory, no lockfile (so can't create)."""
with read_only(lock_dir):

View File

@@ -20,6 +20,7 @@
from spack.spec import Spec
from spack.stage import Stage
from spack.util.executable import Executable
from spack.util.path import is_windows
# various sha256 sums (using variables for legibility)
# many file based shas will differ between Windows and other platforms
@@ -28,22 +29,22 @@
# files with contents 'foo', 'bar', and 'baz'
foo_sha256 = (
"b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c"
if sys.platform != "win32"
if not is_windows
else "bf874c7dd3a83cf370fdc17e496e341de06cd596b5c66dbf3c9bb7f6c139e3ee"
)
bar_sha256 = (
"7d865e959b2466918c9863afca942d0fb89d7c9ac0c99bafc3749504ded97730"
if sys.platform != "win32"
if not is_windows
else "556ddc69a75d0be0ecafc82cd4657666c8063f13d762282059c39ff5dbf18116"
)
baz_sha256 = (
"bf07a7fbb825fc0aae7bf4a1177b2b31fcf8a3feeaf7092761e18c859ee52a9c"
if sys.platform != "win32"
if not is_windows
else "d30392e66c636a063769cbb1db08cd3455a424650d4494db6379d73ea799582b"
)
biz_sha256 = (
"a69b288d7393261e613c276c6d38a01461028291f6e381623acc58139d01f54d"
if sys.platform != "win32"
if not is_windows
else "2f2b087a8f84834fd03d4d1d5b43584011e869e4657504ef3f8b0a672a5c222e"
)
@@ -55,7 +56,7 @@
platform_url_sha = (
"252c0af58be3d90e5dc5e0d16658434c9efa5d20a5df6c10bf72c2d77f780866"
if sys.platform != "win32"
if not is_windows
else "ecf44a8244a486e9ef5f72c6cb622f99718dcd790707ac91af0b8c9a4ab7a2bb"
)
@@ -159,17 +160,17 @@ def test_patch_order(mock_packages, config):
mid2_sha256 = (
"mid21234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234"
if sys.platform != "win32"
if not is_windows
else "mid21234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234"
)
mid1_sha256 = (
"0b62284961dab49887e31319843431ee5b037382ac02c4fe436955abef11f094"
if sys.platform != "win32"
if not is_windows
else "aeb16c4dec1087e39f2330542d59d9b456dd26d791338ae6d80b6ffd10c89dfa"
)
top_sha256 = (
"f7de2947c64cb6435e15fb2bef359d1ed5f6356b2aebb7b20535e3772904e6db"
if sys.platform != "win32"
if not is_windows
else "ff34cb21271d16dbf928374f610bb5dd593d293d311036ddae86c4846ff79070"
)
@@ -218,7 +219,7 @@ def test_patched_dependency(mock_packages, config, install_mockery, mock_fetch):
# make sure the patch makes it into the dependency spec
t_sha = (
"c45c1564f70def3fc1a6e22139f62cb21cd190cc3a7dbe6f4120fa59ce33dcb8"
if sys.platform != "win32"
if not is_windows
else "3c5b65abcd6a3b2c714dbf7c31ff65fe3748a1adc371f030c283007ca5534f11"
)
assert (t_sha,) == spec["libelf"].variants["patches"].value

View File

@@ -11,6 +11,8 @@
import spack.util.environment as envutil
is_windows = sys.platform == "win32"
@pytest.fixture()
def prepare_environment_for_tests():
@@ -21,14 +23,14 @@ def prepare_environment_for_tests():
def test_is_system_path():
sys_path = "C:\\Users" if sys.platform == "win32" else "/usr/bin"
sys_path = "C:\\Users" if is_windows else "/usr/bin"
assert envutil.is_system_path(sys_path)
assert not envutil.is_system_path("/nonsense_path/bin")
assert not envutil.is_system_path("")
assert not envutil.is_system_path(None)
if sys.platform == "win32":
if is_windows:
test_paths = [
"C:\\Users",
"C:\\",
@@ -49,7 +51,7 @@ def test_is_system_path():
def test_filter_system_paths():
nonsense_prefix = "C:\\nonsense_path" if sys.platform == "win32" else "/nonsense_path"
nonsense_prefix = "C:\\nonsense_path" if is_windows else "/nonsense_path"
expected = [p for p in test_paths if p.startswith(nonsense_prefix)]
filtered = envutil.filter_system_paths(test_paths)
assert expected == filtered

View File

@@ -14,11 +14,13 @@
import spack.util.executable as ex
from spack.hooks.sbang import filter_shebangs_in_directory
is_windows = sys.platform == "win32"
def test_read_unicode(tmpdir, working_env):
script_name = "print_unicode.py"
# read the unicode back in and see whether things work
if sys.platform == "win32":
if is_windows:
script = ex.Executable("%s %s" % (sys.executable, script_name))
else:
script = ex.Executable("./%s" % script_name)

View File

@@ -13,6 +13,9 @@
import spack.config
import spack.util.path as sup
is_windows = sys.platform == "win32"
#: Some lines with lots of placeholders
padded_lines = [
"==> [2021-06-23-15:59:05.020387] './configure' '--prefix=/Users/gamblin2/padding-log-test/opt/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_pla/darwin-bigsur-skylake/apple-clang-12.0.5/zlib-1.2.11-74mwnxgn6nujehpyyalhwizwojwn5zga", # noqa: E501
@@ -33,7 +36,7 @@ def test_sanitze_file_path(tmpdir):
"""Test filtering illegal characters out of potential file paths"""
# *nix illegal files characters are '/' and none others
illegal_file_path = str(tmpdir) + "//" + "abcdefghi.txt"
if sys.platform == "win32":
if is_windows:
# Windows has a larger set of illegal characters
illegal_file_path = os.path.join(tmpdir, 'a<b>cd?e:f"g|h*i.txt')
real_path = sup.sanitize_file_path(illegal_file_path)
@@ -43,7 +46,7 @@ def test_sanitze_file_path(tmpdir):
# This class pertains to path string padding manipulation specifically
# which is used for binary caching. This functionality is not supported
# on Windows as of yet.
@pytest.mark.skipif(sys.platform == "win32", reason="Padding funtionality unsupported on Windows")
@pytest.mark.skipif(is_windows, reason="Padding funtionality unsupported on Windows")
class TestPathPadding:
@pytest.mark.parametrize("padded,fixed", zip(padded_lines, fixed_lines))
def test_padding_substitution(self, padded, fixed):
@@ -119,7 +122,7 @@ def test_path_debug_padded_filter(debug, monkeypatch):
string = fmt.format(prefix, os.sep, os.sep.join([sup.SPACK_PATH_PADDING_CHARS] * 2), suffix)
expected = (
fmt.format(prefix, os.sep, "[padded-to-{0}-chars]".format(72), suffix)
if debug <= 1 and sys.platform != "win32"
if debug <= 1 and not is_windows
else string
)

View File

@@ -28,6 +28,8 @@
ALLOWED_SINGLE_EXT_ARCHIVE_TYPES = PRE_EXTS + EXTS + NOTAR_EXTS
is_windows = sys.platform == "win32"
try:
import bz2 # noqa
@@ -156,7 +158,7 @@ def _unzip(archive_file):
archive_file (str): absolute path of the file to be decompressed
"""
extracted_file = os.path.basename(strip_extension(archive_file, "zip"))
if sys.platform == "win32":
if is_windows:
return _untar(archive_file)
else:
exe = "unzip"
@@ -168,7 +170,7 @@ def _unzip(archive_file):
def _unZ(archive_file):
if sys.platform == "win32":
if is_windows:
result = _7zip(archive_file)
else:
result = _system_gunzip(archive_file)
@@ -187,7 +189,7 @@ def _lzma_decomp(archive_file):
with lzma.open(archive_file) as lar:
shutil.copyfileobj(lar, ar)
else:
if sys.platform == "win32":
if is_windows:
return _7zip(archive_file)
else:
return _xz(archive_file)
@@ -225,7 +227,7 @@ def _xz(archive_file):
"""Decompress lzma compressed .xz files via xz command line
tool. Available only on Unix
"""
if sys.platform == "win32":
if is_windows:
raise RuntimeError("XZ tool unavailable on Windows")
decompressed_file = os.path.basename(strip_extension(archive_file, "xz"))
working_dir = os.getcwd()
@@ -308,7 +310,7 @@ def decompressor_for(path, extension=None):
# Catch tar.xz/tar.Z files here for Windows
# as the tar utility on Windows cannot handle such
# compression types directly
if ("xz" in extension or "Z" in extension) and sys.platform == "win32":
if ("xz" in extension or "Z" in extension) and is_windows:
return _win_compressed_tarball_handler
return _untar

View File

@@ -25,12 +25,14 @@
import spack.util.executable as executable
from spack.util.path import path_to_os_path, system_path_filter
is_windows = sys.platform == "win32"
system_paths = (
["/", "/usr", "/usr/local"]
if sys.platform != "win32"
if not is_windows
else ["C:\\", "C:\\Program Files", "C:\\Program Files (x86)", "C:\\Users", "C:\\ProgramData"]
)
suffixes = ["bin", "bin64", "include", "lib", "lib64"] if sys.platform != "win32" else []
suffixes = ["bin", "bin64", "include", "lib", "lib64"] if not is_windows else []
system_dirs = [os.path.join(p, s) for s in suffixes for p in system_paths] + system_paths
@@ -136,7 +138,7 @@ def dump_environment(path, environment=None):
use_env = environment or os.environ
hidden_vars = set(["PS1", "PWD", "OLDPWD", "TERM_SESSION_ID"])
fd = os.open(path, os.O_WRONLY | os.O_CREAT, 0o600)
fd = os.open(path, os.O_WRONLY | os.O_CREAT | os.O_TRUNC, 0o600)
with os.fdopen(fd, "w") as env_file:
for var, val in sorted(use_env.items()):
env_file.write(

View File

@@ -21,6 +21,8 @@
import spack.error
import spack.paths
is_windows = sys.platform == "win32"
class Lock(llnl.util.lock.Lock):
"""Lock that can be disabled.
@@ -32,7 +34,7 @@ class Lock(llnl.util.lock.Lock):
def __init__(self, *args, **kwargs):
super(Lock, self).__init__(*args, **kwargs)
self._enable = spack.config.get("config:locks", sys.platform != "win32")
self._enable = spack.config.get("config:locks", not is_windows)
def _lock(self, op, timeout=0):
if self._enable:

View File

@@ -22,6 +22,8 @@
import spack.util.spack_yaml as syaml
is_windows = sys.platform == "win32"
__all__ = ["substitute_config_variables", "substitute_path_variables", "canonicalize_path"]
@@ -151,7 +153,7 @@ def sanitize_file_path(pth):
# instances of illegal characters on join
pth_cmpnts = pth.split(os.path.sep)
if sys.platform == "win32":
if is_windows:
drive_match = r"[a-zA-Z]:"
is_abs = bool(re.match(drive_match, pth_cmpnts[0]))
drive = pth_cmpnts[0] + os.path.sep if is_abs else ""
@@ -208,7 +210,7 @@ def path_filter_caller(*args, **kwargs):
def get_system_path_max():
# Choose a conservative default
sys_max_path_length = 256
if sys.platform == "win32":
if is_windows:
sys_max_path_length = 260
else:
try:
@@ -236,7 +238,7 @@ class Path:
unix = 0
windows = 1
platform_path = windows if sys.platform == "win32" else unix
platform_path = windows if is_windows else unix
def format_os_path(path, mode=Path.unix):
@@ -485,7 +487,7 @@ def debug_padded_filter(string, level=1):
Returns (str): filtered string if current debug level does not exceed
level and not windows; otherwise, unfiltered string
"""
if sys.platform == "win32":
if is_windows:
return string
return padding_filter(string) if tty.debug_level() <= level else string

View File

@@ -413,7 +413,6 @@ def visit_Try(self, node):
self.dispatch(node.finalbody)
def visit_TryExcept(self, node):
# this construct only exists in Python < 3.3
self.fill("try")
with self.block():
self.dispatch(node.body)
@@ -426,8 +425,7 @@ def visit_TryExcept(self, node):
self.dispatch(node.orelse)
def visit_TryFinally(self, node):
# this construct only exists in Python < 3.3
if len(node.body) == 1 and isinstance(node.body[0], ast.TryExcept): # type: ignore
if len(node.body) == 1 and isinstance(node.body[0], ast.TryExcept):
# try-except-finally
self.dispatch(node.body)
else:

View File

@@ -13,7 +13,8 @@
from llnl.util import tty
if sys.platform == "win32":
is_windows = sys.platform == "win32"
if is_windows:
import winreg
@@ -153,7 +154,7 @@ def __init__(self, key, root_key=HKEY.HKEY_CURRENT_USER):
to get an entrypoint, the HKEY constants are always open, or an already
open key can be used instead.
"""
if sys.platform != "win32":
if not is_windows:
raise RuntimeError(
"Cannot instantiate Windows Registry class on non Windows platforms"
)
@@ -166,7 +167,7 @@ def invalid_reg_ref_error_handler(self):
try:
yield
except FileNotFoundError as e:
if sys.platform == "win32" and e.winerror == 2:
if e.winerror == 2:
tty.debug("Key %s at position %s does not exist" % (self.key, str(self.root)))
else:
raise e
@@ -181,7 +182,7 @@ def _load_key(self):
winreg.OpenKeyEx(self.root.hkey, self.key, access=winreg.KEY_READ),
)
except FileNotFoundError as e:
if sys.platform == "win32" and e.winerror == 2:
if e.winerror == 2:
self._reg = -1
tty.debug("Key %s at position %s does not exist" % (self.key, str(self.root)))
else:

View File

@@ -1336,6 +1336,10 @@ def lookup_ref(self, ref):
# won't properly update the local rev-list)
self.fetcher.git("fetch", "--tags", output=os.devnull, error=os.devnull)
# We need to do an attempt at fetching the commit in order to
# be sure to get it in case it comes from a PR in a fork.
self.fetcher.git("fetch", "origin", "%s" % ref, output=os.devnull, error=os.devnull)
# Ensure ref is a commit object known to git
# Note the brackets are literals, the ref replaces the format string
try:

View File

@@ -113,7 +113,6 @@ namespace_packages = true
# globally, then turn back on in spack and spack submodules
ignore_errors = true
ignore_missing_imports = true
check_untyped_defs = true
[[tool.mypy.overrides]]
module = 'spack.*'

View File

@@ -17,12 +17,38 @@ class Celeritas(CMakePackage, CudaPackage, ROCmPackage):
maintainers("sethrj")
version("0.2.0", sha256="12af28fda0e482a9eba89781b4ead445cf6f170bc1b8d88cc814e49b1ec09e9f")
version("0.1.4", sha256="ea82a03fc750a2a805f87afd9ac944109dd7537edb5c0c370f93d332d4cd47db")
version("0.1.3", sha256="992c49a48adba884fe3933c9624da5bf480ef0694809430ae98903f2c28cc881")
version("0.1.2", sha256="d123ea2e34267adba387d46bae8c9a1146a2e047f87f2ea5f823878c1684678d")
version("0.1.1", sha256="a1d58e29226e89a2330d69c40049d61e7c885cf991824e60ff8c9ccc95fc5ec6")
version("0.1.0", sha256="46692977b9b31d73662252cc122d7f016f94139475788bca7fdcb97279b93af8")
version("0.2.1", sha256="b3717b43f70dd0da848139da4171ca7a887bb6777908845b6d953d47b1f4db41")
version(
"0.2.0",
sha256="12af28fda0e482a9eba89781b4ead445cf6f170bc1b8d88cc814e49b1ec09e9f",
deprecated=True,
)
version("0.1.5", sha256="5e63b9ce7fcfe34a8938565b84453bce51fa6639d1ede13bb59d41de6431cef4")
version(
"0.1.4",
sha256="ea82a03fc750a2a805f87afd9ac944109dd7537edb5c0c370f93d332d4cd47db",
deprecated=True,
)
version(
"0.1.3",
sha256="992c49a48adba884fe3933c9624da5bf480ef0694809430ae98903f2c28cc881",
deprecated=True,
)
version(
"0.1.2",
sha256="d123ea2e34267adba387d46bae8c9a1146a2e047f87f2ea5f823878c1684678d",
deprecated=True,
)
version(
"0.1.1",
sha256="a1d58e29226e89a2330d69c40049d61e7c885cf991824e60ff8c9ccc95fc5ec6",
deprecated=True,
)
version(
"0.1.0",
sha256="46692977b9b31d73662252cc122d7f016f94139475788bca7fdcb97279b93af8",
deprecated=True,
)
_cxxstd_values = ("14", "17")
@@ -49,7 +75,8 @@ class Celeritas(CMakePackage, CudaPackage, ROCmPackage):
depends_on("cmake@3.22:", type="build", when="+rocm")
depends_on("nlohmann-json")
depends_on("geant4@10.6:", when="+geant4")
depends_on("geant4@10.7:11.0", when="@:0.2.0 +geant4")
depends_on("geant4@10.6:11.0", when="@0.2.1: +geant4")
depends_on("hepmc3", when="+hepmc3")
depends_on("root", when="+root")
depends_on("swig", when="+swig")
@@ -68,6 +95,7 @@ class Celeritas(CMakePackage, CudaPackage, ROCmPackage):
depends_on("vecgeom +gdml@1.1.17:", when="+vecgeom")
depends_on("vecgeom +cuda", when="+vecgeom +cuda")
conflicts("cxxstd=14", when="@0.3:")
conflicts("+rocm", when="+cuda", msg="AMD and NVIDIA accelerators are incompatible")
conflicts("+rocm", when="+vecgeom", msg="HIP support is only available with ORANGE")
conflicts("^vecgeom+shared@1.2.0", when="+vecgeom +cuda")

View File

@@ -116,6 +116,7 @@ def setup_build_environment(self, env):
# internal Spack wrappers and fail.
env.set("CC_FOR_TARGET", self.compiler.cc)
env.set("CXX_FOR_TARGET", self.compiler.cxx)
env.set("GOMAXPROCS", make_jobs)
def setup_dependent_package(self, module, dependent_spec):
"""Called before go modules' install() methods.

View File

@@ -14,6 +14,7 @@ class Hdf5VolCache(CMakePackage):
maintainers("hyoklee", "lrknox")
version("default", branch="develop")
version("v1.1", tag="v1.1")
version("v1.0", tag="v1.0")
depends_on("hdf5-vol-async")

View File

@@ -0,0 +1,91 @@
From 411d62544717873432c49ef45c7cb99cc5de2fb8 Mon Sep 17 00:00:00 2001
From: "Mark W. Krentel" <krentel@rice.edu>
Date: Thu, 15 Dec 2022 16:43:43 -0600
Subject: [PATCH] Add a temporary hack to allow both ROCM 5.2/5.3 to build
cleanly.
There were some corner cases (build 5.3 pieces from spack and feed
into autotools) that didn't work. After the next release, I will want
to rework ROCM configure more extensively.
---
configure | 21 +++++++++++++--------
configure.ac | 17 +++++++++++------
2 files changed, 24 insertions(+), 14 deletions(-)
diff --git a/configure b/configure
index 1760e678e8..814376b3bd 100755
--- a/configure
+++ b/configure
@@ -23891,10 +23891,13 @@ $as_echo "$as_me: found $ROCM/rocprofiler/lib/librocprofiler64.so" >&6;}
fi
# HSA
- if test -f "$ROCM/include/hsa/hsa.h" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: found $ROCM/include/hsa/hsa.h" >&5
-$as_echo "$as_me: found $ROCM/include/hsa/hsa.h" >&6;}
- ROCM_HSA_IFLAGS="-I$ROCM/include/hsa"
+ # FIXME: as of rocm 5.2/5.3, this was not fully switched over,
+ # so temporarily use both paths.
+ if test -f "$ROCM/include/hsa/hsa.h" || test -f "$ROCM/include/hsa.h"
+ then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: found $ROCM: hsa.h" >&5
+$as_echo "$as_me: found $ROCM: hsa.h" >&6;}
+ ROCM_HSA_IFLAGS="-I$ROCM/include -I$ROCM/include/hsa"
ROCM_HSA_INC_MESG="$ROCM/hsa"
found=yes
fi
@@ -24020,10 +24023,12 @@ case "$ROCM_HSA" in
require_rocm=yes
found=no
- if test -f "$ROCM_HSA/include/hsa/hsa.h" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: found $ROCM_HSA/include/hsa/hsa.h" >&5
-$as_echo "$as_me: found $ROCM_HSA/include/hsa/hsa.h" >&6;}
- ROCM_HSA_IFLAGS="-I$ROCM_HSA/include/hsa"
+ # FIXME: again, temporarily use both paths
+ if test -f "$ROCM_HSA/include/hsa/hsa.h" || test -f "$ROCM_HSA/include/hsa.h"
+ then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: found $ROCM_HSA: hsa.h" >&5
+$as_echo "$as_me: found $ROCM_HSA: hsa.h" >&6;}
+ ROCM_HSA_IFLAGS="-I$ROCM_HSA/include -I$ROCM_HSA/include/hsa"
ROCM_HSA_INC_MESG="$ROCM_HSA"
found=yes
fi
diff --git a/configure.ac b/configure.ac
index a14b15835f..9d5ed46134 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4885,9 +4885,12 @@ case "$ROCM" in
fi
# HSA
- if test -f "$ROCM/include/hsa/hsa.h" ; then
- AC_MSG_NOTICE([found $ROCM/include/hsa/hsa.h])
- ROCM_HSA_IFLAGS="-I$ROCM/include/hsa"
+ # FIXME: as of rocm 5.2/5.3, this was not fully switched over,
+ # so temporarily use both paths.
+ if test -f "$ROCM/include/hsa/hsa.h" || test -f "$ROCM/include/hsa.h"
+ then
+ AC_MSG_NOTICE([found $ROCM: hsa.h])
+ ROCM_HSA_IFLAGS="-I$ROCM/include -I$ROCM/include/hsa"
ROCM_HSA_INC_MESG="$ROCM/hsa"
found=yes
fi
@@ -5002,9 +5005,11 @@ case "$ROCM_HSA" in
require_rocm=yes
found=no
- if test -f "$ROCM_HSA/include/hsa/hsa.h" ; then
- AC_MSG_NOTICE([found $ROCM_HSA/include/hsa/hsa.h])
- ROCM_HSA_IFLAGS="-I$ROCM_HSA/include/hsa"
+ # FIXME: again, temporarily use both paths
+ if test -f "$ROCM_HSA/include/hsa/hsa.h" || test -f "$ROCM_HSA/include/hsa.h"
+ then
+ AC_MSG_NOTICE([found $ROCM_HSA: hsa.h])
+ ROCM_HSA_IFLAGS="-I$ROCM_HSA/include -I$ROCM_HSA/include/hsa"
ROCM_HSA_INC_MESG="$ROCM_HSA"
found=yes
fi
--
GitLab

View File

@@ -0,0 +1,130 @@
From 511afd95b01d743edc5940c84e0079f462b2c23e Mon Sep 17 00:00:00 2001
From: "Mark W. Krentel" <krentel@rice.edu>
Date: Tue, 18 May 2021 14:54:41 -0500
Subject: [PATCH] Cleanup some usage for gcc/g++ 11.x (#413)
1. Change epsilon to hpc_epsilon in prof/Metric header files. This
conflicted with using epsilon in some STL template libraries.
2. Add const to some comparison operators that are used in some STL
maps.
---
src/lib/banal/Struct-Inline.hpp | 6 +++---
src/lib/prof/Metric-AExpr.cpp | 4 ++--
src/lib/prof/Metric-AExpr.hpp | 2 +-
src/lib/prof/Metric-AExprIncr.hpp | 6 +++---
src/lib/support/StringTable.hpp | 2 +-
5 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/lib/banal/Struct-Inline.hpp b/src/lib/banal/Struct-Inline.hpp
index ffb93355fd..0099ad112d 100644
--- a/src/lib/banal/Struct-Inline.hpp
+++ b/src/lib/banal/Struct-Inline.hpp
@@ -150,14 +150,14 @@ public:
pretty_index = strTab.str2index(node.getPrettyName());
}
- bool operator == (const FLPIndex rhs)
+ bool operator == (const FLPIndex rhs) const
{
return file_index == rhs.file_index
&& line_num == rhs.line_num
&& pretty_index == rhs.pretty_index;
}
- bool operator != (const FLPIndex rhs)
+ bool operator != (const FLPIndex rhs) const
{
return ! (*this == rhs);
}
@@ -167,7 +167,7 @@ public:
// Compare (file, line, proc) indices lexigraphically.
class FLPCompare {
public:
- bool operator() (const FLPIndex t1, const FLPIndex t2)
+ bool operator() (const FLPIndex t1, const FLPIndex t2) const
{
if (t1.file_index < t2.file_index) { return true; }
if (t1.file_index > t2.file_index) { return false; }
diff --git a/src/lib/prof/Metric-AExpr.cpp b/src/lib/prof/Metric-AExpr.cpp
index 2ce43e6d39..5b32ff67d1 100644
--- a/src/lib/prof/Metric-AExpr.cpp
+++ b/src/lib/prof/Metric-AExpr.cpp
@@ -483,7 +483,7 @@ CoefVar::eval(const Metric::IData& mdata) const
double sdev = sqrt(v_m.first); // always non-negative
double mean = v_m.second;
double z = 0.0;
- if (mean > epsilon) {
+ if (mean > hpc_epsilon) {
z = sdev / mean;
}
@@ -522,7 +522,7 @@ RStdDev::eval(const Metric::IData& mdata) const
double sdev = sqrt(v_m.first); // always non-negative
double mean = v_m.second;
double z = 0.0;
- if (mean > epsilon) {
+ if (mean > hpc_epsilon) {
z = (sdev / mean) * 100;
}
diff --git a/src/lib/prof/Metric-AExpr.hpp b/src/lib/prof/Metric-AExpr.hpp
index 56359cc9df..d75189f763 100644
--- a/src/lib/prof/Metric-AExpr.hpp
+++ b/src/lib/prof/Metric-AExpr.hpp
@@ -97,7 +97,7 @@
//****************************************************************************
-#define epsilon (0.000001)
+#define hpc_epsilon (0.000001)
namespace Prof {
diff --git a/src/lib/prof/Metric-AExprIncr.hpp b/src/lib/prof/Metric-AExprIncr.hpp
index f1b38d7f74..d0c0feb7e6 100644
--- a/src/lib/prof/Metric-AExprIncr.hpp
+++ b/src/lib/prof/Metric-AExprIncr.hpp
@@ -97,7 +97,7 @@
//****************************************************************************
-#define epsilon (0.000001)
+#define hpc_epsilon (0.000001)
namespace Prof {
@@ -841,7 +841,7 @@ public:
double sdev = finalizeStdDev(mdata);
double mean = accumVar(1, mdata);
double z = 0.0;
- if (mean > epsilon) {
+ if (mean > hpc_epsilon) {
z = sdev / mean;
}
accumVar(0, mdata) = z;
@@ -927,7 +927,7 @@ public:
double sdev = finalizeStdDev(mdata);
double mean = accumVar(1, mdata);
double z = 0.0;
- if (mean > epsilon) {
+ if (mean > hpc_epsilon) {
z = (sdev / mean) * 100;
}
accumVar(0, mdata) = z;
diff --git a/src/lib/support/StringTable.hpp b/src/lib/support/StringTable.hpp
index 9930bc5649..36ce5b7fa9 100644
--- a/src/lib/support/StringTable.hpp
+++ b/src/lib/support/StringTable.hpp
@@ -75,7 +75,7 @@ namespace HPC {
// compare the strings, not the pointers
class StringCompare {
public:
- bool operator() (const std::string *s1, const std::string *s2)
+ bool operator() (const std::string *s1, const std::string *s2) const
{
return *s1 < *s2;
}
--
GitLab

View File

@@ -162,17 +162,11 @@ class Hpctoolkit(AutotoolsPackage):
# Fix the build for old revs with gcc 10.x.
patch("gcc10-enum.patch", when="@2020.01.01:2020.08 %gcc@10.0:")
patch(
"https://gitlab.com/hpctoolkit/hpctoolkit/-/commit/511afd95b01d743edc5940c84e0079f462b2c23e.patch",
sha256="8da18df88a80847c092da8d0892de51ea2bf2523124148b6305ab8717707d897",
when="@2019.08.01:2021.03 %gcc@11.0:",
)
patch("511afd95b01d743edc5940c84e0079f462b2c23e.patch", when="@2019.08.01:2021.03 %gcc@11.0:")
# Update configure for rocm 5.3.0
patch(
"https://gitlab.com/hpctoolkit/hpctoolkit/-/commit/411d62544717873432c49ef45c7cb99cc5de2fb8.patch",
sha256="484045891a665cdba3b0f141540c89f0d691ed32c5912ef62a93670d44c2786c",
when="@2022.04:2022.10 +rocm ^hip@5.3.0:",
"411d62544717873432c49ef45c7cb99cc5de2fb8.patch", when="@2022.04:2022.10 +rocm ^hip@5.3.0:"
)
# Change python to python3 for some old revs that use a script

View File

@@ -31,6 +31,8 @@ class Ompss2(Package):
depends_on("python", type="build")
depends_on("cmake", type="build")
depends_on("extrae", when="+extrae")
depends_on("boost@1.59.0:")
depends_on("numactl")
resource(
name="jemalloc",
@@ -105,6 +107,8 @@ def install_nanos6(self, spec, prefix):
"--prefix=%s" % prefix,
"--with-jemalloc=%s" % prefix,
"--with-hwloc=%s" % spec["hwloc"].prefix,
"--with-boost=%s" % spec["boost"].prefix,
"--with-libnuma=%s" % spec["numactl"].prefix,
"--disable-stats-instrumentation",
"--disable-verbose-instrumentation",
"--disable-lint-instrumentation",

View File

@@ -42,10 +42,13 @@ class Openmpi(AutotoolsPackage, CudaPackage):
# Current
version(
"4.1.4", sha256="92912e175fd1234368c8730c03f4996fe5942e7479bb1d10059405e7f2b3930d"
) # libmpi.so.40.30.4
"4.1.5", sha256="a640986bc257389dd379886fdae6264c8cfa56bc98b71ce3ae3dfbd8ce61dbe3"
) # libmpi.so.40.30.5
# Still supported
version(
"4.1.4", sha256="92912e175fd1234368c8730c03f4996fe5942e7479bb1d10059405e7f2b3930d"
) # libmpi.so.40.30.4
version(
"4.1.3", sha256="3d81d04c54efb55d3871a465ffb098d8d72c1f48ff1cbaf2580eb058567c0a3b"
) # libmpi.so.40.30.3

View File

@@ -0,0 +1,21 @@
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class PyNbqa(PythonPackage):
"""Run any standard Python code quality tool on a Jupyter Notebook."""
homepage = "https://github.com/nbQA-dev/nbQA"
pypi = "nbqa/nbqa-1.6.3.tar.gz"
version("1.6.3", sha256="5394a29fc6d27b9a950c0a36d2d9de25de980be9acfe2a3f3aea0d27b5f7fec1")
depends_on("python@3.8:", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-ipython@7.8:", type=("build", "run"))
depends_on("py-tokenize-rt@3.2:", type=("build", "run"))
depends_on("py-tomli", type=("build", "run"))

View File

@@ -18,7 +18,7 @@ class PyWarpx(PythonPackage):
"""
homepage = "https://ecp-warpx.github.io"
url = "https://github.com/ECP-WarpX/WarpX/archive/refs/tags/23.01.tar.gz"
url = "https://github.com/ECP-WarpX/WarpX/archive/refs/tags/23.02.tar.gz"
git = "https://github.com/ECP-WarpX/WarpX.git"
maintainers("ax3l", "dpgrote", "RemiLehe")
@@ -27,6 +27,7 @@ class PyWarpx(PythonPackage):
# NOTE: if you update the versions here, also see warpx
version("develop", branch="development")
version("23.02", sha256="a6c63ebc38cbd224422259a814be501ac79a3b734dab7f59500b6957cddaaac1")
version("23.01", sha256="e853d01c20ea00c8ddedfa82a31a11d9d91a7f418d37d7f064cf8a241ea4da0c")
version("22.12", sha256="96019902cd6ea444a1ae515e8853048e9074822c168021e4ec1687adc72ef062")
version("22.11", sha256="528f65958f2f9e60a094e54eede698e871ccefc89fa103fe2a6f22e4a059515e")
@@ -53,6 +54,7 @@ class PyWarpx(PythonPackage):
variant("mpi", default=True, description="Enable MPI support")
for v in [
"23.02",
"23.01",
"22.12",
"22.11",

View File

@@ -0,0 +1,27 @@
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class RArrangements(RPackage):
"""Fast Generators and Iterators for Permutations, Combinations, Integer
Partitions and Compositions.
Fast generators and iterators for permutations, combinations, integer
partitions and compositions. The arrangements are in lexicographical order
and generated iteratively in a memory efficient manner. It has been
demonstrated that 'arrangements' outperforms most existing packages of
similar kind. Benchmarks could be found at
<https://randy3k.github.io/arrangements/articles/benchmark.html>."""
cran = "arrangements"
version("1.1.9", sha256="e9b5dcb185ec9b28201b196384b04a8d5a15f4ddb9e0b0b2a0c718635ff7345b")
depends_on("r@3.4.0:", type=("build", "run"))
depends_on("r-gmp", type=("build", "run"))
depends_on("r-r6", type=("build", "run"))
depends_on("gmp@4.2.3:")

View File

@@ -0,0 +1,28 @@
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class RGoogleauthr(RPackage):
"""Authenticate and Create Google APIs.
Create R functions that interact with OAuth2 Google APIs
<https://developers.google.com/apis-explorer/> easily, with auto-refresh
and Shiny compatibility."""
cran = "googleAuthR"
version("2.0.0", sha256="ba504baf3bde2e1b3e988bee7602df5765cc6ca542cf0ab76a782c4e60966feb")
depends_on("r@3.3.0:", type=("build", "run"))
depends_on("r-assertthat", type=("build", "run"))
depends_on("r-cli", type=("build", "run"))
depends_on("r-digest", type=("build", "run"))
depends_on("r-gargle@1.2.0:", type=("build", "run"))
depends_on("r-httr@1.4.0:", type=("build", "run"))
depends_on("r-jsonlite@1.6:", type=("build", "run"))
depends_on("r-memoise@1.1.0:", type=("build", "run"))
depends_on("r-rlang", type=("build", "run"))

View File

@@ -0,0 +1,26 @@
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class RIeugwasr(RPackage):
"""R Interface to the OpenGWAS Database API.
R interface to the OpenGWAS database API. Includes a wrapper
to make generic calls to the API, plus convenience functions for
specific queries."""
homepage = "https://github.com/MRCIEU/ieugwasr"
url = "https://github.com/MRCIEU/ieugwasr/archive/refs/tags/0.1.5.tar.gz"
version("0.1.5", sha256="8d900d5a780f23836c80191f9635fbf48a0ca94f828452948c0f445e3217f422")
depends_on("r@3.6.0:", type=("build", "run"))
depends_on("r-magrittr", type=("build", "run"))
depends_on("r-googleauthr", type=("build", "run"))
depends_on("r-dplyr", type=("build", "run"))
depends_on("r-httr", type=("build", "run"))
depends_on("r-jsonlite", type=("build", "run"))

View File

@@ -0,0 +1,29 @@
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class RIterpc(RPackage):
"""Efficient Iterator for Permutations and Combinations.
Iterator for generating permutations and combinations. They can be either
drawn with or without replacement, or with distinct/ non-distinct items
(multiset). The generated sequences are in lexicographical order
(dictionary order). The algorithms to generate permutations and
combinations are memory efficient. These iterative algorithms enable users
to process all sequences without putting all results in the memory at the
same time. The algorithms are written in C/C++ for faster performance.
Note: 'iterpc' is no longer being maintained. Users are recommended to
switch to 'arrangements'."""
cran = "iterpc"
version("0.4.2", sha256="38bd464042a27536f676e889263eb2c257a431b59083f58cb54473f42ba2071b")
depends_on("r@3.0.0:", type=("build", "run"))
depends_on("r-iterators", type=("build", "run"))
depends_on("r-gmp@0.5-12:", type=("build", "run"))
depends_on("r-arrangements@1.0.0:", type=("build", "run"))

View File

@@ -0,0 +1,32 @@
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class RMendelianrandomization(RPackage):
"""Mendelian Randomization Package.
Encodes several methods for performing Mendelian randomization analyses
with summarized data. Summarized data on genetic associations with the
exposure and with the outcome can be obtained from large consortia. These
data can be used for obtaining causal estimates using instrumental variable
methods."""
cran = "MendelianRandomization"
version("0.7.0", sha256="cad7cc1b6964fc7d299864378694c5fd947caa83796a1958e581299796b854c7")
depends_on("r@3.0.1:", type=("build", "run"))
depends_on("r-knitr", type=("build", "run"))
depends_on("r-rmarkdown", type=("build", "run"))
depends_on("r-plotly@3.6.0:", type=("build", "run"))
depends_on("r-ggplot2@1.0.1:", type=("build", "run"))
depends_on("r-robustbase@0.92-6:", type=("build", "run"))
depends_on("r-matrix@1.2:", type=("build", "run"))
depends_on("r-iterpc@0.3:", type=("build", "run"))
depends_on("r-quantreg@5.01:", type=("build", "run"))
depends_on("r-rjson", type=("build", "run"))
depends_on("r-glmnet", type=("build", "run"))

View File

@@ -0,0 +1,33 @@
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class RMeta(RPackage):
"""General Package for Meta-Analysis.
User-friendly general package providing standard methods for meta-analysis
and supporting Schwarzer, Carpenter, and Rücker
<doi:10.1007/978-3-319-21416-0>, "Meta-Analysis with R" (2015): - common
effect and random effects meta-analysis; - several plots (forest, funnel,
Galbraith / radial, L'Abbe, Baujat, bubble); - three-level meta-analysis
model; - generalised linear mixed model; - Hartung-Knapp method for random
effects model; - Kenward-Roger method for random effects model; -
prediction interval; - statistical tests for funnel plot asymmetry; -
trim-and-fill method to evaluate bias in meta-analysis; - meta-regression;
- cumulative meta-analysis and leave-one-out meta-analysis; - import data
from 'RevMan 5'; - produce forest plot summarising several (subgroup)
meta-analyses."""
cran = "meta"
version("6.2-0", sha256="8ec8fb412996bbe17d3ca073f15c191a77bad486b08f39d7b8c2d07360ad5781")
depends_on("r@4.0.0:", type=("build", "run"))
depends_on("r-metafor@3.0-0:", type=("build", "run"))
depends_on("r-lme4", type=("build", "run"))
depends_on("r-compquadform", type=("build", "run"))
depends_on("r-xml2", type=("build", "run"))

View File

@@ -0,0 +1,21 @@
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class RMetadat(RPackage):
"""Meta-Analysis Datasets.
A collection of meta-analysis datasets for teaching purposes,
illustrating/testing meta-analytic methods, and validating published
analyses."""
cran = "metadat"
version("1.2-0", sha256="f0cce5e30c3d256eaf5a41e4f52ffc7108e195016a4b99409e0ab4c2ef58f5b8")
depends_on("r@4.0.0:", type=("build", "run"))
depends_on("r-mathjaxr", type=("build", "run"))

View File

@@ -0,0 +1,39 @@
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class RMetafor(RPackage):
"""Meta-Analysis Package for R.
A comprehensive collection of functions for conducting meta-analyses in R.
The package includes functions to calculate various effect sizes or outcome
measures, fit equal-, fixed-, random-, and mixed-effects models to such
data, carry out moderator and meta-regression analyses, and create various
types of meta-analytical plots (e.g., forest, funnel, radial, L'Abbe,
Baujat, bubble, and GOSH plots). For meta-analyses of binomial and
person-time data, the package also provides functions that implement
specialized methods, including the Mantel-Haenszel method, Peto's method,
and a variety of suitable generalized linear (mixed-effects) models (i.e.,
mixed-effects logistic and Poisson regression models). Finally, the package
provides functionality for fitting meta-analytic multivariate/multilevel
models that account for non-independent sampling errors and/or true effects
(e.g., due to the inclusion of multiple treatment studies, multiple
endpoints, or other forms of clustering). Network meta-analyses and
meta-analyses accounting for known correlation structures (e.g., due to
phylogenetic relatedness) can also be conducted. An introduction to the
package can be found in Viechtbauer (2010) <doi:10.18637/jss.v036.i03>."""
cran = "metafor"
version("3.8-1", sha256="d694577f954144d8a5eeab6521fe1c87e68ddf9ecfd7ccc915d01533371b0514")
depends_on("r@4.0.0:", type=("build", "run"))
depends_on("r-matrix", type=("build", "run"))
depends_on("r-metadat", type=("build", "run"))
depends_on("r-nlme", type=("build", "run"))
depends_on("r-mathjaxr", type=("build", "run"))
depends_on("r-pbapply", type=("build", "run"))

View File

@@ -0,0 +1,24 @@
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class RMrRaps(RPackage):
"""Two Sample Mendelian Randomization using Robust Adjusted Profile Score.
Mendelian randomization is a method of identifying and estimating a
confounded causal effect using genetic instrumental variables. This
packages implements methods for two-sample Mendelian randomization with
summary statistics by using Robust Adjusted Profile Score (RAPS).
References: Qingyuan Zhao, Jingshu Wang, Jack Bowden, Dylan S. Small.
Statistical inference in two-sample summary-data Mendelian randomization
using robust adjusted profile score. <arXiv:1801.09652>."""
cran = "mr.raps"
version("0.2", sha256="c899f6143dac99e1232ff0a8d9f5fe099d4f69960782e6843db5b0d7f4f63b19")
depends_on("r-nortest", type=("build", "run"))

View File

@@ -0,0 +1,19 @@
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class RMrinstruments(RPackage):
"""Data sources for genetic instruments to be used in MR.
Datasets of eQTLs, GWAS catalogs, etc."""
homepage = "https://github.com/MRCIEU/MRInstruments"
url = "https://github.com/MRCIEU/MRInstruments/archive/refs/tags/0.3.3.tar.gz"
version("0.3.3", sha256="4ddbaf6335133e8f7baef469d6bc1f89212462b9f4062c9e4ddda37b12eb3486")
depends_on("r@2.10:", type=("build", "run"))

View File

@@ -0,0 +1,18 @@
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class RMrmix(RPackage):
"""Mendelian Randomization Analysis Using Mixture Models (MRMix).
This package gives robust estimation of causal effects by conducting
Mendelian randomization analysis using a mixture model approach."""
homepage = "https://github.com/gqi/MRMix"
git = "https://github.com/gqi/MRMix"
version("0.1.0", commit="56afdb2bc96760842405396f5d3f02e60e305039")

View File

@@ -0,0 +1,21 @@
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class RMrpresso(RPackage):
"""Performs the Mendelian Randomization Pleiotropy RESidual Sum and Outlier
(MR-PRESSO) test.
MR-PRESSO (Mendelian Randomization Pleiotropy RESidual Sum and Outlier) is
a framework that allows for the evaluation of pleiotropy in
multi-instrument Mendelian Randomization utilizing genome-wide summary
association statistics."""
homepage = "https://github.com/rondolab/MR-PRESSO"
git = "https://github.com/rondolab/MR-PRESSO"
version("1.0", commit="cece763b47e59763a7916974de43c7cb93843e41")

View File

@@ -0,0 +1,23 @@
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class RRadialmr(RPackage):
"""RadialMR.
A package for implementing radial inverse variance weighted and MR-Egger
methods."""
homepage = "https://github.com/WSpiller/RadialMR"
git = "https://github.com/WSpiller/RadialMR"
version("1.0", commit="d63d3fc8270836ab441b9e14a5ba3eeb2795d7cb")
depends_on("r@3.5.0:", type=("build", "run"))
depends_on("r-ggplot2", type=("build", "run"))
depends_on("r-magrittr", type=("build", "run"))
depends_on("r-plotly", type=("build", "run"))

View File

@@ -0,0 +1,51 @@
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class RTwosamplemr(RPackage):
"""Two Sample MR functions and interface to MR Base database.
A package for performing Mendelian randomization using GWAS summary data.
It uses the IEU GWAS database to obtain data automatically, and a wide
range of methods to run the analysis. You can use the MR-Base web app to
try out a limited range of the functionality in this package, but for any
serious work we strongly recommend using this R package."""
homepage = "https://mrcieu.github.io/TwoSampleMR/"
url = "https://github.com/MRCIEU/TwoSampleMR/archive/refs/tags/v0.5.6.tar.gz"
version("0.5.6", sha256="c63eb008ab7ed08a6f30ccbf0c299beb31b2f5835e5e2aa1b59c5e4fe284a30c")
depends_on("r@3.6.0:", type=("build", "run"))
depends_on("r-ieugwasr@0.1.5:", type=("build", "run"))
depends_on("r-ggplot2", type=("build", "run"))
depends_on("r-gridextra", type=("build", "run"))
depends_on("r-cowplot", type=("build", "run"))
depends_on("r-plyr", type=("build", "run"))
depends_on("r-reshape2", type=("build", "run"))
depends_on("r-stringr", type=("build", "run"))
depends_on("r-knitr", type=("build", "run"))
depends_on("r-markdown", type=("build", "run"))
depends_on("r-gtable", type=("build", "run"))
depends_on("r-rmarkdown", type=("build", "run"))
depends_on("r-mendelianrandomization", type=("build", "run"))
depends_on("r-dplyr", type=("build", "run"))
depends_on("r-mr-raps", type=("build", "run"))
depends_on("r-psych", type=("build", "run"))
depends_on("r-magrittr", type=("build", "run"))
depends_on("r-car", type=("build", "run"))
depends_on("r-randomforest", type=("build", "run"))
depends_on("r-meta", type=("build", "run"))
depends_on("r-data-table", type=("build", "run"))
depends_on("r-mrpresso", type=("build", "run"))
depends_on("r-mrinstruments", type=("build", "run"))
depends_on("r-radialmr", type=("build", "run"))
depends_on("r-mrmix", type=("build", "run"))
depends_on("r-glmnet", type=("build", "run"))
depends_on("r-lattice", type=("build", "run"))
depends_on("r-pbapply", type=("build", "run"))
depends_on("r-mass", type=("build", "run"))

View File

@@ -17,7 +17,7 @@ class Warpx(CMakePackage):
"""
homepage = "https://ecp-warpx.github.io"
url = "https://github.com/ECP-WarpX/WarpX/archive/refs/tags/23.01.tar.gz"
url = "https://github.com/ECP-WarpX/WarpX/archive/refs/tags/23.02.tar.gz"
git = "https://github.com/ECP-WarpX/WarpX.git"
maintainers("ax3l", "dpgrote", "MaxThevenet", "RemiLehe")
@@ -25,6 +25,7 @@ class Warpx(CMakePackage):
# NOTE: if you update the versions here, also see py-warpx
version("develop", branch="development")
version("23.02", sha256="a6c63ebc38cbd224422259a814be501ac79a3b734dab7f59500b6957cddaaac1")
version("23.01", sha256="e853d01c20ea00c8ddedfa82a31a11d9d91a7f418d37d7f064cf8a241ea4da0c")
version("22.12", sha256="96019902cd6ea444a1ae515e8853048e9074822c168021e4ec1687adc72ef062")
version("22.11", sha256="528f65958f2f9e60a094e54eede698e871ccefc89fa103fe2a6f22e4a059515e")