简体   繁体   English

将Python软件包添加到Buildroot

[英]Adding Python package to Buildroot

I am running an embedded system on Buildroot. 我在Buildroot上运行嵌入式系统。 I want to run a Python application on it which requires the PyDrive module. 我想在其上运行需要PyDrive模块的Python应用程序。

I am getting a PYTHONPATH error which looks like: 我收到一个PYTHONPATH错误,看起来像:

TEST FAILED: /home/desousa/buildroot/build/target/usr/lib/python2.7/site-packages/ does NOT support .pth files
error: bad install directory or PYTHONPATH

You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from.  The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /home/desousa/buildroot/build/target/usr/lib/python2.7/site-packages/

and your PYTHONPATH environment variable currently contains:

    '/home/desousa/buildroot/build/target/usr/lib/python2.7/sysconfigdata/'

My make file: 我的制作文件:

    ################################################################################
#
# pydrive
#
################################################################################

PYDRIVE_VERSION = 1.3.1
PYDRIVE_SOURCE = PyDrive-$(PYDRIVE_VERSION).tar.gz
PYDRIVE_SITE = https://pypi.python.org/packages/52/e0/0e64788e5dd58ce2d693454967
6243dc69d982f198524be9b99e9c2a4fd5
PYDRIVE_LICENSE = Apache License
PYDRIVE_LICENSE_FILES = LICENSE
PYDRIVE_DEPENDENCIES:=
PYDRIVE_SETUP_TYPE:=distutils

$(eval $(python-package))

My Config file: 我的配置文件:

config BR2_PACKAGE_PYTHON_PYDRIVE
    bool "pydrive"
    help
      Wrapper library of google-api-python-client that simplifies many common Google Drive API tasks.

Thanks, 谢谢,

D d

You haven't mentioned if you're using a BR2_EXTERNAL path or not, in any case I suggest following the official user manual - https://buildroot.org/downloads/manual/manual.html 如果您使用的是BR2_EXTERNAL路径或并非在任何情况下,我建议您按照官方的用户手册,您没有提到- https://buildroot.org/downloads/manual/manual.html

You have to add the your package's Config.in to package/Config.in (or BR2_EXTERNAL/Config.in , then it should show up as a menu option either under the section you added it or under "External options" if using BR2_EXTERNAL. 您必须将包的Config.in添加到package/Config.in (或BR2_EXTERNAL/Config.in ,然后,如果使用BR2_EXTERNAL,则它应作为菜单选项显示在添加的部分或“外部选项”下。

Your package should contain atleast Config.in and a .mk file 您的软件包应包含atleast Config.in和一个.mk文件

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

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