Fix for ESMF post_install on macOS (#36087)
This commit is contained in:
parent
09fd3e8e61
commit
97d6c741b0
1 changed files with 10 additions and 6 deletions
|
@ -4,6 +4,7 @@
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
from spack.build_environment import dso_suffix, stat_suffix
|
from spack.build_environment import dso_suffix, stat_suffix
|
||||||
from spack.package import *
|
from spack.package import *
|
||||||
|
@ -352,8 +353,11 @@ def setup_build_environment(self, env):
|
||||||
@run_after("install")
|
@run_after("install")
|
||||||
def post_install(self):
|
def post_install(self):
|
||||||
install_tree("cmake", self.prefix.cmake)
|
install_tree("cmake", self.prefix.cmake)
|
||||||
# Several applications using ESMF are affected by CMake capitalization
|
# Several applications using ESMF are affected by CMake
|
||||||
# issue. The following fix allows all apps to use as-is.
|
# capitalization issue. The following fix allows all apps
|
||||||
|
# to use as-is. Note that since the macOS file system is
|
||||||
|
# case-insensitive, this step is not allowed on macOS.
|
||||||
|
if sys.platform != "darwin":
|
||||||
for prefix in [dso_suffix, stat_suffix]:
|
for prefix in [dso_suffix, stat_suffix]:
|
||||||
library_path = os.path.join(self.prefix.lib, "libesmf.%s" % prefix)
|
library_path = os.path.join(self.prefix.lib, "libesmf.%s" % prefix)
|
||||||
if os.path.exists(library_path):
|
if os.path.exists(library_path):
|
||||||
|
|
Loading…
Reference in a new issue