Skip to content

Commit

Permalink
Mac OS UUID virtual: platform-specific virtuals not correctly priorit…
Browse files Browse the repository at this point in the history
…ized (spack#43002)

`apple-libuuid` includes types that aren't available in other `uuid`
providers; this cause issues in consuming packages (e.g., py-matplotlib)
that use SDKs like CarbonCore.framework when they attempt to use
`util-linux-uuid` as a `uuid` provider on Mac OS.

Tweak `util-linux-uuid` to indicate that it does not provide `uuid`
on Mac OS.
  • Loading branch information
Chrismarsh authored Jul 30, 2024
1 parent e563f84 commit 65a15c6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion var/spack/repos/builtin/packages/libuuid/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

import sys

from spack.package import *


Expand All @@ -20,6 +22,7 @@ class Libuuid(AutotoolsPackage, SourceforgePackage):

depends_on("c", type="build") # generated

provides("uuid")
if sys.platform not in ["darwin", "win32"]:
provides("uuid")

conflicts("%gcc@14:")
5 changes: 4 additions & 1 deletion var/spack/repos/builtin/packages/ossp-uuid/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

import sys

from spack.package import *


Expand All @@ -22,7 +24,8 @@ class OsspUuid(AutotoolsPackage):
depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated

provides("uuid")
if sys.platform not in ["darwin", "win32"]:
provides("uuid")

@property
def libs(self):
Expand Down
5 changes: 4 additions & 1 deletion var/spack/repos/builtin/packages/util-linux-uuid/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

import sys

from spack.package import *


Expand All @@ -29,7 +31,8 @@ class UtilLinuxUuid(AutotoolsPackage):

depends_on("pkgconfig", type="build")

provides("uuid")
if sys.platform not in ["darwin", "win32"]:
provides("uuid")

def url_for_version(self, version):
url = "https://www.kernel.org/pub/linux/utils/util-linux/v{0}/util-linux-{1}.tar.gz"
Expand Down

0 comments on commit 65a15c6

Please sign in to comment.