I have a Python package that attempts to import the importlib.resources module (added in Python 3.7, as I understand), and then falls back on importing importlib_resources if this fails. importlib_resources is provided by the PyPI package importlib-resources.
So, I want my pip install dependencies to be "nothing if running 3.7 or newer, importlib-resources otherwise".
Is there some way to specify this dependency in the setup script?