[recipe-spec] Allow for arbitrary optional dependencies
See original GitHub issueProposal:
Have a single top-level requirements
section as there is currently with required keys host
and run
and then optionally allow any other keys to specify named dependencies.
A requirements.build
key would then be handled the same as currently but test dependencies would now be included as an optional requirements.test
key. The specification of test dependencies under requirements.test
would then be consistent with the specification of other dependencies under requirements
(e.g. requirements.build
rather than build.requirements
)
In this way mamba/boa
could provide support for the extras_require
capability in setuptools
/pip
which is very widely used, and very useful.
Similar to setuptools
, having a special-cased test requirements section could be removed in favour of treating them like any other optional dependency:
To get the benefit of this new capability would require all the requirements to be saved in the package metadata and for mamba
to allow users to install any named dependencies in the package metadata.
Currently, it’s very awkward for users to create either a build or test environment as there’s no way to tell mamba
to create an environment with those specific deps.
The current recommendation to instead create separate outputs for any optional dependencies is awkward to specify and clutters up package repositories with multiple metadata-only packages for every single build.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:12 (11 by maintainers)
Top GitHub Comments
I think the multi-packages / multi-output way would be by far more backward compatible.
I see your point – if we consider having many (empty) packages to be expensive. Let’s let this ferment a bit.
Regarding moving the
test
requirements under therequirements.test
(instead oftest.requires
) is something I thought about today and maybe that’s the first step into this direction, actually.