Is there a way to have a conditional requirements.txt file for my Python application based on platform?

前端 未结 4 1583
陌清茗
陌清茗 2020-12-02 15:06

I have a python application that I wrote to be compatible with both, Linux and Windows platforms. However there is one problem... One of the python packages I need for Windo

4条回答
  •  伪装坚强ぢ
    2020-12-02 15:42

    Use this in the requirements.txt file

    uwsgi==2.0.18; platform_system != "Windows"
    

    in this case pip will install uwsgi if not running on Windows

提交回复
热议问题