diff options
author | Harmen Stoppels <me@harmenstoppels.nl> | 2023-12-13 23:54:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-13 23:54:28 +0100 |
commit | 80f31829a8aaa6cd71b62e3926c9336f239204ac (patch) | |
tree | 5f77a9cafa00dc00858090aaf63af604b54323cf | |
parent | 84436f10bada643d3f9b617cb992d2b0ecef7fda (diff) | |
download | spack-80f31829a8aaa6cd71b62e3926c9336f239204ac.tar.gz spack-80f31829a8aaa6cd71b62e3926c9336f239204ac.tar.bz2 spack-80f31829a8aaa6cd71b62e3926c9336f239204ac.tar.xz spack-80f31829a8aaa6cd71b62e3926c9336f239204ac.zip |
python: don't run mkdirp in `setup_dependent_package` (#41603)
`setup_dependent_package` is not a build phase, it should just set
globals for a package.
It's called during setup of runtime environment of packages, and there
have been reports of it actually failing due to a read only file system
(not sure under what exact conditions that is possible).
-rw-r--r-- | var/spack/repos/builtin/packages/py-tensorflow/package.py | 2 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/python/package.py | 5 |
2 files changed, 2 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/py-tensorflow/package.py b/var/spack/repos/builtin/packages/py-tensorflow/package.py index c85f078689..13bbdf3a11 100644 --- a/var/spack/repos/builtin/packages/py-tensorflow/package.py +++ b/var/spack/repos/builtin/packages/py-tensorflow/package.py @@ -856,6 +856,8 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension): filter_file("build:opt --host_copt=-march=native", "", ".tf_configure.bazelrc") def build(self, spec, prefix): + # Bazel needs the directory to exist on install + mkdirp(python_platlib) tmp_path = env["TEST_TMPDIR"] # https://docs.bazel.build/versions/master/command-line-reference.html diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index 0f776fa780..8ef7613e19 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -1260,11 +1260,6 @@ print(json.dumps(config)) module.python_platlib = join_path(dependent_spec.prefix, self.platlib) module.python_purelib = join_path(dependent_spec.prefix, self.purelib) - # Make the site packages directory for extensions - if dependent_spec.package.is_extension: - mkdirp(module.python_platlib) - mkdirp(module.python_purelib) - def add_files_to_view(self, view, merge_map, skip_if_exists=True): bin_dir = self.spec.prefix.bin if sys.platform != "win32" else self.spec.prefix for src, dst in merge_map.items(): |