简体   繁体   English

无法使用Kivy工具链编译iOS的第三方程序包

[英]Unable to compile third-party package for iOS using Kivy toolchain

I am working on a small testing project and wanted to add Robot Remoteserver onto an iOS device but can't get toolchain to build the package successfully. 我正在做一个小型测试项目,想将Robot Remoteserver添加到iOS设备上,但是无法获得成功构建软件包的工具链。 Here's the errors I get when I attempt to build this package: 这是我尝试构建此程序包时遇到的错误:

copying build/lib/robotremoteserver.py -> /Users/usman/kivy/kivy-ios/build/robotremoteserver/i386/PythonRemoteServer-master/iosbuild/lib/python2.7/site-packages
byte-compiling /Users/usman/kivy/kivy-ios/build/robotremoteserver/i386/PythonRemoteServer-master/iosbuild/lib/python2.7/site-packages/robotremoteserver.py to robotremoteserver.pyc
writing byte-compilation script '/tmp/tmpM9XgVf.py'
/Users/usman/kivy/kivy-ios/dist/hostpython/bin/python -OO /tmp/tmpM9XgVf.py
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
removing /tmp/tmpM9XgVf.py
running install_egg_info
Removing /Users/usman/kivy/kivy-ios/build/robotremoteserver/i386/PythonRemoteServer-master/iosbuild/lib/python2.7/site-packages/robotremoteserver-devel-py2.7.egg-info
Writing /Users/usman/kivy/kivy-ios/build/robotremoteserver/i386/PythonRemoteServer-master/iosbuild/lib/python2.7/site-packages/robotremoteserver-devel-py2.7.egg-info
Traceback (most recent call last):
  File "./toolchain.py", line 1224, in <module>
    ToolchainCL()
  File "./toolchain.py", line 1040, in __init__
getattr(self, args.command)()
  File "./toolchain.py", line 1064, in build
build_recipes(args.recipe, ctx)
  File "./toolchain.py", line 933, in build_recipes
recipe.execute()
  File "/Users/usman/kivy/kivy-ios/toolchain.py", line 556, in execute
self.build_all()
  File "/Users/usman/kivy/kivy-ios/toolchain.py", line 56, in _cache_execution
f(self, *args, **kwargs)
  File "/Users/usman/kivy/kivy-ios/toolchain.py", line 668, in build_all
self.install()
  File "/Users/usman/kivy/kivy-ios/toolchain.py", line 56, in _cache_execution
f(self, *args, **kwargs)
  File "/Users/usman/kivy/kivy-ios/toolchain.py", line 794, in install
self.install_python_package()
  File "/Users/usman/kivy/kivy-ios/toolchain.py", line 835, in install_python_package
dest_dir)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 171, in copytree
names = os.listdir(src)
OSError: [Errno 2] No such file or directory: '/Users/usman/kivy/kivy-ios/build/robotremoteserver/i386/PythonRemoteServer-master/iosbuild/lib/python2.7/site-packages/robotremoteserver'

For the line Could not find platform dependent libraries I did set the PYTHONPATH but still had this error. 对于“ 找不到平台相关的库”这一行,我确实设置了PYTHONPATH,但仍然出现此错误。

Since there's no template to follow for the build script, I viewed the build files for the packages kivy comes with and created one that contains the following 由于没有用于构建脚本的模板,因此,我查看了kivy随附的软件包的构建文件,并创建了一个包含以下内容的软件包

from toolchain import PythonRecipe

class RobotRemoteServer(PythonRecipe):
    version = "master"
    url = "https://github.com/robotframework/PythonRemoteServer/archive/{version}.zip"
    depends = ["python"]


recipe = RobotRemoteServer()

I have ensured Kivy and the packages it depends on are all installed correctly. 我确保Kivy及其依赖的软件包都已正确安装。 I've also searched the web but can't quite figure out what the problem is. 我也已经在网上搜索过,但还不太清楚问题出在哪里。 I'm using Xcode 6.4 and latest kivy pull from git. 我正在使用Xcode 6.4和git的最新版本 I have been stuck on this for a few days and appreciate any help or guidance. 我已经坚持了几天,感谢任何帮助或指导。

Kivy recipes follow the same format as those for python-for-android . Kivy食谱的格式与python-for-android的格式相同。 Here you have the related documentation. 在这里,您有相关的文档。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM