Skip to content

Commit 8916a59

Browse files
committed
Add compile_requires
Ad an attribute to allow components to specify that a requirement should only be considered at compile-time. This is the opposite of the already existing `link_requires` attribute.
1 parent 3b83aef commit 8916a59

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
project = 'Common Package Specification'
1414
copyright = '2024, Matthew Woehlke'
1515

16-
version_info = (0, 13, 0)
16+
version_info = (0, 14, 0)
1717
release = '.'.join(map(str, version_info))
1818
version = '.'.join(map(str, version_info[:2]))
1919

schema.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,23 @@ Attribute names are case sensitive.
122122
depending on the language of the consuming source file.
123123
Handling of such shall be the same as for `definitions`_.
124124

125+
.. ----------------------------------------------------------------------------
126+
.. cps:attribute:: compile_requires
127+
:type: list(string)
128+
:context: component configuration
129+
130+
Specifies additional components required by a component
131+
which are needed only at the compile stage.
132+
Unlike `requires (component)`_,
133+
only the required components' compilation-related attributes
134+
should be applied transitively;
135+
link requirements of the required component(s) should be ignored.
136+
137+
This is especially useful for libraries
138+
whose interfaces rely on the data types of a dependency
139+
but do not expose linkable symbols of that dependency,
140+
or which dynamically load the dependency at run-time.
141+
125142
.. ----------------------------------------------------------------------------
126143
.. cps:attribute:: components
127144
:type: map(component)

0 commit comments

Comments
 (0)