Created attachment 7006 [details] Log for `LANG=C PYTHONVERBOSE=1 make python-serial` I receive the following error with Buildroot 2017.02: > $ LANG=C make python-serial > >>> python-serial 3.1 Installing to target > (cd /home/aleontiev/projects/mcom/firmware/buildroot/output/build/python-serial-3.1//; PATH="/home/aleontiev/projects/mcom/firmware/buildroot/output/host/bin:/home/aleontiev/projects/mcom/firmware/buildroot/output/host/sbin:/home/aleontiev/projects/mcom/firmware/buildroot/output/host/usr/bin:/home/aleontiev/projects/mcom/firmware/buildroot/output/host/usr/sbin:/home/aleontiev/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin" PYTHONPATH="/home/aleontiev/projects/mcom/firmware/buildroot/output/target/usr/lib/python2.7/sysconfigdata/:/home/aleontiev/projects/mcom/firmware/buildroot/output/target/usr/lib/python2.7/site-packages/" _python_sysroot=/home/aleontiev/projects/mcom/firmware/buildroot/output/host/usr/arm-buildroot-linux-gnueabi/sysroot _python_prefix=/usr _python_exec_prefix=/usr /home/aleontiev/projects/mcom/firmware/buildroot/output/host/usr/bin/python setup.py install --no-compile --prefix=/home/aleontiev/projects/mcom/firmware/buildroot/output/target/usr --executable=/usr/bin/python --single-version-externally-managed --root=/ ) > usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] > or: setup.py --help [cmd1 cmd2 ...] > or: setup.py --help-commands > or: setup.py cmd --help > > error: option --executable not recognized > make: *** [/home/aleontiev/projects/mcom/firmware/buildroot/output/build/python-serial-3.1/.stamp_target_installed] Error 1 I've found that this happens because host Python built by Buildroot is still looking for packages in user site directiry. See full log for `LANG=C PYTHONVERBOSE=1 make python-serial` in the attachment. I think Python should not search user site directory to allow reproducible builds that does not depend on user-installed packages. A possible solution would be to export PYTHONNOUSERSITE=1 for all or just Python packages.
Fixed by https://git.buildroot.org/buildroot/commit/?id=f5da1951ad1e81cc8641f2c90e96fe36d08ec6f9. Thanks!
I've tested the patch on my setup. The issue is fixed.