Bug 14321

Summary: scanpypi doesn't work with the pyinstaller module
Product: buildroot Reporter: Kevin <kr886q>
Component: OtherAssignee: unassigned
Status: RESOLVED DUPLICATE    
Severity: normal CC: buildroot, kr886q, yann.morin.1998
Priority: P5    
Version: 2021.02.6   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:

Description Kevin 2021-11-04 14:33:50 UTC
root@4802338a3fcd:/buildroot-2021.02.6# utils/scanpypi pyinstaller
utils/scanpypi:21: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
buildroot package name for pyinstaller: python-pyinstaller
Package: python-pyinstaller
Fetching package pyinstaller
Downloading package pyinstaller from https://files.pythonhosted.org/packages/90/8c/3aa36c18d2f05dc85d810b3fdd23dbadee15375b15c75533247347b4bb86/pyinstaller-4.6.tar.gz...
Error: Could not install package pyinstaller: 'name'


I also get the same error when trying to install the wheel package.
Comment 1 Thomas Petazzoni 2021-11-04 15:38:19 UTC
scanpypi is not there to install a Python package, it is a script to help create a new Buildroot package for a Python module.

First of all, you should not use Buildroot as root, nor scanpypi itself.

Secondly, I'm not sure how pyinstaller can be useful in the context of Buildroot. According to its description, "PyInstaller bundles a Python application and all its dependencies into a single package. The user can run the packaged app without installing a Python interpreter or any modules.". I don't see how having pyinstaller available on the target system is going to be of any use.
Comment 2 Kevin 2021-11-04 17:09:21 UTC
I started down this rabbit hole when trying to create a executable(written in python) to run on a target device (aarch64) with uclibc (basic busybox). I was able to virtualize the target arch with docker/buildx but could not find a suitable image that had uclibc, gcc, python, and other needed things to cross compile.

I then tried to use buildroot (running in ubuntu container) to create an image and run in docker but ran into some trouble and decided to pivot. 

I discovered that the Rpi3 has the same chip (cortex A53) as my target device. So I used buildroot to create an image and flash it to the Rpi3. Now I have the correct toolchain and everything I need EXCEPT pyinstaller, to cross compile.

Due to certain restrictions I am unable to cross compile on the target device.

also this is my first experience going deeper into linux than just the basic terminal commands, so my apologies.
Comment 3 Kevin 2021-11-04 17:36:09 UTC
I have also tried to install pyinstaller with pip on the rpi, but i get an error
Comment 4 Kevin 2021-11-05 15:19:12 UTC
So after days of fiddling and multiple build I finally figured out that there is no GCC on the target... are there any unsanctioned work arounds?
Comment 5 Fabrice Fontaine 2021-11-05 23:24:34 UTC
The fact that wheel (and pyinstaller) don't work with scanpypi is a duplicate of https://bugs.buildroot.org/show_bug.cgi?id=13321
Comment 6 Yann E. MORIN 2021-11-06 11:04:25 UTC
Kevin, All,

Thanks for the report. As noticed by Fabrice, this is already tracked as #13321.

Regards,
Yann E. MORIN.

*** This bug has been marked as a duplicate of bug 13321 ***