How to handle different dependencies for different python versions?

I’m working on updating the sphinx-autoapi feedstock, and they have these requirements:

- astroid >=2.7  #[py<312]
- astroid >=3.0  #[py>=312]

Will those selectors work?

I’m still a bit confused – this is certainly pure python package, i.e. no architecture specific, but apparently not completely Python-version independent.

Hmm – astroid itself is python-version-dependent. But there are builds of 3.* for python < 3.12, so this selector is needed (unless the upstream has it wrong…)

replying to myslef – I got a admonition from the linter:

  • noarch packages can’t have selectors. If the selectors are necessary, please remove noarch: python.

So that’s that – I guess I need to get rid of the noarch, which is a shame. I’ll ask upstream.

and yet another reply to myself – I hadn’t looked carefully enough – it looks like I can simply do > 3.0 for all, and good to go.