[Buildroot] Forcing a Python package to be built/installed with Python3

Ivo Grondman buildroot at grondman.net
Thu Feb 18 17:37:28 UTC 2021



> On 18 Feb 2021, at 18:31, Vincent Fazio <vfazio at xes-inc.com> wrote:
> 
>> Using Buildroot 2020.11.2 in a Vagrant VM based on the Vagrantfile supplied by Buildroot, I’m testing my own Python package (setuptools based) with utils/test-pkg, but even though my Config.in clearly mentions the dependency on Python3 (as suggested by the docs), the tests fail and looking at the logs I can see that it’s using Python 2.7. Everything does work when I don’t have Python2 installed, but I want to make sure that even if it *is* installed, it will not be used for the build/install of this package.
> Do you mean installed on the host machine? Do you have a shebang in a file that may be referencing a host path like /usr/bin/python or /usr/bin/env python and it's symlinked to python2.7 vs python3?

I simply downloaded the Vagrantfile from Buildbox and ran “vagrant up” and did my builds from there. In the VM, /usr/bin/python was indeed symlinked to 2.7, but even after changing that symlink to point to 3.6 (which is the version also installed on the VM) it will still use 2.7.

Cheers,

Ivo




More information about the buildroot mailing list