问题
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