Conditional requirements in setup.py
问题 I'm writing a library that's dependent on file-magic, which works just fine for most platforms, but in Alpine Linux, file-magic won't work so I need to instead use the python-magic library. Now I know how to write my own code to handle the different Python library APIs, but what I don't know how to do is to write my setup.cfg or setup.py to have a different requirements based on the system on which we're doing the installation. I figured the best option would be to use the PEP 508 rules, but