From 437fadbc134d635a2218020d77e8e19415090cee Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Sun, 15 Nov 2026 21:26:37 -0600 Subject: [PATCH 1/4] packaging: update generated package for new base template Signed-off-by: Alec Scott --- outputs/package-py-files/0.package.py | 1 + outputs/package-py-files/1.package.py | 1 + outputs/package-py-files/2.package.py | 1 + outputs/package-py-files/3.package.py | 1 + outputs/package-py-files/4.package.py | 1 + outputs/package-py-files/5.package.py | 1 + outputs/package-py-files/6.package.py | 1 + ruff.toml | 1 + tutorial/examples/packaging/0.package.py | 14 ++++++++++---- tutorial/examples/packaging/1.package.py | 16 ++++++++++------ tutorial/examples/packaging/2.package.py | 16 ++++++++++------ tutorial/examples/packaging/3.package.py | 16 ++++++++++------ tutorial/examples/packaging/4.package.py | 16 ++++++++++------ tutorial/examples/packaging/5.package.py | 16 ++++++++++------ tutorial/examples/packaging/6.package.py | 16 ++++++++++------ tutorial_packaging.rst | 10 +++++----- 16 files changed, 83 insertions(+), 45 deletions(-) create mode 100644 ruff.toml diff --git a/outputs/package-py-files/0.package.py b/outputs/package-py-files/0.package.py index 0dfd438f32..0bb7fc31ae 100644 --- a/outputs/package-py-files/0.package.py +++ b/outputs/package-py-files/0.package.py @@ -20,6 +20,7 @@ # ---------------------------------------------------------------------------- from spack_repo.builtin.build_systems.autotools import AutotoolsPackage + from spack.package import * diff --git a/outputs/package-py-files/1.package.py b/outputs/package-py-files/1.package.py index 331772fd26..56c63da664 100644 --- a/outputs/package-py-files/1.package.py +++ b/outputs/package-py-files/1.package.py @@ -3,6 +3,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack_repo.builtin.build_systems.autotools import AutotoolsPackage + from spack.package import * diff --git a/outputs/package-py-files/2.package.py b/outputs/package-py-files/2.package.py index 77ff263c57..c88fcefa0e 100644 --- a/outputs/package-py-files/2.package.py +++ b/outputs/package-py-files/2.package.py @@ -3,6 +3,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack_repo.builtin.build_systems.autotools import AutotoolsPackage + from spack.package import * diff --git a/outputs/package-py-files/3.package.py b/outputs/package-py-files/3.package.py index 42ae505a6b..383479d676 100644 --- a/outputs/package-py-files/3.package.py +++ b/outputs/package-py-files/3.package.py @@ -3,6 +3,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack_repo.builtin.build_systems.autotools import AutotoolsPackage + from spack.package import * diff --git a/outputs/package-py-files/4.package.py b/outputs/package-py-files/4.package.py index d61abe0cd3..4ecf93fd67 100644 --- a/outputs/package-py-files/4.package.py +++ b/outputs/package-py-files/4.package.py @@ -3,6 +3,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack_repo.builtin.build_systems.autotools import AutotoolsPackage + from spack.package import * diff --git a/outputs/package-py-files/5.package.py b/outputs/package-py-files/5.package.py index 50df94c6fc..ec6e6114db 100644 --- a/outputs/package-py-files/5.package.py +++ b/outputs/package-py-files/5.package.py @@ -3,6 +3,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack_repo.builtin.build_systems.autotools import AutotoolsPackage + from spack.package import * diff --git a/outputs/package-py-files/6.package.py b/outputs/package-py-files/6.package.py index c4c9cfbdc6..0fe4694ef6 100644 --- a/outputs/package-py-files/6.package.py +++ b/outputs/package-py-files/6.package.py @@ -3,6 +3,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack_repo.builtin.build_systems.autotools import AutotoolsPackage + from spack.package import * diff --git a/ruff.toml b/ruff.toml new file mode 100644 index 0000000000..71de868235 --- /dev/null +++ b/ruff.toml @@ -0,0 +1 @@ +line-length = 100 diff --git a/tutorial/examples/packaging/0.package.py b/tutorial/examples/packaging/0.package.py index 0dfd438f32..ed4ad1deba 100644 --- a/tutorial/examples/packaging/0.package.py +++ b/tutorial/examples/packaging/0.package.py @@ -20,6 +20,7 @@ # ---------------------------------------------------------------------------- from spack_repo.builtin.build_systems.autotools import AutotoolsPackage + from spack.package import * @@ -30,6 +31,10 @@ class TutorialMpileaks(AutotoolsPackage): homepage = "https://www.example.com" url = "https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz" + # FIXME: Uncomment and add the upstream supplier (organization or author). + # If unknown or inapplicable, remove this entire block. + # supplier = organization_or_author + # FIXME: Add a list of GitHub accounts to # notify when the package is updated. # maintainers("github_user1", "github_user2") @@ -45,10 +50,11 @@ class TutorialMpileaks(AutotoolsPackage): depends_on("cxx", type="build") depends_on("fortran", type="build") - depends_on("autoconf", type="build") - depends_on("automake", type="build") - depends_on("libtool", type="build") - depends_on("m4", type="build") + with default_args(type="build"): + depends_on("autoconf") + depends_on("automake") + depends_on("libtool") + depends_on("m4") # FIXME: Add additional dependencies if required. # depends_on("foo") diff --git a/tutorial/examples/packaging/1.package.py b/tutorial/examples/packaging/1.package.py index 331772fd26..17eef4a54c 100644 --- a/tutorial/examples/packaging/1.package.py +++ b/tutorial/examples/packaging/1.package.py @@ -3,6 +3,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack_repo.builtin.build_systems.autotools import AutotoolsPackage + from spack.package import * @@ -12,9 +13,11 @@ class TutorialMpileaks(AutotoolsPackage): homepage = "https://github.com/LLNL/mpileaks" url = "https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz" - maintainers("adamjstewart") + supplier = "Organization: LLNL" + + maintainers("cmelone") - license("BSD", checked_by="adamjstewart") + license("BSD", checked_by="cmelone") version("1.0", sha256="24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9") @@ -22,10 +25,11 @@ class TutorialMpileaks(AutotoolsPackage): depends_on("cxx", type="build") depends_on("fortran", type="build") - depends_on("autoconf", type="build") - depends_on("automake", type="build") - depends_on("libtool", type="build") - depends_on("m4", type="build") + with default_args(type="build"): + depends_on("autoconf") + depends_on("automake") + depends_on("libtool") + depends_on("m4") # FIXME: Add additional dependencies if required. # depends_on("foo") diff --git a/tutorial/examples/packaging/2.package.py b/tutorial/examples/packaging/2.package.py index 77ff263c57..e621ae85c3 100644 --- a/tutorial/examples/packaging/2.package.py +++ b/tutorial/examples/packaging/2.package.py @@ -3,6 +3,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack_repo.builtin.build_systems.autotools import AutotoolsPackage + from spack.package import * @@ -12,9 +13,11 @@ class TutorialMpileaks(AutotoolsPackage): homepage = "https://github.com/LLNL/mpileaks" url = "https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz" - maintainers("adamjstewart") + supplier = "Organization: LLNL" + + maintainers("cmelone") - license("BSD", checked_by="adamjstewart") + license("BSD", checked_by="cmelone") version("1.0", sha256="24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9") @@ -22,10 +25,11 @@ class TutorialMpileaks(AutotoolsPackage): depends_on("cxx", type="build") depends_on("fortran", type="build") - depends_on("autoconf", type="build") - depends_on("automake", type="build") - depends_on("libtool", type="build") - depends_on("m4", type="build") + with default_args(type="build"): + depends_on("autoconf") + depends_on("automake") + depends_on("libtool") + depends_on("m4") depends_on("mpi") depends_on("adept-utils") diff --git a/tutorial/examples/packaging/3.package.py b/tutorial/examples/packaging/3.package.py index 42ae505a6b..414184f77c 100644 --- a/tutorial/examples/packaging/3.package.py +++ b/tutorial/examples/packaging/3.package.py @@ -3,6 +3,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack_repo.builtin.build_systems.autotools import AutotoolsPackage + from spack.package import * @@ -12,9 +13,11 @@ class TutorialMpileaks(AutotoolsPackage): homepage = "https://github.com/LLNL/mpileaks" url = "https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz" - maintainers("adamjstewart") + supplier = "Organization: LLNL" + + maintainers("cmelone") - license("BSD", checked_by="adamjstewart") + license("BSD", checked_by="cmelone") version("1.0", sha256="24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9") @@ -22,10 +25,11 @@ class TutorialMpileaks(AutotoolsPackage): depends_on("cxx", type="build") depends_on("fortran", type="build") - depends_on("autoconf", type="build") - depends_on("automake", type="build") - depends_on("libtool", type="build") - depends_on("m4", type="build") + with default_args(type="build"): + depends_on("autoconf") + depends_on("automake") + depends_on("libtool") + depends_on("m4") depends_on("mpi") depends_on("adept-utils") diff --git a/tutorial/examples/packaging/4.package.py b/tutorial/examples/packaging/4.package.py index 23bcd8e6d8..1994f87098 100644 --- a/tutorial/examples/packaging/4.package.py +++ b/tutorial/examples/packaging/4.package.py @@ -3,6 +3,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack_repo.builtin.build_systems.autotools import AutotoolsPackage + from spack.package import * @@ -12,9 +13,11 @@ class TutorialMpileaks(AutotoolsPackage): homepage = "https://github.com/LLNL/mpileaks" url = "https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz" - maintainers("adamjstewart") + supplier = "Organization: LLNL" + + maintainers("cmelone") - license("BSD", checked_by="adamjstewart") + license("BSD", checked_by="cmelone") version("1.0", sha256="24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9") @@ -29,10 +32,11 @@ class TutorialMpileaks(AutotoolsPackage): depends_on("cxx", type="build") depends_on("fortran", type="build") - depends_on("autoconf", type="build") - depends_on("automake", type="build") - depends_on("libtool", type="build") - depends_on("m4", type="build") + with default_args(type="build"): + depends_on("autoconf") + depends_on("automake") + depends_on("libtool") + depends_on("m4") depends_on("mpi") depends_on("adept-utils") diff --git a/tutorial/examples/packaging/5.package.py b/tutorial/examples/packaging/5.package.py index 427862d2e0..6ede50acc9 100644 --- a/tutorial/examples/packaging/5.package.py +++ b/tutorial/examples/packaging/5.package.py @@ -3,6 +3,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack_repo.builtin.build_systems.autotools import AutotoolsPackage + from spack.package import * @@ -12,9 +13,11 @@ class TutorialMpileaks(AutotoolsPackage): homepage = "https://github.com/LLNL/mpileaks" url = "https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz" - maintainers("adamjstewart") + supplier = "Organization: LLNL" + + maintainers("cmelone") - license("BSD", checked_by="adamjstewart") + license("BSD", checked_by="cmelone") sanity_check_is_dir = ["bin", "lib", "shar"] @@ -31,10 +34,11 @@ class TutorialMpileaks(AutotoolsPackage): depends_on("cxx", type="build") depends_on("fortran", type="build") - depends_on("autoconf", type="build") - depends_on("automake", type="build") - depends_on("libtool", type="build") - depends_on("m4", type="build") + with default_args(type="build"): + depends_on("autoconf") + depends_on("automake") + depends_on("libtool") + depends_on("m4") depends_on("mpi") depends_on("adept-utils") diff --git a/tutorial/examples/packaging/6.package.py b/tutorial/examples/packaging/6.package.py index 9c51a30353..5b564552ec 100644 --- a/tutorial/examples/packaging/6.package.py +++ b/tutorial/examples/packaging/6.package.py @@ -3,6 +3,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack_repo.builtin.build_systems.autotools import AutotoolsPackage + from spack.package import * @@ -12,9 +13,11 @@ class TutorialMpileaks(AutotoolsPackage): homepage = "https://github.com/LLNL/mpileaks" url = "https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz" - maintainers("adamjstewart") + supplier = "Organization: LLNL" + + maintainers("cmelone") - license("BSD", checked_by="adamjstewart") + license("BSD", checked_by="cmelone") sanity_check_is_dir = ["bin", "lib", "share"] @@ -31,10 +34,11 @@ class TutorialMpileaks(AutotoolsPackage): depends_on("cxx", type="build") depends_on("fortran", type="build") - depends_on("autoconf", type="build") - depends_on("automake", type="build") - depends_on("libtool", type="build") - depends_on("m4", type="build") + with default_args(type="build"): + depends_on("autoconf") + depends_on("automake") + depends_on("libtool") + depends_on("m4") depends_on("mpi") depends_on("adept-utils") diff --git a/tutorial_packaging.rst b/tutorial_packaging.rst index eb72e72b36..c6a45e0d75 100644 --- a/tutorial_packaging.rst +++ b/tutorial_packaging.rst @@ -118,7 +118,7 @@ The areas we need to modify are highlighted in the figure below. .. literalinclude:: tutorial/examples/packaging/0.package.py :caption: tutorial-mpileaks/package.py (from tutorial/examples/packaging/0.package.py) :language: python - :emphasize-lines: 5-20,27,29-30,33-35,37-40,53-54,57,61-64 + :emphasize-lines: 5-20,28,30-31,34-36,38-40,42-45,59-60,63,67-70 .. tip:: @@ -188,7 +188,7 @@ The resulting package should contain the following information, omitting the cop :caption: tutorial-mpileaks/package.py (from tutorial/examples/packaging/1.package.py) :lines: 5- :language: python - :emphasize-lines: 6,8,11,13 + :emphasize-lines: 7,9,12,14,16 At this point we've only updated key documentation within the package. It won't help us build the software; however, the information is now available for review. @@ -253,7 +253,7 @@ and add the dependencies by specifying them using the ``depends_on`` directive a :caption: tutorial-mpileaks/package.py (from tutorial/examples/packaging/2.package.py) :lines: 5- :language: python - :emphasize-lines: 26-28 + :emphasize-lines: 30-32 Adding dependencies tells Spack that it must ensure those packages are installed *before* it can build our package. @@ -403,7 +403,7 @@ and add the ``--with-adept-utils`` and ``--with-callpath`` arguments in the ``co :caption: tutorial-mpileaks/package.py (from tutorial/examples/packaging/3.package.py) :lines: 5- :language: python - :emphasize-lines: 34-37 + :emphasize-lines: 38-41 Since this is an ``AutotoolsPackage``, the arguments returned from the method will automatically get passed to ``configure`` during the build. @@ -457,7 +457,7 @@ and add the ``variant`` directive and associated arguments as follows: :caption: tutorial-mpileaks/package.py (from tutorial/examples/packaging/4.package.py) :lines: 5- :language: python - :emphasize-lines: 17-22,46-53 + :emphasize-lines: 20-25,50-57 Notice that the ``variant`` directive is translated into a ``variants`` dictionary in ``self.spec``. Also note that the value provided by the user is accessed by the entry's ``value`` property. From 27f3a074c5e695368cfe3ec8afad145cf8daccb2 Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Sun, 15 Nov 2026 21:47:12 -0600 Subject: [PATCH 2/4] Add a quick note on the supplier field Signed-off-by: Alec Scott --- tutorial_packaging.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tutorial_packaging.rst b/tutorial_packaging.rst index c6a45e0d75..82a05c3650 100644 --- a/tutorial_packaging.rst +++ b/tutorial_packaging.rst @@ -99,6 +99,7 @@ As we can see from the skeleton contents, the Spack template: * imports and inherits from the inferred `build system package `_; * provides a docstring template; * provides an example homepage URL; +* provides a placeholder for the upstream ``supplier``; * shows how to specify a list of package `maintainers `_; * provides a template for the `license `_; * specifies the `version directive `_ with the `checksum `_; @@ -107,6 +108,13 @@ As we can see from the skeleton contents, the Spack template: * provides a preliminary implementation of the `autoreconf `_ method; and * provides a skeleton `configure_args `_ method. +.. note:: + + The ``supplier`` field identifies the organization, project, or individual responsible for distributing the software, rather than the Spack package maintainer. + Spack uses this metadata in the `Software Bill of Materials (SBOM) `_ generated for each installation. + For ``mpileaks``, we use ``supplier = "Organization: LLNL"``. + If the supplier is unknown or inapplicable, remove the field and its placeholder comments. + .. note:: The `maintainers directive `_ holds a comma-separated list of GitHub user names for those accounts willing to be notified when a change is made to the package. @@ -169,6 +177,7 @@ Let's make the following changes: * remove the boilerplate comments between and including the dashed lines at the top; * replace the first ``FIXME`` comment with a description of ``mpileaks`` in the docstring; * replace the ``homepage`` property with the correct link; +* uncomment the ``supplier`` field and set it to ``"Organization: LLNL"``; * uncomment the ``maintainers`` directive and replace the placeholder with your GitHub user name; and * replace the ``license`` of the project with the correct name and the placeholder with your GitHub user name. From 8dbed37303eec72f3b7fcc4733804a3605419251 Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Sun, 15 Nov 2026 21:57:52 -0600 Subject: [PATCH 3/4] Swap github.com/LLNL to github.com/llnl Signed-off-by: Alec Scott --- outputs/package-py-files/0.package.py | 2 +- outputs/package-py-files/1.package.py | 4 ++-- outputs/package-py-files/2.package.py | 4 ++-- outputs/package-py-files/3.package.py | 4 ++-- outputs/package-py-files/4.package.py | 4 ++-- outputs/package-py-files/5.package.py | 4 ++-- outputs/package-py-files/6.package.py | 4 ++-- tutorial/examples/packaging/0.package.py | 2 +- tutorial/examples/packaging/1.package.py | 4 ++-- tutorial/examples/packaging/2.package.py | 4 ++-- tutorial/examples/packaging/3.package.py | 4 ++-- tutorial/examples/packaging/4.package.py | 4 ++-- tutorial/examples/packaging/5.package.py | 4 ++-- tutorial/examples/packaging/6.package.py | 4 ++-- tutorial_packaging.rst | 12 ++++++------ 15 files changed, 32 insertions(+), 32 deletions(-) diff --git a/outputs/package-py-files/0.package.py b/outputs/package-py-files/0.package.py index 0bb7fc31ae..7957b563b3 100644 --- a/outputs/package-py-files/0.package.py +++ b/outputs/package-py-files/0.package.py @@ -29,7 +29,7 @@ class TutorialMpileaks(AutotoolsPackage): # FIXME: Add a proper url for your package's homepage here. homepage = "https://www.example.com" - url = "https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz" + url = "https://github.com/llnl/mpileaks/archive/refs/tags/v1.0.tar.gz" # FIXME: Add a list of GitHub accounts to # notify when the package is updated. diff --git a/outputs/package-py-files/1.package.py b/outputs/package-py-files/1.package.py index 56c63da664..9cec311935 100644 --- a/outputs/package-py-files/1.package.py +++ b/outputs/package-py-files/1.package.py @@ -10,8 +10,8 @@ class TutorialMpileaks(AutotoolsPackage): """Tool to detect and report leaked MPI objects like MPI_Requests and MPI_Datatypes.""" - homepage = "https://github.com/LLNL/mpileaks" - url = "https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz" + homepage = "https://github.com/llnl/mpileaks" + url = "https://github.com/llnl/mpileaks/archive/refs/tags/v1.0.tar.gz" maintainers("adamjstewart") diff --git a/outputs/package-py-files/2.package.py b/outputs/package-py-files/2.package.py index c88fcefa0e..85472fe5ae 100644 --- a/outputs/package-py-files/2.package.py +++ b/outputs/package-py-files/2.package.py @@ -10,8 +10,8 @@ class TutorialMpileaks(AutotoolsPackage): """Tool to detect and report leaked MPI objects like MPI_Requests and MPI_Datatypes.""" - homepage = "https://github.com/LLNL/mpileaks" - url = "https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz" + homepage = "https://github.com/llnl/mpileaks" + url = "https://github.com/llnl/mpileaks/archive/refs/tags/v1.0.tar.gz" maintainers("adamjstewart") diff --git a/outputs/package-py-files/3.package.py b/outputs/package-py-files/3.package.py index 383479d676..c94dbc1aef 100644 --- a/outputs/package-py-files/3.package.py +++ b/outputs/package-py-files/3.package.py @@ -10,8 +10,8 @@ class TutorialMpileaks(AutotoolsPackage): """Tool to detect and report leaked MPI objects like MPI_Requests and MPI_Datatypes.""" - homepage = "https://github.com/LLNL/mpileaks" - url = "https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz" + homepage = "https://github.com/llnl/mpileaks" + url = "https://github.com/llnl/mpileaks/archive/refs/tags/v1.0.tar.gz" maintainers("adamjstewart") diff --git a/outputs/package-py-files/4.package.py b/outputs/package-py-files/4.package.py index 4ecf93fd67..6c35abc6c4 100644 --- a/outputs/package-py-files/4.package.py +++ b/outputs/package-py-files/4.package.py @@ -10,8 +10,8 @@ class TutorialMpileaks(AutotoolsPackage): """Tool to detect and report leaked MPI objects like MPI_Requests and MPI_Datatypes.""" - homepage = "https://github.com/LLNL/mpileaks" - url = "https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz" + homepage = "https://github.com/llnl/mpileaks" + url = "https://github.com/llnl/mpileaks/archive/refs/tags/v1.0.tar.gz" maintainers("adamjstewart") diff --git a/outputs/package-py-files/5.package.py b/outputs/package-py-files/5.package.py index ec6e6114db..9c7c4150bb 100644 --- a/outputs/package-py-files/5.package.py +++ b/outputs/package-py-files/5.package.py @@ -10,8 +10,8 @@ class TutorialMpileaks(AutotoolsPackage): """Tool to detect and report leaked MPI objects like MPI_Requests and MPI_Datatypes.""" - homepage = "https://github.com/LLNL/mpileaks" - url = "https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz" + homepage = "https://github.com/llnl/mpileaks" + url = "https://github.com/llnl/mpileaks/archive/refs/tags/v1.0.tar.gz" maintainers("adamjstewart") diff --git a/outputs/package-py-files/6.package.py b/outputs/package-py-files/6.package.py index 0fe4694ef6..17f0ad0a35 100644 --- a/outputs/package-py-files/6.package.py +++ b/outputs/package-py-files/6.package.py @@ -10,8 +10,8 @@ class TutorialMpileaks(AutotoolsPackage): """Tool to detect and report leaked MPI objects like MPI_Requests and MPI_Datatypes.""" - homepage = "https://github.com/LLNL/mpileaks" - url = "https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz" + homepage = "https://github.com/llnl/mpileaks" + url = "https://github.com/llnl/mpileaks/archive/refs/tags/v1.0.tar.gz" maintainers("adamjstewart") diff --git a/tutorial/examples/packaging/0.package.py b/tutorial/examples/packaging/0.package.py index ed4ad1deba..15b9f85e58 100644 --- a/tutorial/examples/packaging/0.package.py +++ b/tutorial/examples/packaging/0.package.py @@ -29,7 +29,7 @@ class TutorialMpileaks(AutotoolsPackage): # FIXME: Add a proper url for your package's homepage here. homepage = "https://www.example.com" - url = "https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz" + url = "https://github.com/llnl/mpileaks/archive/refs/tags/v1.0.tar.gz" # FIXME: Uncomment and add the upstream supplier (organization or author). # If unknown or inapplicable, remove this entire block. diff --git a/tutorial/examples/packaging/1.package.py b/tutorial/examples/packaging/1.package.py index 17eef4a54c..02eb03da99 100644 --- a/tutorial/examples/packaging/1.package.py +++ b/tutorial/examples/packaging/1.package.py @@ -10,8 +10,8 @@ class TutorialMpileaks(AutotoolsPackage): """Tool to detect and report leaked MPI objects like MPI_Requests and MPI_Datatypes.""" - homepage = "https://github.com/LLNL/mpileaks" - url = "https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz" + homepage = "https://github.com/llnl/mpileaks" + url = "https://github.com/llnl/mpileaks/archive/refs/tags/v1.0.tar.gz" supplier = "Organization: LLNL" diff --git a/tutorial/examples/packaging/2.package.py b/tutorial/examples/packaging/2.package.py index e621ae85c3..4570028e60 100644 --- a/tutorial/examples/packaging/2.package.py +++ b/tutorial/examples/packaging/2.package.py @@ -10,8 +10,8 @@ class TutorialMpileaks(AutotoolsPackage): """Tool to detect and report leaked MPI objects like MPI_Requests and MPI_Datatypes.""" - homepage = "https://github.com/LLNL/mpileaks" - url = "https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz" + homepage = "https://github.com/llnl/mpileaks" + url = "https://github.com/llnl/mpileaks/archive/refs/tags/v1.0.tar.gz" supplier = "Organization: LLNL" diff --git a/tutorial/examples/packaging/3.package.py b/tutorial/examples/packaging/3.package.py index 414184f77c..6c2be17628 100644 --- a/tutorial/examples/packaging/3.package.py +++ b/tutorial/examples/packaging/3.package.py @@ -10,8 +10,8 @@ class TutorialMpileaks(AutotoolsPackage): """Tool to detect and report leaked MPI objects like MPI_Requests and MPI_Datatypes.""" - homepage = "https://github.com/LLNL/mpileaks" - url = "https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz" + homepage = "https://github.com/llnl/mpileaks" + url = "https://github.com/llnl/mpileaks/archive/refs/tags/v1.0.tar.gz" supplier = "Organization: LLNL" diff --git a/tutorial/examples/packaging/4.package.py b/tutorial/examples/packaging/4.package.py index 1994f87098..01035bf6d1 100644 --- a/tutorial/examples/packaging/4.package.py +++ b/tutorial/examples/packaging/4.package.py @@ -10,8 +10,8 @@ class TutorialMpileaks(AutotoolsPackage): """Tool to detect and report leaked MPI objects like MPI_Requests and MPI_Datatypes.""" - homepage = "https://github.com/LLNL/mpileaks" - url = "https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz" + homepage = "https://github.com/llnl/mpileaks" + url = "https://github.com/llnl/mpileaks/archive/refs/tags/v1.0.tar.gz" supplier = "Organization: LLNL" diff --git a/tutorial/examples/packaging/5.package.py b/tutorial/examples/packaging/5.package.py index 6ede50acc9..f9f37fa6a0 100644 --- a/tutorial/examples/packaging/5.package.py +++ b/tutorial/examples/packaging/5.package.py @@ -10,8 +10,8 @@ class TutorialMpileaks(AutotoolsPackage): """Tool to detect and report leaked MPI objects like MPI_Requests and MPI_Datatypes.""" - homepage = "https://github.com/LLNL/mpileaks" - url = "https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz" + homepage = "https://github.com/llnl/mpileaks" + url = "https://github.com/llnl/mpileaks/archive/refs/tags/v1.0.tar.gz" supplier = "Organization: LLNL" diff --git a/tutorial/examples/packaging/6.package.py b/tutorial/examples/packaging/6.package.py index 5b564552ec..378d15ab53 100644 --- a/tutorial/examples/packaging/6.package.py +++ b/tutorial/examples/packaging/6.package.py @@ -10,8 +10,8 @@ class TutorialMpileaks(AutotoolsPackage): """Tool to detect and report leaked MPI objects like MPI_Requests and MPI_Datatypes.""" - homepage = "https://github.com/LLNL/mpileaks" - url = "https://github.com/LLNL/mpileaks/archive/refs/tags/v1.0.tar.gz" + homepage = "https://github.com/llnl/mpileaks" + url = "https://github.com/llnl/mpileaks/archive/refs/tags/v1.0.tar.gz" supplier = "Organization: LLNL" diff --git a/tutorial_packaging.rst b/tutorial_packaging.rst index 82a05c3650..de1e8083e6 100644 --- a/tutorial_packaging.rst +++ b/tutorial_packaging.rst @@ -12,7 +12,7 @@ Package Creation Tutorial This tutorial walks you through the steps for creating and debugging a simple Spack package. We will develop and debug a package using an iterative approach to gain more experience with additional Spack commands. -For consistency, we will create a package for ``mpileaks`` (https://github.com/LLNL/mpileaks), an MPI debugging tool. +For consistency, we will create a package for ``mpileaks`` (https://github.com/llnl/mpileaks), an MPI debugging tool. ------------------------ What is a Spack Package? @@ -80,7 +80,7 @@ Spack's *create* command builds a new package from a template by taking the loca * create a package skeleton; and * open the file in your `editor of choice `_. -The ``mpileaks`` source code is available in a tarball in the software's repository (https://github.com/LLNL/mpileaks). +The ``mpileaks`` source code is available in a tarball in the software's repository (https://github.com/llnl/mpileaks). Spack will look at the contents of the tarball and generate a package when we run ``spack create`` with the URL: .. literalinclude:: outputs/packaging/create.out @@ -132,7 +132,7 @@ The areas we need to modify are highlighted in the figure below. We generally recommend you use the project-prepared archive url, when available, instead of the ``GitHub``-generated ``Source code (tar.gz)`` since those tend to be less volatile in the face of ``GitHub`` shasum algorithm changes. - In this case, that would mean copying the url labeled ``mpileaks-1.0.tar.gz`` under the ``v1.0`` release assets, or simply ``https://github.com/LLNL/mpileaks/releases/download/v1.0/mpileaks-1.0.tar.gz``. + In this case, that would mean copying the url labeled ``mpileaks-1.0.tar.gz`` under the ``v1.0`` release assets, or simply ``https://github.com/llnl/mpileaks/releases/download/v1.0/mpileaks-1.0.tar.gz``. The ``sha256`` is different since the file has build customizations. A key difference is the presence of ``autogen.sh``, which is a convenience script Autotools projects can create to customize their reconfiguration process. If you choose to use that URL, you should replace the more general call to ``autoreconf()`` with an invocation of the ``autogen.sh`` script. @@ -183,7 +183,7 @@ Let's make the following changes: .. tip:: - It helps to have the `mpileaks `_ repository up in your browser since you can copy-and-paste some of the values from it. + It helps to have the `mpileaks `_ repository up in your browser since you can copy-and-paste some of the values from it. .. note:: @@ -239,7 +239,7 @@ Now we're ready to start filling in the build recipe. Adding Dependencies ------------------- -First we'll add the dependencies determined by reviewing documentation in the software's repository (https://github.com/LLNL/mpileaks). +First we'll add the dependencies determined by reviewing documentation in the software's repository (https://github.com/llnl/mpileaks). We can see from the ``README`` file's instructions, ``mpileaks`` software relies on three third-party libraries: * ``mpi``, @@ -441,7 +441,7 @@ Two stand out for tutorial purposes because they both take integers, as opposed :language: console :emphasize-lines: 18-23 -According to the software's documentation (https://github.com/LLNL/mpileaks), the integer values for the ``--with-stack-start-*`` options represent the numbers of calls to shave off of the top of the stack traces for each language, effectively reducing the noise of internal mpileaks library function calls in generated traces. +According to the software's documentation (https://github.com/llnl/mpileaks), the integer values for the ``--with-stack-start-*`` options represent the numbers of calls to shave off of the top of the stack traces for each language, effectively reducing the noise of internal mpileaks library function calls in generated traces. For simplicity, we'll use one variant to supply the value for both arguments. From 183de62248941b1dd56ff8f238877237418282fa Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Sun, 15 Nov 2026 22:29:46 -0600 Subject: [PATCH 4/4] Centralize packaging package.py files in a single place Signed-off-by: Alec Scott --- outputs/package-py-files/0.package.py | 65 ------------------- outputs/package-py-files/1.package.py | 42 ------------ outputs/package-py-files/2.package.py | 43 ------------ outputs/package-py-files/3.package.py | 44 ------------- outputs/package-py-files/4.package.py | 57 ---------------- outputs/package-py-files/5.package.py | 59 ----------------- outputs/package-py-files/6.package.py | 59 ----------------- outputs/packaging.sh | 12 ++-- .../packaging/examples}/0.package.py | 0 .../packaging/examples}/1.package.py | 0 .../packaging/examples}/2.package.py | 0 .../packaging/examples}/3.package.py | 0 .../packaging/examples}/4.package.py | 0 .../packaging/examples}/5.package.py | 0 .../packaging/examples}/6.package.py | 0 tutorial_packaging.rst | 20 +++--- 16 files changed, 16 insertions(+), 385 deletions(-) delete mode 100644 outputs/package-py-files/0.package.py delete mode 100644 outputs/package-py-files/1.package.py delete mode 100644 outputs/package-py-files/2.package.py delete mode 100644 outputs/package-py-files/3.package.py delete mode 100644 outputs/package-py-files/4.package.py delete mode 100644 outputs/package-py-files/5.package.py delete mode 100644 outputs/package-py-files/6.package.py rename {tutorial/examples/packaging => outputs/packaging/examples}/0.package.py (100%) rename {tutorial/examples/packaging => outputs/packaging/examples}/1.package.py (100%) rename {tutorial/examples/packaging => outputs/packaging/examples}/2.package.py (100%) rename {tutorial/examples/packaging => outputs/packaging/examples}/3.package.py (100%) rename {tutorial/examples/packaging => outputs/packaging/examples}/4.package.py (100%) rename {tutorial/examples/packaging => outputs/packaging/examples}/5.package.py (100%) rename {tutorial/examples/packaging => outputs/packaging/examples}/6.package.py (100%) diff --git a/outputs/package-py-files/0.package.py b/outputs/package-py-files/0.package.py deleted file mode 100644 index 7957b563b3..0000000000 --- a/outputs/package-py-files/0.package.py +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright Spack Project Developers. See COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -# ---------------------------------------------------------------------------- -# If you submit this package back to Spack as a pull request, -# please first remove this boilerplate and all FIXME comments. -# -# This is a template package file for Spack. We've put "FIXME" -# next to all the things you'll want to change. Once you've handled -# them, you can save this file and test your package like this: -# -# spack install tutorial-mpileaks -# -# You can edit this file again by typing: -# -# spack edit tutorial-mpileaks -# -# See the Spack documentation for more information on packaging. -# ---------------------------------------------------------------------------- - -from spack_repo.builtin.build_systems.autotools import AutotoolsPackage - -from spack.package import * - - -class TutorialMpileaks(AutotoolsPackage): - """FIXME: Put a proper description of your package here.""" - - # FIXME: Add a proper url for your package's homepage here. - homepage = "https://www.example.com" - url = "https://github.com/llnl/mpileaks/archive/refs/tags/v1.0.tar.gz" - - # FIXME: Add a list of GitHub accounts to - # notify when the package is updated. - # maintainers("github_user1", "github_user2") - - # FIXME: Add the SPDX identifier of the project's license below. - # See https://spdx.org/licenses/ for a list. Upon manually verifying - # the license, set checked_by to your Github username. - license("UNKNOWN", checked_by="github_user1") - - version("1.0", sha256="24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9") - - depends_on("c", type="build") - depends_on("cxx", type="build") - depends_on("fortran", type="build") - - depends_on("autoconf", type="build") - depends_on("automake", type="build") - depends_on("libtool", type="build") - depends_on("m4", type="build") - - # FIXME: Add additional dependencies if required. - # depends_on("foo") - - def autoreconf(self, spec, prefix): - # FIXME: Modify the autoreconf method as necessary - autoreconf("--install", "--verbose", "--force") - - def configure_args(self): - # FIXME: Add arguments other than --prefix - # FIXME: If not needed delete this function - args = [] - return args diff --git a/outputs/package-py-files/1.package.py b/outputs/package-py-files/1.package.py deleted file mode 100644 index 9cec311935..0000000000 --- a/outputs/package-py-files/1.package.py +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright Spack Project Developers. See COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -from spack_repo.builtin.build_systems.autotools import AutotoolsPackage - -from spack.package import * - - -class TutorialMpileaks(AutotoolsPackage): - """Tool to detect and report leaked MPI objects like MPI_Requests and MPI_Datatypes.""" - - homepage = "https://github.com/llnl/mpileaks" - url = "https://github.com/llnl/mpileaks/archive/refs/tags/v1.0.tar.gz" - - maintainers("adamjstewart") - - license("BSD", checked_by="adamjstewart") - - version("1.0", sha256="24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9") - - depends_on("c", type="build") - depends_on("cxx", type="build") - depends_on("fortran", type="build") - - depends_on("autoconf", type="build") - depends_on("automake", type="build") - depends_on("libtool", type="build") - depends_on("m4", type="build") - - # FIXME: Add additional dependencies if required. - # depends_on("foo") - - def autoreconf(self, spec, prefix): - # FIXME: Modify the autoreconf method as necessary - autoreconf("--install", "--verbose", "--force") - - def configure_args(self): - # FIXME: Add arguments other than --prefix - # FIXME: If not needed delete this function - args = [] - return args diff --git a/outputs/package-py-files/2.package.py b/outputs/package-py-files/2.package.py deleted file mode 100644 index 85472fe5ae..0000000000 --- a/outputs/package-py-files/2.package.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright Spack Project Developers. See COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -from spack_repo.builtin.build_systems.autotools import AutotoolsPackage - -from spack.package import * - - -class TutorialMpileaks(AutotoolsPackage): - """Tool to detect and report leaked MPI objects like MPI_Requests and MPI_Datatypes.""" - - homepage = "https://github.com/llnl/mpileaks" - url = "https://github.com/llnl/mpileaks/archive/refs/tags/v1.0.tar.gz" - - maintainers("adamjstewart") - - license("BSD", checked_by="adamjstewart") - - version("1.0", sha256="24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9") - - depends_on("c", type="build") - depends_on("cxx", type="build") - depends_on("fortran", type="build") - - depends_on("autoconf", type="build") - depends_on("automake", type="build") - depends_on("libtool", type="build") - depends_on("m4", type="build") - - depends_on("mpi") - depends_on("adept-utils") - depends_on("callpath") - - def autoreconf(self, spec, prefix): - # FIXME: Modify the autoreconf method as necessary - autoreconf("--install", "--verbose", "--force") - - def configure_args(self): - # FIXME: Add arguments other than --prefix - # FIXME: If not needed delete this function - args = [] - return args diff --git a/outputs/package-py-files/3.package.py b/outputs/package-py-files/3.package.py deleted file mode 100644 index c94dbc1aef..0000000000 --- a/outputs/package-py-files/3.package.py +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright Spack Project Developers. See COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -from spack_repo.builtin.build_systems.autotools import AutotoolsPackage - -from spack.package import * - - -class TutorialMpileaks(AutotoolsPackage): - """Tool to detect and report leaked MPI objects like MPI_Requests and MPI_Datatypes.""" - - homepage = "https://github.com/llnl/mpileaks" - url = "https://github.com/llnl/mpileaks/archive/refs/tags/v1.0.tar.gz" - - maintainers("adamjstewart") - - license("BSD", checked_by="adamjstewart") - - version("1.0", sha256="24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9") - - depends_on("c", type="build") - depends_on("cxx", type="build") - depends_on("fortran", type="build") - - depends_on("autoconf", type="build") - depends_on("automake", type="build") - depends_on("libtool", type="build") - depends_on("m4", type="build") - - depends_on("mpi") - depends_on("adept-utils") - depends_on("callpath") - - def autoreconf(self, spec, prefix): - autoreconf("--install", "--verbose", "--force") - - def configure_args(self): - args = [ - f"--with-adept-utils={self.spec['adept-utils'].prefix}", - f"--with-callpath={self.spec['callpath'].prefix}", - ] - - return args diff --git a/outputs/package-py-files/4.package.py b/outputs/package-py-files/4.package.py deleted file mode 100644 index 6c35abc6c4..0000000000 --- a/outputs/package-py-files/4.package.py +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright Spack Project Developers. See COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -from spack_repo.builtin.build_systems.autotools import AutotoolsPackage - -from spack.package import * - - -class TutorialMpileaks(AutotoolsPackage): - """Tool to detect and report leaked MPI objects like MPI_Requests and MPI_Datatypes.""" - - homepage = "https://github.com/llnl/mpileaks" - url = "https://github.com/llnl/mpileaks/archive/refs/tags/v1.0.tar.gz" - - maintainers("adamjstewart") - - license("BSD", checked_by="adamjstewart") - - version("1.0", sha256="24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9") - - variant( - "stackstart", - values=int, - default="0", - description="Specify the number of stack frames to truncate", - ) - - depends_on("c", type="build") - depends_on("cxx", type="build") - depends_on("fortran", type="build") - - depends_on("autoconf", type="build") - depends_on("automake", type="build") - depends_on("libtool", type="build") - depends_on("m4", type="build") - - depends_on("mpi") - depends_on("adept-utils") - depends_on("callpath") - - def autoreconf(self, spec, prefix): - autoreconf("--install", "--verbose", "--force") - - def configure_args(self): - args = [ - f"--with-adept-utils={self.spec['adept-utils'].prefix}", - f"--with-callpath={self.spec['callpath'].prefix}", - ] - - stackstart = int(self.spec.variants["stackstart"].value) - if stackstart: - args.extend( - [f"--with-stack-start-c={stackstart}", f"--with-stack-start-fortran={stackstart}"] - ) - - return args diff --git a/outputs/package-py-files/5.package.py b/outputs/package-py-files/5.package.py deleted file mode 100644 index 9c7c4150bb..0000000000 --- a/outputs/package-py-files/5.package.py +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright Spack Project Developers. See COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -from spack_repo.builtin.build_systems.autotools import AutotoolsPackage - -from spack.package import * - - -class TutorialMpileaks(AutotoolsPackage): - """Tool to detect and report leaked MPI objects like MPI_Requests and MPI_Datatypes.""" - - homepage = "https://github.com/llnl/mpileaks" - url = "https://github.com/llnl/mpileaks/archive/refs/tags/v1.0.tar.gz" - - maintainers("adamjstewart") - - sanity_check_is_dir = ["bin", "lib", "shar"] - - license("BSD", checked_by="adamjstewart") - - version("1.0", sha256="24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9") - - variant( - "stackstart", - values=int, - default="0", - description="Specify the number of stack frames to truncate", - ) - - depends_on("c", type="build") - depends_on("cxx", type="build") - depends_on("fortran", type="build") - - depends_on("autoconf", type="build") - depends_on("automake", type="build") - depends_on("libtool", type="build") - depends_on("m4", type="build") - - depends_on("mpi") - depends_on("adept-utils") - depends_on("callpath") - - def autoreconf(self, spec, prefix): - autoreconf("--install", "--verbose", "--force") - - def configure_args(self): - args = [ - f"--with-adept-utils={self.spec['adept-utils'].prefix}", - f"--with-callpath={self.spec['callpath'].prefix}", - ] - - stackstart = int(self.spec.variants["stackstart"].value) - if stackstart: - args.extend( - [f"--with-stack-start-c={stackstart}", f"--with-stack-start-fortran={stackstart}"] - ) - - return args diff --git a/outputs/package-py-files/6.package.py b/outputs/package-py-files/6.package.py deleted file mode 100644 index 17f0ad0a35..0000000000 --- a/outputs/package-py-files/6.package.py +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright Spack Project Developers. See COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -from spack_repo.builtin.build_systems.autotools import AutotoolsPackage - -from spack.package import * - - -class TutorialMpileaks(AutotoolsPackage): - """Tool to detect and report leaked MPI objects like MPI_Requests and MPI_Datatypes.""" - - homepage = "https://github.com/llnl/mpileaks" - url = "https://github.com/llnl/mpileaks/archive/refs/tags/v1.0.tar.gz" - - maintainers("adamjstewart") - - sanity_check_is_dir = ["bin", "lib", "share"] - - license("BSD", checked_by="adamjstewart") - - version("1.0", sha256="24c706591bdcd84541e19389a9314813ce848035ee877e213d528b184f4b43f9") - - variant( - "stackstart", - values=int, - default="0", - description="Specify the number of stack frames to truncate", - ) - - depends_on("c", type="build") - depends_on("cxx", type="build") - depends_on("fortran", type="build") - - depends_on("autoconf", type="build") - depends_on("automake", type="build") - depends_on("libtool", type="build") - depends_on("m4", type="build") - - depends_on("mpi") - depends_on("adept-utils") - depends_on("callpath") - - def autoreconf(self, spec, prefix): - autoreconf("--install", "--verbose", "--force") - - def configure_args(self): - args = [ - f"--with-adept-utils={self.spec['adept-utils'].prefix}", - f"--with-callpath={self.spec['callpath'].prefix}", - ] - - stackstart = int(self.spec.variants["stackstart"].value) - if stackstart: - args.extend( - [f"--with-stack-start-c={stackstart}", f"--with-stack-start-fortran={stackstart}"] - ) - - return args diff --git a/outputs/packaging.sh b/outputs/packaging.sh index c2941bad30..461b3d7e77 100755 --- a/outputs/packaging.sh +++ b/outputs/packaging.sh @@ -36,11 +36,11 @@ example packaging/checksum-mpileaks-1 "spack checksum tutorial-mpileaks 1.0" example --tee --expect-error packaging/install-mpileaks-1 "spack install tutorial-mpileaks" # add documentation -cp "$PROJECT/package-py-files/1.package.py" "$mpileaks_package_py" +cp "$PROJECT/packaging/examples/1.package.py" "$mpileaks_package_py" example packaging/info-mpileaks "spack info --phases tutorial-mpileaks" # add dependencies -cp "$PROJECT/package-py-files/2.package.py" "$mpileaks_package_py" +cp "$PROJECT/packaging/examples/2.package.py" "$mpileaks_package_py" example --tee --expect-error packaging/install-mpileaks-2 "spack install tutorial-mpileaks" stage_dir="$(spack location -s tutorial-mpileaks)" @@ -67,20 +67,20 @@ example packaging/build-output "cat $stage_dir/spack-build-out.txt" #run_configure # configure arguments -cp "$PROJECT/package-py-files/3.package.py" "$mpileaks_package_py" +cp "$PROJECT/packaging/examples/3.package.py" "$mpileaks_package_py" example --tee packaging/install-mpileaks-3 "spack install tutorial-mpileaks" # variants -cp "$PROJECT/package-py-files/4.package.py" "$mpileaks_package_py" +cp "$PROJECT/packaging/examples/4.package.py" "$mpileaks_package_py" example --tee packaging/install-mpileaks-4 "spack install --verbose tutorial-mpileaks stackstart=4" # TODO: Re-enable once https://github.com/spack/spack/issues/52573 is resolved. # tests #example --tee packaging/install-mpileaks-5 "spack uninstall -ay tutorial-mpileaks" -#cp "$PROJECT/package-py-files/5.package.py" "$mpileaks_package_py" +#cp "$PROJECT/packaging/examples/5.package.py" "$mpileaks_package_py" #example --tee --expect-error packaging/install-mpileaks-5 "spack install --test=root tutorial-mpileaks" # -#cp "$PROJECT/package-py-files/6.package.py" "$mpileaks_package_py" +#cp "$PROJECT/packaging/examples/6.package.py" "$mpileaks_package_py" #example --tee packaging/install-mpileaks-6 "spack install --test=root tutorial-mpileaks" # cleanup diff --git a/tutorial/examples/packaging/0.package.py b/outputs/packaging/examples/0.package.py similarity index 100% rename from tutorial/examples/packaging/0.package.py rename to outputs/packaging/examples/0.package.py diff --git a/tutorial/examples/packaging/1.package.py b/outputs/packaging/examples/1.package.py similarity index 100% rename from tutorial/examples/packaging/1.package.py rename to outputs/packaging/examples/1.package.py diff --git a/tutorial/examples/packaging/2.package.py b/outputs/packaging/examples/2.package.py similarity index 100% rename from tutorial/examples/packaging/2.package.py rename to outputs/packaging/examples/2.package.py diff --git a/tutorial/examples/packaging/3.package.py b/outputs/packaging/examples/3.package.py similarity index 100% rename from tutorial/examples/packaging/3.package.py rename to outputs/packaging/examples/3.package.py diff --git a/tutorial/examples/packaging/4.package.py b/outputs/packaging/examples/4.package.py similarity index 100% rename from tutorial/examples/packaging/4.package.py rename to outputs/packaging/examples/4.package.py diff --git a/tutorial/examples/packaging/5.package.py b/outputs/packaging/examples/5.package.py similarity index 100% rename from tutorial/examples/packaging/5.package.py rename to outputs/packaging/examples/5.package.py diff --git a/tutorial/examples/packaging/6.package.py b/outputs/packaging/examples/6.package.py similarity index 100% rename from tutorial/examples/packaging/6.package.py rename to outputs/packaging/examples/6.package.py diff --git a/tutorial_packaging.rst b/tutorial_packaging.rst index de1e8083e6..a9c51712a6 100644 --- a/tutorial_packaging.rst +++ b/tutorial_packaging.rst @@ -123,8 +123,8 @@ As we can see from the skeleton contents, the Spack template: The areas we need to modify are highlighted in the figure below. -.. literalinclude:: tutorial/examples/packaging/0.package.py - :caption: tutorial-mpileaks/package.py (from tutorial/examples/packaging/0.package.py) +.. literalinclude:: outputs/packaging/examples/0.package.py + :caption: tutorial-mpileaks/package.py (from outputs/packaging/examples/0.package.py) :language: python :emphasize-lines: 5-20,28,30-31,34-36,38-40,42-45,59-60,63,67-70 @@ -193,8 +193,8 @@ Now make the changes and additions to your ``package.py`` file. The resulting package should contain the following information, omitting the copyright and license: -.. literalinclude:: tutorial/examples/packaging/1.package.py - :caption: tutorial-mpileaks/package.py (from tutorial/examples/packaging/1.package.py) +.. literalinclude:: outputs/packaging/examples/1.package.py + :caption: tutorial-mpileaks/package.py (from outputs/packaging/examples/1.package.py) :lines: 5- :language: python :emphasize-lines: 7,9,12,14,16 @@ -258,8 +258,8 @@ Bring ``tutorial-mpileaks``' ``package.py`` file back up with the ``spack edit`` and add the dependencies by specifying them using the ``depends_on`` directive as shown below: -.. literalinclude:: tutorial/examples/packaging/2.package.py - :caption: tutorial-mpileaks/package.py (from tutorial/examples/packaging/2.package.py) +.. literalinclude:: outputs/packaging/examples/2.package.py + :caption: tutorial-mpileaks/package.py (from outputs/packaging/examples/2.package.py) :lines: 5- :language: python :emphasize-lines: 30-32 @@ -408,8 +408,8 @@ Bring ``tutorial-mpileaks``' ``package.py`` file back up with the ``spack edit`` and add the ``--with-adept-utils`` and ``--with-callpath`` arguments in the ``configure_args`` method as follows: -.. literalinclude:: tutorial/examples/packaging/3.package.py - :caption: tutorial-mpileaks/package.py (from tutorial/examples/packaging/3.package.py) +.. literalinclude:: outputs/packaging/examples/3.package.py + :caption: tutorial-mpileaks/package.py (from outputs/packaging/examples/3.package.py) :lines: 5- :language: python :emphasize-lines: 38-41 @@ -462,8 +462,8 @@ Bring ``tutorial-mpileaks``' ``package.py`` file back up with the ``spack edit`` and add the ``variant`` directive and associated arguments as follows: -.. literalinclude:: tutorial/examples/packaging/4.package.py - :caption: tutorial-mpileaks/package.py (from tutorial/examples/packaging/4.package.py) +.. literalinclude:: outputs/packaging/examples/4.package.py + :caption: tutorial-mpileaks/package.py (from outputs/packaging/examples/4.package.py) :lines: 5- :language: python :emphasize-lines: 20-25,50-57