init: move spack.repo global variable into its own module

- spack.repository module is now spack.repo

- `spack.repo` is now `spack.repo.path()` and loaded lazily

- Added `spack.repo.get()` and `spack.repo.all_package_names()` as
  convenience functions to simplify the new lazy interface.

- updated tests and code
This commit is contained in:
Todd Gamblin
2018-04-28 23:23:16 -07:00
committed by scheibelp
parent 2a09b627c9
commit c615d2be06
63 changed files with 257 additions and 233 deletions

View File

@@ -445,7 +445,7 @@ Spack repo namespaces are actually Python namespaces tacked on under
``spack.pkg``. The search semantics of ``repos.yaml`` are actually
implemented using Python's built-in `sys.path
<https://docs.python.org/2/library/sys.html#sys.path>`_ search. The
:py:mod:`spack.repository` module implements a custom `Python importer
:py:mod:`spack.repo` module implements a custom `Python importer
<https://docs.python.org/2/library/imp.html>`_.
.. warning::