Skip to content

Commit c014d8e

Browse files
committed
Fix highlighted lines
Signed-off-by: tldahlgren <35777542+tldahlgren@users.noreply.github.com>
1 parent 2e116ce commit c014d8e

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

tutorial_packaging.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ and add the dependencies by specifying them using the ``depends_on`` directive a
242242
:caption: tutorial-mpileaks/package.py (from tutorial/examples/packaging/2.package.py)
243243
:lines: 5-
244244
:language: python
245-
:emphasize-lines: 25-27
245+
:emphasize-lines: 26-28
246246

247247
Adding dependencies tells Spack that it must ensure those packages are installed *before* it can build our package.
248248

@@ -391,7 +391,7 @@ and add the ``--with-adept-utils`` and ``--with-callpath`` arguments in the ``co
391391
:caption: tutorial-mpileaks/package.py (from tutorial/examples/packaging/3.package.py)
392392
:lines: 5-
393393
:language: python
394-
:emphasize-lines: 33-36
394+
:emphasize-lines: 34-37
395395

396396
Since this is an ``AutotoolsPackage``, the arguments returned from the method will automatically get passed to ``configure`` during the build.
397397

@@ -445,7 +445,7 @@ and add the ``variant`` directive and associated arguments as follows:
445445
:caption: tutorial-mpileaks/package.py (from tutorial/examples/packaging/4.package.py)
446446
:lines: 5-
447447
:language: python
448-
:emphasize-lines: 16-21,45-52
448+
:emphasize-lines: 17-22,46-53
449449

450450
Notice that the ``variant`` directive is translated into a ``variants`` dictionary in ``self.spec``.
451451
Also note that the value provided by the user is accessed by the entry's ``value`` property.
@@ -484,7 +484,7 @@ Bring ``tutorial-mpileaks``' ``package.py`` file back up with the ``spack edit``
484484
:caption: tutorial-mpileaks/package.py (from tutorial/examples/packaging/5.package.py)
485485
:lines: 5-
486486
:language: python
487-
:emphasize-lines: 14
487+
:emphasize-lines: 15
488488

489489
Since these are `build-time tests <https://spack.readthedocs.io/en/latest/packaging_guide_testing.html#build-time-tests>`_, we'll need to uninstall the package so we can re-run it with tests enabled:
490490

@@ -493,19 +493,21 @@ Since these are `build-time tests <https://spack.readthedocs.io/en/latest/packag
493493

494494
Notice the installation fails due to the missing directory with the error: ``Error: InstallError: Install failed for tutorial-mpileaks. No such directory in prefix: shar``.
495495

496-
Now let's properly fix the error and try again:
496+
Now let's properly fix the error:
497497

498498
.. literalinclude:: tutorial/examples/packaging/6.package.py
499499
:caption: tutorial-mpileaks/package.py (from tutorial/examples/packaging/6.package.py)
500500
:lines: 5-
501501
:language: python
502-
:emphasize-lines: 14
502+
:emphasize-lines: 15
503503

504-
Success!
504+
And try again:
505505

506506
.. literalinclude:: outputs/packaging/install-mpileaks-6.out
507507
:language: console
508508

509+
Success!
510+
509511
The material covered here only scratches the surface of testing an installation.
510512
We could leverage the examples from this package to add `post-install phase tests <https://spack.readthedocs.io/en/latest/packaging_guide_testing.html#adding-installation-phase-tests>`_ and/or `stand-alone tests <https://spack.readthedocs.io/en/latest/packaging_guide_testing.html#stand-alone-tests>`_.
511513

0 commit comments

Comments
 (0)