【问题标题】:Installing platform-specific dependencies through PIP通过 PIP 安装特定于平台的依赖项
【发布时间】:2014-10-31 04:58:06
【问题描述】:

我在我的测试中使用 LDTP,它作为两个不同的包提供给两个不同的平台:

  • Mac OS 上的 PyAtom;
  • Linux 上的 LDTP。

碰巧的是,它们都具有特定于平台的二进制文件,并且不能真正安装在其他操作系统上。我的问题是,如何让我的requirements.txt 安装依赖于平台的软件包?

理想情况下应该是这样的:

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

【问题讨论】:

标签: python pip package-managers requirements.txt


【解决方案1】:

也许您可以为每个平台要求创建一个文件:

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

然后运行例如:

pip install -r requirements-mac.txt

如果你喜欢...

【讨论】:

    猜你喜欢
    • 2021-08-05
    • 2016-08-21
    • 2013-03-30
    • 2017-04-18
    • 2013-04-09
    • 2020-02-04
    • 2018-09-27
    • 2011-01-20
    • 2014-10-06
    相关资源
    最近更新 更多