My Python package requires Python >= 3.8 (defined in setup.cfg
or pyproject.toml
):
python_requires = >=3.8
However, it also has the following optional dependency :
tensorflow>=2.7.0
If optional dependencies are tob be installed, I would like to require Python < 3.11 on macOS only. Previously, I tried:
tensorflow>=2.7.0;python_version<'3.11'
But that contrains Python on all platforms. Is there a way to achieve this?