From 69e348da3b3df0e42349e384d0c8ae0e175ba4ff Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Tue, 13 May 2025 14:39:12 +0200 Subject: [PATCH] remove unhelpful section --- lib/spack/docs/packaging_guide.rst | 44 ------------------------------ 1 file changed, 44 deletions(-) diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index a87cfa23c5d..29f7d90c952 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -4159,50 +4159,6 @@ condition is true. You can explicitly cause the build to fail from if spec.architecture.startswith("darwin"): raise InstallError("This package does not build on Mac OS X!") -.. _shell-wrappers: - -^^^^^^^^^^^^^^^^^^^^^^^ -Shell command functions -^^^^^^^^^^^^^^^^^^^^^^^ - -Recall the install method from ``libelf``: - -.. literalinclude:: _spack_root/var/spack/repos/spack_repo/builtin/packages/libelf/package.py - :pyobject: Libelf.install - :linenos: - -Normally in Python, you'd have to write something like this in order -to execute shell commands: - -.. code-block:: python - - import subprocess - subprocess.check_call("configure", "--prefix={0}".format(prefix)) - -We've tried to make this a bit easier by providing callable wrapper -objects for some shell commands. By default, ``configure``, -``cmake``, and ``make`` wrappers are are provided, so you can call -them more naturally in your package files. - -If you need other commands, you can use ``which`` to get them: - -.. code-block:: python - - sed = which("sed") - sed("s/foo/bar/", filename) - -The ``which`` function will search the ``PATH`` for the application. - -Callable wrappers also allow spack to provide some special features. -For example, in Spack, ``make`` is parallel by default, and Spack -figures out the number of cores on your machine and passes an -appropriate value for ``-j`` when it calls ``make`` (see the -``parallel`` `package attribute `). In -a package file, you can supply a keyword argument, ``parallel=False``, -to the ``make`` wrapper to disable parallel make. In the ``libelf`` -package, this allows us to avoid race conditions in the library's -build system. - ^^^^^^^^^^^^^^ Compiler flags ^^^^^^^^^^^^^^