spack/lib/spack/docs
scheibelp 3560f6dbe9 views: packages can customize how they're added to views (#7152)
Functional updates:

- `python` now creates a copy of the `python` binaries when it is added
  to a view

- Python extensions (packages which subclass `PythonPackage`) rewrite
  their shebang lines to refer to python in the view

- Python packages in the same namespace will not generate conflicts if
  both have `...lib/site-packages/namespace-example/__init__.py`

  - These `__init__` files will also remain when removing any package in
    the namespace until the last package in the namespace is removed


Generally (Updated 2/16):

- Any package can define `add_files_to_view` to customize how it is added
  to a view (and at the moment custom definitions are included for
  `python` and `PythonPackage`)

  - Likewise any package can define `remove_files_from_view` to customize
    which files are removed (e.g. you don't always want to remove the
    namespace `__init__`)

- Any package can define `view_file_conflicts` to customize what it
  considers a merge conflict

- Global activations are handled like views (where the view root is the
  spec prefix of the extendee)

  - Benefit: filesystem-management aspects of activating extensions are
    now placed in views (e.g. now one can hardlink a global activation)

  - Benefit: overriding `Package.activate` is more straightforward (see
    `Python.activate`)

  - Complication: extension packages which have special-purpose logic
    *only* when activated outside of the extendee prefix must check for
    this in their `add_files_to_view` method (see `PythonPackage`)

- `LinkTree` is refactored to have separate methods for copying a
  directory structure and for copying files (since it was found that
  generally packages may want to alter how files are copied but still
  wanted to copy directories in the same way)


TODOs (updated 2/20):

- [x] additional testing (there is some unit testing added at this point
  but more would be useful)

- [x] refactor or reorganize `LinkTree` methods: currently there is a
  separate set of methods for replicating just the directory structure
  without the files, and a set for replicating everything

- [x] Right now external views (i.e. those not used for global
  activations) call `view.add_extension`, but global activations do not
  to avoid some extra work that goes into maintaining external views. I'm
  not sure if addressing that needs to be done here but I'd like to
  clarify it in the comments (UPDATE: for now I have added a TODO and in
  my opinion this can be merged now and the refactor handled later)

- [x] Several method descriptions (e.g. for `Package.activate`) are out
  of date and reference a distinction between global activations and
  views, they need to be updated

- [x] Update aspell package activations
2018-06-26 16:14:05 -07:00
..
_gh_pages_redirect Make gh-pages redirect to readthedocs.io 2016-08-31 19:40:22 -07:00
_static make empty _static directory "exist" to git 2014-01-09 14:03:32 +01:00
tutorial Update copyright on LLNL files for 2018. (#7592) 2018-03-24 12:13:52 -07:00
.gitignore Speed up doc builds with spack list --format=html (#6945) 2018-01-16 00:12:11 -08:00
basic_usage.rst views: packages can customize how they're added to views (#7152) 2018-06-26 16:14:05 -07:00
binary_caches.rst Buildcache: symlinks, externals, & install-checking (#5894) 2017-10-26 11:06:59 -07:00
build_settings.rst Fix typos in External Packages documentation (#3168) 2017-02-17 11:49:55 -08:00
command_index.in Rework command reference in docs, add spack commands command 2018-02-12 20:25:17 -08:00
conf.py Allow docs to be built with Sphinx 1.7.1+ (#8500) 2018-06-18 17:17:21 -07:00
config_yaml.rst locks: add configuration and command-line options to enable/disable locks (#7692) 2018-05-18 14:41:03 -07:00
configuration.rst Add environment variables to path substitution 2017-08-21 18:35:00 -07:00
contribution_guide.rst docs: remove vendored sphinx_rtd_theme (#8496) 2018-06-17 01:13:56 -07:00
developer_guide.rst Remind developers to update tab completion script (#4148) 2017-05-05 18:52:28 -05:00
docker_for_developers.rst Docker-Based Developer Resource (#5871) 2018-02-27 00:36:14 -08:00
features.rst Parser fix (#2769) 2017-01-15 19:17:54 -08:00
getting_started.rst Add info about haveged to gpg/randomness note (#8227) 2018-05-21 15:57:03 -05:00
index.rst Docker-Based Developer Resource (#5871) 2018-02-27 00:36:14 -08:00
known_issues.rst Remove spack extensions from list of known issues (#6405) 2017-11-22 02:31:56 +01:00
Makefile Generate spack docset for Dash. (#6981) 2018-03-21 16:37:26 -05:00
mirrors.rst mirrors.yaml: does not expand ~ (#7631) 2018-03-28 14:30:18 -05:00
module_file_generation.svg SC17: reworked module file tutorial section (#5657) 2017-11-12 00:27:20 -08:00
module_file_support.rst refactor: move templates from root to share/spack 2018-06-24 16:38:36 -07:00
package_list.rst Speed up doc builds with spack list --format=html (#6945) 2018-01-16 00:12:11 -08:00
packaging_guide.rst views: packages can customize how they're added to views (#7152) 2018-06-26 16:14:05 -07:00
repositories.rst init: move spack.repo global variable into its own module 2018-05-17 14:10:30 -07:00
requirements.txt docs: remove vendored sphinx_rtd_theme (#8496) 2018-06-17 01:13:56 -07:00
tutorial_advanced_packaging.rst Update tutorial on advanced packaging (#7144) 2018-02-01 12:10:25 -08:00
tutorial_basics.rst Change location of public key in basic tutorial (#7192) 2018-02-07 08:45:29 -08:00
tutorial_buildsystems.rst Compiler flag handlers (#6415) 2017-12-20 15:40:38 -08:00
tutorial_configuration.rst improve Advanced Compiler Configuration part of tutorial (#8325) 2018-05-31 10:28:38 -07:00
tutorial_modules.rst refactor: move templates from root to share/spack 2018-06-24 16:38:36 -07:00
tutorial_packaging.rst Update packaging tutorial (#6270) 2017-11-12 20:09:12 -07:00
tutorial.rst Final changes for v0.11.0 (#6318) 2018-01-16 22:25:08 -08:00
workflows.rst views: packages can customize how they're added to views (#7152) 2018-06-26 16:14:05 -07:00