Amazon device farm - 不支持来自 macosx 平台的 wheel 文件

Amazon device farm - wheel file from macosx platform not supported

我在 AWS device farm 中配置 Appium python 测试时遇到以下错误:

There was a problem processing your file. We found at least one wheel file wheelhouse/numpy-1.12.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl specified a platform that we do not support. Please unzip your test package and then open the wheelhouse directory, verify that names of wheel files end with -any.whl or -linux_x86_64.whl, and try again

我需要 numpy 和 opencv-python 包来 运行 我的测试。 如何解决这个问题?

AWS Device Farm 已发布 packaging requirements for Python 测试。具体而言,以下内容似乎适用于您:

The instructions below are based on Linux x86_64 and Mac. In the currently supported scheme, Device Farm requires that the packaging of your Appium Python tests be done on Linux x86_64 if your tests contain non-universal Python wheels dependencies. For the platform on which you execute a command, the wheels tools gather your .whl dependent files under the wheelhouse/ folder. When you execute the Python wheel command on any platform other than Linux x86_64, you would gather the flavor of a non-univesral wheel dependency for that particular platform and may cause undesired effects. This would most likely lead to errors when executing your tests on Device Farm.

(numpy-1.12.0-cp27-cp27m-manylinux1_x86_64.whl) 是 ubuntu 的 numpy 轮。 但是在使用此 wheel 配置测试时,Amazon device farm 仍然会抛出错误。

基本上,Device farm 正在验证 .whl 文件是否具有前缀 -none-any.whl

只需将文件重命名为 numpy-1.12.0-cp27-none-any.whl 即可在设备农场中使用。

注意:这个重命名的文件是non-universal python wheel。 non-universal python wheel 中可能没有实现的东西很少。这可能会导致某些东西破裂。因此,在使用它之前进行测试以确保所有依赖项都正常工作。