构建根目录
是一种可用于为嵌入式系统板构建Linux映像的工具。
Buildroot附带了一组预定义的Python包,可以从其菜单中进行选择。
此外,Buildroot还添加了一个很好的Python脚本,可以导入作为
PyPI
存储库,称为“scanpypi”。
然而,该脚本似乎只适用于Python2。尝试导入较新的包时,会出现错误,例如:
./support/scripts/scanpypi websockets -o package
buildroot package name for websockets: python-websockets
Package: python-websockets
Fetching package websockets
Downloading package websockets from https://pypi.python.org/packages/b6/12/6194aac840c65253e45a38912e318f9ac548f9ba86d75bdb8fe66841b335/websockets-4.0.1.tar.gz...
Traceback (most recent call last):
File "./support/scripts/scanpypi", line 653, in <module>
main()
File "./support/scripts/scanpypi", line 604, in main
package.load_setup()
File "./support/scripts/scanpypi", line 250, in load_setup
setup = imp.load_module('setup', s_file, s_path, s_desc)
File "/tmp/scanpypi-qbY6eQ/python-websockets/websockets-4.0.1/setup.py", line 11, in <module>
TypeError: 'encoding' is an invalid keyword argument for this function
这一个因关键字无效而失败。
也:
./support/scripts/scanpypi websocket-server -o package
buildroot package name for websocket-server: python-websocket-server
Package: python-websocket-server
Fetching package websocket-server
Downloading package websocket-server from https://pypi.python.org/packages/74/64/e86581ee7775a2e08aca530b41e1a1e3ee6b320233b1eff301dcb86d1636/websocket_server-0.4.tar.gz...
Traceback (most recent call last):
File "./support/scripts/scanpypi", line 653, in <module>
main()
File "./support/scripts/scanpypi", line 604, in main
package.load_setup()
File "./support/scripts/scanpypi", line 247, in load_setup
os.chdir(self.tmp_extract)
OSError: [Errno 2] No such file or directory: '/tmp/scanpypi-YXROmL/python-websocket-server/websocket-server-0.4'
对于包含下划线(\)而不是破折号(-)的包名,此操作失败。