2

I'm making a buildroot for my raspberrypi3 for a school project.

I've made a buildroot with everything from python included because i want to use WebIOPi. A buildroot has been done and the image has been written on the SDCard.

Now when I want to install it on the buildroot device it asks for python-dev, wich is not included by buildroot. With further research I've only found this. Thats a python-dev0.4.0 but i think there's a much recent version on my virtual ubuntu16 os.(main os is windows 10, so need image to use win32diskimager)

But I don't know how to implement this in the python buildroot packages. I've already read the manuals from buildroot, it's kinda confusing for me... I've already tried to make a directory named 'python-dev' in the buildroot/package directory (ubuntu os) but with no succes. This is what i've got so far:

buildroot/package/python-dev:

  • config.in
  • python-dev.mk

in the config.in file:

config BR2_PACKAGE_PYTHON_DEV
bool "python-dev"
help

in the python-dev.mk file (copied from libconfig):

################################################################################
#
# python-dev
#
################################################################################

PYTHON_DEV_VERSION = 0.4.0
PYTHON_DEV_SOURCE = dev-0.4.0.tar.gz
PYTHON_DEV_SITE = https://pypi.python.org/packages/53/34/e0d4da6c3e9ea8fdcc4657699f2ca62d5c4ac18763a897feb690c2fb0574/dev-0.4.0.tar.gz

PYTHON_DEV_LICENSE = Python software foundation license v2, others
PYTHON_DEV_LICENSE_FILES = README

PYTHON_DEV_SETUP_TYPE = setuptools

PYTHON_DEV_DEPENDENCIES = libconfig boost

$(eval $(python-package))

When I run a make menuconfig and search for python-dev, it's not there... I hope someone could help me with this.

If there's an easier way, it's pretty much welcome.

Thank you in advance.

Michaël
  • 178
  • 1
  • 7

1 Answers1

3

The python-dev package that the WebIOPi setup script is checking for has nothing to do with the dev python package that you found at https://pypi.python.org/pypi/dev.

The python-dev package is a package on Linux distributions that contains the development files for the Python library that is installed together with the Python interpreter. It installs the necessary files to allow C/C++ programs to link against libpython.

Buildroot has already installed what you need in STAGING_DIR. However, you are probably trying to install WebIOPi directly on the target, which is not how Buildroot is intended to be used. Buildroot does not allow to do development on the target: it does not provide a compiler on the target, nor the necessary files for development.

Buildroot is intended to be used as a cross-compilation environment. So what you should do instead is create a Buildroot package for WebIOPi, and have it cross-compiled (from your host machine), so that it gets installed, ready to use, in your target filesystem.

Thomas Petazzoni
  • 5,636
  • 17
  • 25
  • Thank you for your reply, so it's basically the same thing what I did but for WeblOPi? I'll give this a try. – Michaël Dec 06 '16 at 16:52
  • Ok, I've tried to make a package with the config.in and .mk files. I've had to upload the .tar.gz file to wetransfer so I could download it, that was succesful. But now when buildroot needs to untar it, i get the following error: `WebiOPi-0.7.1.tar.gz: not in gzip format` `tar: This does not look like a tar archive` `tar: Exiting with failure status due to previous errors`. How can i say to buildroot that it needs to "tar xvzf"? (do I need to make a new question on stackoverflow?) – Michaël Dec 06 '16 at 21:29