Remove view print
for now.
This commit is contained in:
@@ -330,124 +330,6 @@ of libelf would look like this:
|
||||
|
||||
The full spec syntax is discussed in detail in :ref:`sec-specs`.
|
||||
|
||||
``spack view print``
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
``spack view print`` is a subcommand of ``spack view`` which displays information about one or more installed packages and their dependencies using a user-provided format string. The string can reverence variables in a shell-like manner for example ``$variable`` or ``${variable}text``. It can also include ``\t`` for tabs and ``\n`` for new lines.
|
||||
|
||||
Some of the supported variables are:
|
||||
|
||||
``name``
|
||||
The package name.
|
||||
|
||||
``version``
|
||||
The package version.
|
||||
|
||||
``spec``
|
||||
The package specification.
|
||||
|
||||
``root``
|
||||
The root specification.
|
||||
|
||||
``prefix``
|
||||
The installation directory.
|
||||
|
||||
``variants``
|
||||
The collection of variants, if any.
|
||||
|
||||
``namespace``
|
||||
The package repository name space.
|
||||
|
||||
``compiler``
|
||||
The compiler \`name@versoin\` used to build the package.
|
||||
|
||||
``architecture``
|
||||
The architecture targeted by the compiler.
|
||||
|
||||
``dependencies``
|
||||
A comma-separated list of names of packages on which the package depends.
|
||||
|
||||
``dependents``
|
||||
A comma-separated list of names of packages which depend on the package.
|
||||
|
||||
``hash``
|
||||
The Spack hash for the package.
|
||||
|
||||
``url``
|
||||
The source URL for the package.
|
||||
|
||||
``stage``
|
||||
The directory for staging the build.
|
||||
|
||||
``build_log``
|
||||
The path to the build log file.
|
||||
|
||||
``rpath``
|
||||
The colon-separated library \`RPATH\` used in building the package.
|
||||
|
||||
Here are some example uses of `spack view print`. A simple line-oriented report of information can be produced:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
$ spack view print '$name\t$version\t$hash\n' cmake@3.5.2
|
||||
ncurses 6.0 bvbu4ixbnvtodpik4qzljlx3ukpyfrcz
|
||||
zlib 1.2.8 ckki7zlryxrsetfqkgoxxahlhqqjni7n
|
||||
openssl 1.0.2g 6zbar63sciso253nptxyrnhupymo7oyi
|
||||
cmake 3.5.2 wprvmoczkpw4tiy5ybuk5zr7saus2d7g
|
||||
|
||||
There are better ways to do this but a slow-and-dirty shell init procedure can be formed:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
$ spack view print 'export PATH="${prefix}/bin:$$PATH"\n' m4
|
||||
export PATH="/spack/opt/spack/linux-x86_64/gcc-5.2.1/libsigsegv-2.10-h6hsv76hffcjoe3nsaihzxemniwiedu2/bin:$PATH"
|
||||
export PATH="/spack/opt/spack/linux-x86_64/gcc-5.2.1/m4-1.4.17-a4ikhddnk2zonr66mbwaqb226uhigcrp/bin:$PATH"
|
||||
$ eval $(spack view print 'export PATH="${prefix}/bin:$$PATH"\n' m4)
|
||||
|
||||
Or, maybe you have some external application that can chew on Spack data in which case you can dump it to some easily parsed markup syntax such as YAML:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
|
||||
$ spack view print '${name}:\n - version: ${version}\n - url : ${url}\n - spec: ${spec}\n - prefix: ${prefix}\n - root : ${root}\n - stage : ${stage}\n - log: ${build_log}\n' m4
|
||||
|
||||
Which might produce something like:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
libsigsegv:
|
||||
- version: 2.10
|
||||
- url : ftp://ftp.gnu.org/gnu/libsigsegv/libsigsegv-2.10.tar.gz
|
||||
- spec: libsigsegv@2.10%gcc@5.2.1=linux-x86_64-h6hsv76
|
||||
- prefix: /spack/opt/spack/linux-x86_64/gcc-5.2.1/libsigsegv-2.10-h6hsv76hffcjoe3nsaihzxemniwiedu2
|
||||
- root : m4@1.4.17%gcc@5.2.1+sigsegv=linux-x86_64^libsigsegv@2.10%gcc@5.2.1=linux-x86_64
|
||||
- stage : /spack/var/spack/stage/libsigsegv-2.10-h6hsv76hffcjoe3nsaihzxemniwiedu2
|
||||
- log: /spack/opt/spack/linux-x86_64/gcc-5.2.1/libsigsegv-2.10-h6hsv76hffcjoe3nsaihzxemniwiedu2/.spack/build.out
|
||||
m4:
|
||||
- version: 1.4.17
|
||||
- url : ftp://ftp.gnu.org/gnu/m4/m4-1.4.17.tar.gz
|
||||
- spec: m4@1.4.17%gcc@5.2.1+sigsegv=linux-x86_64-a4ikhdd
|
||||
- prefix: /spack/opt/spack/linux-x86_64/gcc-5.2.1/m4-1.4.17-a4ikhddnk2zonr66mbwaqb226uhigcrp
|
||||
- root : m4@1.4.17%gcc@5.2.1+sigsegv=linux-x86_64^libsigsegv@2.10%gcc@5.2.1=linux-x86_64
|
||||
- stage : /spack/var/spack/stage/m4-1.4.17-a4ikhddnk2zonr66mbwaqb226uhigcrp
|
||||
- log: /spack/opt/spack/linux-x86_64/gcc-5.2.1/m4-1.4.17-a4ikhddnk2zonr66mbwaqb226uhigcrp/.spack/build.out
|
||||
|
||||
Or, maybe you want to do something with information about package dependencies by generating some ready-to-import Python code holding the tree:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
$ spack view print '$name = dict(name = "$name", parents = [$dependencies], children = [$dependents])\n' cmake@3.5.2
|
||||
|
||||
Producing this Python code
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
ncurses = dict(name = "ncurses", parents = []])
|
||||
zlib = dict(name = "zlib", parents = []])
|
||||
openssl = dict(name = "openssl", parents = [zlib]])
|
||||
cmake = dict(name = "cmake", parents = [ncurses,openssl]])
|
||||
|
||||
|
||||
|
||||
|
||||
Compiler configuration
|
||||
|
Reference in New Issue
Block a user