summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/docs/developer_guide.rst4
-rw-r--r--lib/spack/docs/tutorial_basics.rst8
-rw-r--r--lib/spack/spack/compilers/pgi.py12
-rw-r--r--lib/spack/spack/spec.py7
-rw-r--r--lib/spack/spack/util/multiproc.py2
5 files changed, 21 insertions, 12 deletions
diff --git a/lib/spack/docs/developer_guide.rst b/lib/spack/docs/developer_guide.rst
index ea8d50c6ca..96b4436683 100644
--- a/lib/spack/docs/developer_guide.rst
+++ b/lib/spack/docs/developer_guide.rst
@@ -336,6 +336,10 @@ your command. If it isn't used very frequently, changes to the rest of
Spack can cause your command to break without sufficient unit tests to
prevent this from happening.
+Whenever you add/remove/rename a command or flags for an existing command,
+make sure to update Spack's `Bash tab completion script
+<https://github.com/adamjstewart/spack/blob/develop/share/spack/spack-completion.bash>`_.
+
----------
Unit tests
----------
diff --git a/lib/spack/docs/tutorial_basics.rst b/lib/spack/docs/tutorial_basics.rst
index 8d9a8fbaea..6bd5dad604 100644
--- a/lib/spack/docs/tutorial_basics.rst
+++ b/lib/spack/docs/tutorial_basics.rst
@@ -574,7 +574,7 @@ You may also have noticed that there are some packages shown in the
dependencies that were installed implicitly. A few packages installed
implicitly are not shown as dependencies in the ``spack find -d``
output. These are build dependencies. For example, ``libpciaccess`` is a
-dependency of openmpi and requires m4 to build. Spack will build `m4`` as
+dependency of openmpi and requires ``m4`` to build. Spack will build ``m4`` as
part of the installation of ``openmpi``, but it does not become a part of
the DAG because it is not linked in at run time. Spack handles build
dependencies differently because of their different (less strict)
@@ -951,7 +951,7 @@ You can control how the output is displayed with a number of options.
The ASCII output from ``spack graph`` can be difficult to parse for
complicated packages. The output can be changed to the ``graphviz``
-``.dot`` format using the `--dot` flag.
+``.dot`` format using the ``--dot`` flag.
.. code-block:: console
@@ -1093,13 +1093,13 @@ packages at once.
Advanced ``spack find`` Usage
-----------------------------
-We will go over some additional uses for the `spack find` command not
+We will go over some additional uses for the ``spack find`` command not
already covered in the :ref:`basics-tutorial-install` and
:ref:`basics-tutorial-uninstall` sections.
The ``spack find`` command can accept what we call "anonymous specs."
These are expressions in spec syntax that do not contain a package
-name. For example, `spack find %intel` will return every package built
+name. For example, ``spack find %intel`` will return every package built
with the intel compiler, and ``spack find cppflags="-O3"`` will
return every package which was built with ``cppflags="-O3"``.
diff --git a/lib/spack/spack/compilers/pgi.py b/lib/spack/spack/compilers/pgi.py
index 146c153041..ed8bad1a9b 100644
--- a/lib/spack/spack/compilers/pgi.py
+++ b/lib/spack/spack/compilers/pgi.py
@@ -61,12 +61,20 @@ class Pgi(Compiler):
@classmethod
def default_version(cls, comp):
- """The '-V' option works for all the PGI compilers.
+ """The ``-V`` option works for all the PGI compilers.
Output looks like this::
pgcc 15.10-0 64-bit target on x86-64 Linux -tp sandybridge
The Portland Group - PGI Compilers and Tools
Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved.
+
+ on x86-64, and::
+
+ pgcc 17.4-0 linuxpower target on Linuxpower
+ PGI Compilers and Tools
+ Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
+
+ on PowerPC.
"""
return get_compiler_version(
- comp, '-V', r'pg[^ ]* ([^ ]+) \d\d\d?-bit target')
+ comp, '-V', r'pg[^ ]* ([0-9.-]+) [^ ]+ target on ')
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py
index 399f58461f..ff213c5986 100644
--- a/lib/spack/spack/spec.py
+++ b/lib/spack/spack/spec.py
@@ -966,15 +966,12 @@ class Spec(object):
# Spec(a, b) will copy a but just add b as a dep.
deptypes = ()
for dep in dep_like:
- if isinstance(dep, Spec):
- spec = dep
- elif isinstance(dep, (list, tuple)):
+
+ if isinstance(dep, (list, tuple)):
# Literals can be deptypes -- if there are tuples in the
# list, they will be used as deptypes for the following Spec.
deptypes = tuple(dep)
continue
- else:
- spec = Spec(dep)
spec = dep if isinstance(dep, Spec) else Spec(dep)
self._add_dependency(spec, deptypes)
diff --git a/lib/spack/spack/util/multiproc.py b/lib/spack/spack/util/multiproc.py
index 91bac57c26..f465a3dbdc 100644
--- a/lib/spack/spack/util/multiproc.py
+++ b/lib/spack/spack/util/multiproc.py
@@ -92,5 +92,5 @@ class Barrier:
self.turnstile2.release()
-class BarrierTimeoutError:
+class BarrierTimeoutError(Exception):
pass