You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: index.rst
+13-8Lines changed: 13 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,11 +8,14 @@
8
8
Tutorial: Spack 101
9
9
===================
10
10
11
-
This is an introduction to Spack with lectures and live demos.
12
-
It was last presented at the `Supercomputing 2024 Conference <https://sc24.conference-program.com/presentation/?id=tut182&sess=sess422>`_, November 18, 2024.
13
-
The event was a full-day tutorial.
11
+
This is an introduction to Spack with lectures and live demos. It was last presented at
12
+
the `Supercomputing 2024 Conference
13
+
<https://sc24.conference-program.com/presentation/?id=tut182&sess=sess422>`_, November
14
+
18, 2024. The event was a full-day tutorial.
14
15
15
-
You can use these materials to teach a course on Spack at your own site, or you can just skip ahead and read the live demo scripts to see how Spack is used in practice.
16
+
You can use these materials to teach a course on Spack at your own site,
17
+
or you can just skip ahead and read the live demo scripts to see how
Copy file name to clipboardExpand all lines: tutorial_buildsystems.rst
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@
10
10
Spack Package Build Systems
11
11
===========================
12
12
13
-
After writing a few package template files, certain recurring patterns often become apparent.
13
+
After writing a few package template files, certain recurring patterns often become apparent.
14
14
For example, an ``install()`` method may frequently include the following steps:
15
15
16
16
- ``configure``
@@ -20,7 +20,7 @@ For example, an ``install()`` method may frequently include the following steps:
20
20
21
21
It's also common to pass arguments such as ``"prefix=" + prefix`` to ``configure`` or ``cmake``.
22
22
23
-
To avoid repeating this logic across packages, Spack provides specialized build system base classes that encapsulate these common patterns.
23
+
To avoid repeating this logic across packages, Spack provides specialized build system base classes that encapsulate these common patterns.
24
24
These classes help reduce boilerplate while still offering fine-grained control over the build process when needed.
25
25
26
26
In this section, we'll describe several of these build systems and show how they can be used to simplify and streamline package creation.
@@ -48,7 +48,7 @@ Package Class Hierarchy
48
48
PackageBase -> PythonPackage [dir=back]
49
49
}
50
50
51
-
The diagram above provides a high-level view of the class hierarchy and how each package class relates to the others.
51
+
The diagram above provides a high-level view of the class hierarchy and how each package class relates to the others.
52
52
Each build system specific class inherits from the ``PackageBase`` superclass.
53
53
54
54
The bulk of the common functionality, such as fetching sources, extracting them into a staging directory, and managing the install process, is implemented in the superclass.
@@ -236,13 +236,13 @@ Let's add in the rest of the package's details:
236
236
:emphasize-lines: 10,11,13,14,18,20
237
237
:linenos:
238
238
239
-
As previously mentioned, most packages that use a ``Makefile`` include hardcoded variables that must be edited.
240
-
While this setup may be sufficient for basic use cases, it is often inflexible, especially when different compilers or build configurations are required.
239
+
As previously mentioned, most packages that use a ``Makefile`` include hardcoded variables that must be edited.
240
+
While this setup may be sufficient for basic use cases, it is often inflexible, especially when different compilers or build configurations are required.
241
241
Spack is designed to support a wide range of compilers and platforms, and the ``MakefilePackage`` subclass helps accommodate that flexibility.
242
242
243
243
The ``MakefilePackage`` class simplifies the process of editing ``Makefiles`` through its overridable ``edit()`` method, which provides a hook for making in-place changes before the build begins.
244
244
245
-
As an example, consider the default ``Makefile`` provided with ``Bowtie``.
245
+
As an example, consider the default ``Makefile`` provided with ``Bowtie``.
246
246
Inspecting its contents reveals that ``CC`` and ``CXX`` are hardcoded to the GNU compilers:
0 commit comments