3

I am running an embedded system on Buildroot. I want to run a Python application on it which requires the PyDrive module.

I am getting a PYTHONPATH error which looks like:

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

dswift
  • 71
  • 1
  • 3

1 Answers1

1

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

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.

Your package should contain atleast Config.in and a .mk file

Gal Ben-Haim
  • 17,433
  • 22
  • 78
  • 131
  • Hi Gal, the tutorial I followed is the same as the Buildroot manual one. I am using the BR2_EXTERNAL path. I have created a make file, as instructed in the tutorial and a config file. PyDrive shows up in menuconfig when I search it up using '/'. It shows where the definition is located but it does not have a location where I can toggle it. – dswift Dec 15 '17 at 19:27
  • if you're using BR2_EXTERNAL it should show under "External options" (at the bottom) and not under "Target packages". what is the location when you search for it with '/'? – Gal Ben-Haim Dec 15 '17 at 19:42
  • Symbol: BR2_PACKAGE_PYTHON_PYDRIVE [=y] Type : boolean Prompt: pydrive Location: (1) -> External options Defined at /home/desousa/buildroot/board/package/pydrive/Config.in:1 – dswift Dec 18 '17 at 14:45
  • try to name your package PYDRIVE instead of PYTHON_PYDRIVE – Gal Ben-Haim Dec 19 '17 at 13:02
  • I tried using another link and it "works" now but I am getting the following error: See above – dswift Dec 19 '17 at 15:09
  • try to set PYTHONPATH or override the distutils install command in your .mk file? please accept the answer if I've helped you.. – Gal Ben-Haim Dec 20 '17 at 10:03