summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2013-12-20 17:11:25 -0800
committerTodd Gamblin <tgamblin@llnl.gov>2013-12-21 15:32:34 -0800
commit99b05fd5714150af29b351ae197ae0e22e98171d (patch)
tree20da20bf2fae475805905b0b85d34c209566a013 /lib
parentdfd0440a7e666345b0a0851951d24f74273b29d4 (diff)
downloadspack-99b05fd5714150af29b351ae197ae0e22e98171d.tar.gz
spack-99b05fd5714150af29b351ae197ae0e22e98171d.tar.bz2
spack-99b05fd5714150af29b351ae197ae0e22e98171d.tar.xz
spack-99b05fd5714150af29b351ae197ae0e22e98171d.zip
More docs.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/docs/features.rst16
-rw-r--r--lib/spack/spack/packages/libelf.py2
-rw-r--r--lib/spack/spack/spec.py5
3 files changed, 15 insertions, 8 deletions
diff --git a/lib/spack/docs/features.rst b/lib/spack/docs/features.rst
index 27e821d3b2..91184a3390 100644
--- a/lib/spack/docs/features.rst
+++ b/lib/spack/docs/features.rst
@@ -79,24 +79,30 @@ in pure Python.
.. code-block:: sh
- $ spack create http://scalability.llnl.gov/mpileaks/downloads/mpileaks-1.0.tar.gz
+ $ spack create http://www.mr511.de/software/libelf-0.8.13.tar.gz
-Creates ``mpileaks.py``:
+Creates ``libelf.py``:
.. code-block:: python
from spack import *
- class Mpileaks(Package):
+ class Libelf(Package):
homepage = "http://www.example.com/"
- url = "http://scalability.llnl.gov/mpileaks/downloads/mpileaks-1.0.tar.gz"
- md5 = "4136d7b4c04df68b686570afa26988ac"
+ url = "http://www.mr511.de/software/libelf-0.8.13.tar.gz"
+
+ versions = { '0.8.13' : '4136d7b4c04df68b686570afa26988ac' }
def install(self, prefix):
configure("--prefix=%s" % prefix)
make()
make("install")
+It typically doesn't take much python coding to get from there to a
+working package file:
+
+.. literalinclude:: ../spack/packages/libelf.py
+
Spack also provides wrapper functions around common commands like
``configure``, ``make``, and ``cmake`` to make writing packages
simple.
diff --git a/lib/spack/spack/packages/libelf.py b/lib/spack/spack/packages/libelf.py
index 67c1d83fc6..621444706e 100644
--- a/lib/spack/spack/packages/libelf.py
+++ b/lib/spack/spack/packages/libelf.py
@@ -13,5 +13,5 @@ class Libelf(Package):
"--disable-debug")
make()
- # The mkdir commands in libelf's intsall can fail in parallel
+ # The mkdir commands in libelf's install can fail in parallel
make("install", parallel=False)
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py
index efe5df51d5..9e172f8708 100644
--- a/lib/spack/spack/spec.py
+++ b/lib/spack/spack/spec.py
@@ -827,8 +827,9 @@ class Spec(object):
$$ $
Anything else is copied verbatim into the output stream.
- Example: "$_$@$+" translates to the name, version, and options
- of the package, but no dependencies, arch, or compiler.
+
+ *Example:* ``$_$@$+`` translates to the name, version, and options
+ of the package, but no dependencies, arch, or compiler.
"""
color = kwargs.get('color', False)
length = len(format_string)