conan-io / conan-io/docs

Document `tool_requires(..., options={})` and other methods of setting build requirement options

Open
#3,026 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
125
Forks
382
Avg merge
22h 39m
Merged PRs (30d)
21

Description

The 2.0 documentation doesn't address any methods of setting the options of build requirements, either `tool_requires` or `test_requires`. The 1.x method of setting them in `configure()` doesn't appear to be working in 2.0 (not sure if this is a bug), but the documentation should address at least some methods of doing this.

The following links refer to the `tool_requires(..., options={})` syntax which is currently undocumented as far as I can tell:
* https://github.com/conan-io/conan/issues/3213#issuecomment-1440979025
* https://github.com/conan-io/conan/issues/13215#issuecomment-1442617425

I had a feeling that I'd seen another method of setting options for build requirements, but I can't find the issue at the moment. It strikes me that there _must_ be one, because as it stands the above syntax is not sufficient to modify package options based on logic.

For completeness, this appears to work:

```python
def build_requirements(self):
self.tool_requires("mytool@user/channel",options={"optA":"value"})
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.