summaryrefslogtreecommitdiff
path: root/.dockerignore
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2022-05-27 03:18:20 -0700
committerMassimiliano Culpo <massimiliano.culpo@gmail.com>2022-07-20 08:10:41 +0200
commit4866c587e61e031dd91ffe05cecb020eeaa0a864 (patch)
tree9387877be13cc58a1124a7f38f2dcc9a612cf5a6 /.dockerignore
parentc09bf37ff690c29779a342670cf8a171ad1b9233 (diff)
downloadspack-4866c587e61e031dd91ffe05cecb020eeaa0a864.tar.gz
spack-4866c587e61e031dd91ffe05cecb020eeaa0a864.tar.bz2
spack-4866c587e61e031dd91ffe05cecb020eeaa0a864.tar.xz
spack-4866c587e61e031dd91ffe05cecb020eeaa0a864.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 '.dockerignore')
0 files changed, 0 insertions, 0 deletions