Installing platform-specific dependencies through

2019-08-06 03:28发布

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条回答
叼着烟拽天下
2楼-- · 2019-08-06 03:49

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...

查看更多
登录 后发表回答