Package extensions: fixed a link in docs (#16040)

* Moved link to the right place in the docs

* Fixed a few minor issues in extensions docs

Fixed a typo, added a subsubsection for better
navigation, reworded "modules in Python" as
"Python packages"
This commit is contained in:
Massimiliano Culpo 2020-04-14 19:54:53 +02:00 committed by GitHub
parent 98cdd8777a
commit a11de1d29d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 7 deletions

View File

@ -1234,6 +1234,8 @@ add a version specifier to the spec:
Notice that the package versions that provide insufficient MPI
versions are now filtered out.
.. _extensions:
---------------------------
Extensions & Python support
---------------------------
@ -1241,8 +1243,7 @@ Extensions & Python support
Spack's installation model assumes that each package will live in its
own install prefix. However, certain packages are typically installed
*within* the directory hierarchy of other packages. For example,
modules in interpreted languages like `Python
<https://www.python.org>`_ are typically installed in the
`Python <https://www.python.org>`_ packages are typically installed in the
``$prefix/lib/python-2.7/site-packages`` directory.
Spack has support for this type of installation as well. In Spack,

View File

@ -165,8 +165,6 @@ used ``gcc``. You could therefore just type:
To identify just the one built with the Intel compiler.
.. _extensions:
.. _cmd-spack-module-loads:
^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -2197,7 +2197,7 @@ property to ``True``, e.g.:
extendable = True
...
To make a package into an extension, simply add simply add an
To make a package into an extension, simply add an
``extends`` call in the package definition, and pass it the name of an
extendable package:
@ -2212,6 +2212,10 @@ Now, the ``py-numpy`` package can be used as an argument to ``spack
activate``. When it is activated, all the files in its prefix will be
symbolically linked into the prefix of the python package.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Adding additional constraints
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Some packages produce a Python extension, but are only compatible with
Python 3, or with Python 2. In those cases, a ``depends_on()``
declaration should be made in addition to the ``extends()``
@ -2231,8 +2235,7 @@ variant(s) are selected. This may be accomplished with conditional
.. code-block:: python
class FooLib(Package):
variant('python', default=True, description= \
'Build the Python extension Module')
variant('python', default=True, description='Build the Python extension Module')
extends('python', when='+python')
...