diff options
author | Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> | 2024-01-09 11:04:38 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-09 19:04:38 +0000 |
commit | bf3990039009d65213beaebea50054276ca93a16 (patch) | |
tree | d5959050cc9346296206ab0410b52434f0373e12 | |
parent | 7583cf20d8b51368625b5693f9b811c35418fb7e (diff) | |
download | spack-bf3990039009d65213beaebea50054276ca93a16.tar.gz spack-bf3990039009d65213beaebea50054276ca93a16.tar.bz2 spack-bf3990039009d65213beaebea50054276ca93a16.tar.xz spack-bf3990039009d65213beaebea50054276ca93a16.zip |
Move in vs. satisfies to a note and mention special cases of in (#41727)
* Move in vs. satisfies to a note and mention special cases of in
* Address feedback: oveoverlap -> intersect
* Re-word the satisfies versus in note.
---------
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
-rw-r--r-- | lib/spack/docs/packaging_guide.rst | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index 585276739c..54ad132e10 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -4379,10 +4379,16 @@ implementation was selected for this build: elif "mvapich" in spec: configure_args.append("--with-mvapich") -It's also a bit more concise than satisfies. The difference between -the two functions is that ``satisfies()`` tests whether spec -constraints overlap at all, while ``in`` tests whether a spec or any -of its dependencies satisfy the provided spec. +It's also a bit more concise than satisfies. + +.. note:: + + The ``satisfies()`` method tests whether this spec has, at least, all the constraints of the argument spec, + while ``in`` tests whether a spec or any of its dependencies satisfy the provided spec. + + If the provided spec is anonymous (e.g., ":1.2:", "+shared") or has the + same name as the spec being checked, then ``in`` works the same as + ``satisfies()``; however, use of ``satisfies()`` is more intuitive. ^^^^^^^^^^^^^^^^^^^^^^^ Architecture specifiers |