spack/lib/spack
Massimiliano Culpo 13fed376f2 Import hooks using Python's built-in machinery (#23288)
The function we coded in Spack to load Python modules with arbitrary
names from a file seem to have issues with local imports. For
loading hooks though it is unnecessary to use such functions, since
we don't care to bind a custom name to a module nor we have to load
it from an unknown location.

This PR thus modifies spack.hook in the following ways:

- Use __import__ instead of spack.util.imp.load_source (this
  addresses #20005)
- Sync module docstring with all the hooks we have
- Avoid using memoization in a module function
- Marked with a leading underscore all the names that are supposed
  to stay local
2021-05-22 11:51:21 -07:00
..
docs Bootstrap clingo from sources (#21446) 2021-05-22 11:50:59 -07:00
env Support parallel environment builds (#18131) 2020-11-17 02:41:07 -08:00
external Python 3.10 support: collections.abc (#20441) 2021-05-21 14:55:18 +02:00
llnl Python 3.10 support: collections.abc (#20441) 2021-05-21 14:55:18 +02:00
spack Import hooks using Python's built-in machinery (#23288) 2021-05-22 11:51:21 -07:00