Merge pull request #1593 from eschnett/eschnett/depends_on

Expand/clarify description of dependency types
This commit is contained in:
Todd Gamblin 2016-08-31 12:07:11 -07:00 committed by GitHub
commit bf8413379f

View file

@ -1345,20 +1345,31 @@ Additionally, dependencies may be specified for specific use cases:
The dependency types are: The dependency types are:
* **"build"**: made available during the project's build. The package will * **"build"**: The dependency package is made available during the
be added to ``PATH``, the compiler include paths, and ``PYTHONPATH``. package's build. While the package is built, the dependency
Other projects which depend on this one will not have these modified package's install directory will be added to ``PATH``, the
(building project X doesn't need project Y's build dependencies). compiler include and library paths, as well as ``PYTHONPATH``.
* **"link"**: the project is linked to by the project. The package will be This only applies during this package's build; other packages
added to the current package's ``rpath``. which depend on this one will not know about the dependency
* **"run"**: the project is used by the project at runtime. The package will package. In other words, building another project Y doesn't know
be added to ``PATH`` and ``PYTHONPATH``. about this project X's build dependencies.
* **"link"**: The dependency package is linked against by this
package, presumably via shared libraries. The dependency package
will be added to this package's run-time library search path
``rpath``.
* **"run"**: The dependency package is used by this package at run
time. The dependency package will be added to both ``PATH`` and
``PYTHONPATH`` at run time, but not during build time. **"link"**
and **"run"** are similar in that they both describe a dependency
that exists when the package is used, but they differ in the
mechanism: **"link"** is via shared libraries, and **"run"** via
an explicit search.
If not specified, ``type`` is assumed to be ``("build", "link")``. This is the If not specified, ``type`` is assumed to be ``("build", "link")``.
common case for compiled language usage. Also available are the aliases This is the common case for compiled language usage. Also available
``"alldeps"`` for all dependency types and ``"nolink"`` (``("build", "run")``) are the aliases ``"alldeps"`` for all dependency types combined, and
for use by dependencies which are not expressed via a linker (e.g., Python or ``"nolink"`` (``("build", "run")``) for use by dependencies which are
Lua module loading). not expressed via a linker (e.g., Python or Lua module loading).
.. _setup-dependent-environment: .. _setup-dependent-environment: