Skip to content

Document how to add conditional dependencies #510

@citibeth

Description

@citibeth

@mathstuf :
On Tue, Mar 08, 2016 at 14:27:50 -0500, Elizabeth Fischer wrote:

Not sure if Spack can do this, I didn't find anything in the docs that says
it can...

Suppose I have library B, which depends on A. Different versions of B
require specific versions of A. For example:

How would I write a package.py file encoding this version-dependent
dependency information? The normal way these things are written, the
depends_on() statement is written before the B's version number is known.

Would:

depends_on('[email protected]:1.3', when='@1.0')
depends_on('[email protected]:', when='@2.0')

not work?

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions