New: Python searches for packages in the user site directory
https://bugs.busybox.net/show_bug.cgi?id=9791
Bug ID: 9791
Summary: Python searches for packages in the user site
directory
Product: buildroot
Version: unspecified
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at buildroot.uclibc.org
Reporter: scileont at gmail.com
CC: buildroot at uclibc.org
Target Milestone: ---
Created attachment 7006
--> https://bugs.busybox.net/attachment.cgi?id=7006&action=edit
Log for LANG=C PYTHONVERBOSE=1 make python-serial
I receive the following error with Buildroot 2017.02:
Quoted 10 lines
$ LANG=C make python-serialQuoted 1 line
Quoted 1 line
Quoted 1 line
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/pythonsetup.pyinstall --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.pycmd --helperror: 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.
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 9791] Python searches for packages in the user site directory
https://bugs.busybox.net/show_bug.cgi?id=9791
Thomas Petazzoni <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED--- Comment #1 from Thomas Petazzoni <[email protected]> --- Fixed by
https://git.buildroot.org/buildroot/commit/?id=f5da1951ad1e81cc8641f2c90e96fe36d08ec6f9.
Thanks!
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 9791] Python searches for packages in the user site directory
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=9791
Anton Leontiev <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |VERIFIED
--- Comment #2 from Anton Leontiev <[email protected]> --- I've tested the patch on my setup. The issue is fixed.
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.