Add function to determine Linux kernel version (#27855)
This reports the kernel version (vs. the distro version) on Linux and returns a valid Version (stripping characters like '+' which may be present for custom-built kernels).
This commit is contained in:
@@ -10,10 +10,11 @@
|
||||
import llnl.util.tty as tty
|
||||
|
||||
from spack import *
|
||||
from spack.operating_systems.linux_distro import kernel_version
|
||||
from spack.operating_systems.mac_os import macos_version
|
||||
|
||||
MACOS_VERSION = macos_version() if sys.platform == 'darwin' else None
|
||||
LINUX_VERSION = Version(platform.release()) if platform.system() == 'Linux' else None
|
||||
LINUX_VERSION = kernel_version() if platform.system() == 'Linux' else None
|
||||
|
||||
|
||||
class Qt(Package):
|
||||
|
Reference in New Issue
Block a user