Installing platform-specific dependencies through PIP

I use LDTP in my tests, and it comes in two different packages for two different platforms:

  • PyAtom on Mac OS
  • LDTP on Linux.

It so happened that both of them have platform-specific binaries, and they cannot be installed on other OSs. My question is: how do I install requirements.txtto install packages depending on the 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
source share
1 answer

perhaps you can create a file for each platform:

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

and then run for example:

pip install -r requirements-mac.txt

if you like...

+1
source

All Articles