2

我在 Buildroot 上运行嵌入式系统。我想在它上面运行一个需要 PyDrive 模块的 Python 应用程序。

我收到一个 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/'

我的制作文件:

    ################################################################################
#
# 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))

我的配置文件:

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

谢谢,

D

4

1 回答 1

1

你没有提到你是否使用 BR2_EXTERNAL 路径,无论如何我建议遵循官方用户手册 - h​​ttps: //buildroot.org/downloads/manual/manual.html

您必须将包的 Config.in 添加到package/Config.in( 或BR2_EXTERNAL/Config.in,然后它应该显示为菜单选项,或者在您添加它的部分下,或者如果使用 BR2_EXTERNAL,则在“外部选项”下。

你的包应该至少包含 Config.in 和一个 .mk 文件

于 2017-12-15T18:54:54.900 回答