Installing platform-specific dependencies through PIP

╄→гoц情女王★ 提交于 2019-12-11 11:20:04

问题


I'm using LDTP in my tests and it comes as two different packages for two different platforms:

  • PyAtom on Mac OS;
  • LDTP on Linux.

It so happens, that both of them has platform-specific binaries and can't really be installed on other OSes. My question is, how do I make my requirements.txt to install packages dependent on platform?

Ideally it should be something like:

mac:
  -e git+https://github.com/pyatom/pyatom.git@1ca0c6a0343000286a328268899d1aab376d8e82#egg=atomac-master
linux:
  ldtp==3.5.0
holmium.core==0.7.6
pytest==2.5.2
selenium==2.42.1

回答1:


maybe you can create a file for each platform requirements:

requirements-windows.txt
requirements-linux.txt
requirements-mac.txt

and then run for example:

pip install -r requirements-mac.txt

if you like...



来源:https://stackoverflow.com/questions/25699427/installing-platform-specific-dependencies-through-pip

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!