summaryrefslogtreecommitdiff
path: root/pyproject.toml
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2022-05-27 03:18:20 -0700
committerGitHub <noreply@github.com>2022-05-27 03:18:20 -0700
commita3a8710cbe1a1be5ba5cb8762667657b8db0a940 (patch)
treed007628e8468541f80951957e2b5c63537e32554 /pyproject.toml
parent0bf3a9c2afa149d9dee9cd1adc0604cf65a442cf (diff)
downloadspack-a3a8710cbe1a1be5ba5cb8762667657b8db0a940.tar.gz
spack-a3a8710cbe1a1be5ba5cb8762667657b8db0a940.tar.bz2
spack-a3a8710cbe1a1be5ba5cb8762667657b8db0a940.tar.xz
spack-a3a8710cbe1a1be5ba5cb8762667657b8db0a940.zip
Python: fix clingo bootstrapping on Apple M1 (#30834)
This PR fixes several issues I noticed while trying to get Spack working on Apple M1. - [x] `build_environment.py` attempts to add `spec['foo'].libs` and `spec['foo'].headers` to our compiler wrappers for all dependencies using a try-except that ignores `NoLibrariesError` and `NoHeadersError` respectively. However, The `libs` and `headers` attributes of the Python package were erroneously using `RuntimeError` instead. - [x] `spack external find python` (used during bootstrapping) currently has no way to determine whether or not an installation is `+shared`, so previously we would only search for static Python libs. However, most distributions including XCode/Conda/Intel ship shared Python libs. I updated `libs` to search for both shared and static (order based on variant) as a fallback. - [x] The `headers` attribute was recursively searching in `prefix.include` for `pyconfig.h`, but this could lead to non-deterministic behavior if multiple versions of Python are installed and `pyconfig.h` files exist in multiple `<prefix>/include/pythonX.Y` locations. It's safer to search in `sysconfig.get_path('include')` instead. - [x] The Python installation that comes with XCode is broken, and `sysconfig.get_paths` is hard-coded to return specific directories. This meant that our logic for `platlib`/`purelib`/`include` where we replace `platbase`/`base`/`installed_base` with `prefix` wasn't working and the `mkdirp` in `setup_dependent_package` was trying to create a directory in root, giving permissions issues. Even if you commented out those `mkdirp` calls, Spack would add the wrong directories to `PYTHONPATH`. Added a fallback hard-coded to `lib/pythonX.Y/site-packages` if sysconfig is broken (this is what distutils always did).
Diffstat (limited to 'pyproject.toml')
0 files changed, 0 insertions, 0 deletions