summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2020-04-14 19:54:53 +0200
committerGitHub <noreply@github.com>2020-04-14 12:54:53 -0500
commita11de1d29d3742d3546e605525885c41680301f9 (patch)
tree561d3c48471b5bb7ab4958dc5029ea5f0a0a05c7 /lib
parent98cdd8777a6c317405f9c6b2da8a5134a3a6f80b (diff)
downloadspack-a11de1d29d3742d3546e605525885c41680301f9.tar.gz
spack-a11de1d29d3742d3546e605525885c41680301f9.tar.bz2
spack-a11de1d29d3742d3546e605525885c41680301f9.tar.xz
spack-a11de1d29d3742d3546e605525885c41680301f9.zip
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"
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/docs/basic_usage.rst5
-rw-r--r--lib/spack/docs/module_file_support.rst2
-rw-r--r--lib/spack/docs/packaging_guide.rst9
3 files changed, 9 insertions, 7 deletions
diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst
index 2f047c0785..8acebeb0e6 100644
--- a/lib/spack/docs/basic_usage.rst
+++ b/lib/spack/docs/basic_usage.rst
@@ -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,
diff --git a/lib/spack/docs/module_file_support.rst b/lib/spack/docs/module_file_support.rst
index aa7eb57653..01a13cdf3e 100644
--- a/lib/spack/docs/module_file_support.rst
+++ b/lib/spack/docs/module_file_support.rst
@@ -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:
^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst
index 88b7814838..26f843aa0e 100644
--- a/lib/spack/docs/packaging_guide.rst
+++ b/lib/spack/docs/packaging_guide.rst
@@ -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')
...