summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2023-01-19 09:08:39 -0600
committerGitHub <noreply@github.com>2023-01-19 07:08:39 -0800
commitd0c1b7a14e7d3107da0e6a9c81668fb2627069cd (patch)
treeaad711365e523284f34dbd2cb1e07fbd60321ba3 /var
parent45ea7c19e5c6e9245a32a599a96bd4ded51e03f9 (diff)
downloadspack-d0c1b7a14e7d3107da0e6a9c81668fb2627069cd.tar.gz
spack-d0c1b7a14e7d3107da0e6a9c81668fb2627069cd.tar.bz2
spack-d0c1b7a14e7d3107da0e6a9c81668fb2627069cd.tar.xz
spack-d0c1b7a14e7d3107da0e6a9c81668fb2627069cd.zip
python: remove `CPATH` from `setup_run_environment` (#34727)
Currently, the `python` package tries to set `CPATH` in `setup_run_environment()`. We no longer set `CPATH` and other destructive environment variables (like `LD_LIBRARY_PATH`) in modules, so we shouldn't do something special for Python. Also, the way `python` sets `CPATH` causes issues. Because it does a header search to find directories containing headers, if you bootstrap `mypy` or other style tools on a fresh Ubuntu image with *no* python devel headers installed, you'll get an error like this when trying to load the thing you just installed: ```console [root@980de539843d /]# spack -b load py-mypy ==> Error: Unable to locate python headers in any of these locations: /usr/include/python3.6m /usr/include/3.6 /usr/Headers ``` The headers and includes aren't needed to get `mypy` in the path or for `mypy` to work, so we're failing unnecessarily here. - [x] remove `setup_run_environment()` from `python/package.py`
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/python/package.py3
1 files changed, 0 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py
index 8d2f216f0a..1cd5845cde 100644
--- a/var/spack/repos/builtin/packages/python/package.py
+++ b/var/spack/repos/builtin/packages/python/package.py
@@ -1048,9 +1048,6 @@ print(json.dumps(config))
return path.replace(prefix, "")
return os.path.join("include", "python{}".format(self.version.up_to(2)))
- def setup_run_environment(self, env):
- env.prepend_path("CPATH", os.pathsep.join(self.spec["python"].headers.directories))
-
def setup_dependent_build_environment(self, env, dependent_spec):
"""Set PYTHONPATH to include the site-packages directory for the
extension and any other python extensions it depends on.