You can do this with "Environment Markers" as specified in PEP-508:
Here's an example of using such a marker inside a requirements.txt
:
pyreadline==2.1; platform_system == "Windows"
Similarly, in a setup.py
:
setup(
...
install_requires=['pyreadline; platform_system == "Windows"'],
)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…