Termux-packages: [package request] PyInstaller

Created on 24 Mar 2017  路  5Comments  路  Source: termux/termux-packages

Package request for PyInstaller...

Why not just install it using pip? Because if binaries compiled with PyInstaller are to work under Termux, they need to use a non-standard temp location, and to do that you need to modify PyInstaller's source. Quick-and-dirty build that works...

pip2 download pyinstaller
tar -xjvf PyInstaller-3.2.1.tar.bz2
cd PyInstaller-3.2.1
sed -i'' -e 's#"/usr/tmp"#"/data/data/com.termux/files/usr/tmp"#g' bootloader/src/pyi_utils.c
CFLAGS="-I/data/data/com.termux/files/usr/include/libandroid-support" LDFLAGS="-landroid-support" pip2 install .

I'm sure there's a more elegant way to handle pyi_utils.c though.

Motivation? GAM on Termux!

help wanted package request python

Most helpful comment

I just wanted to know if this issue is going to get solved (I am asking because I don't have the knowledge that you guys have ) because if not I will take an easier path by using cpython and gcc.

All 5 comments

Looking at pyi_utils.c, it seems to check for the TMPDIR environment variable.

@necopinus Does setting TMPDIR with export TMPDIR=$PREFIX/tmp work before installing PyInstaller using pip?

I think we should start setting TMPDIR in Termux, as it (hopefully) fixes this and other problems).

Ah, I see there is also a `libandroid-support麓 part, so TMPDIR is only part of the problem. Is that for iconv?

Heh... I'd initially tested this by running TMPDIR=$PREFIX/tmp ... pip2 install ..., which didn't work. But it _does_ work when I run export TMPDIR=$PREFIX/tmp first. So never mind about my sed line, but I 100% support having Termux start setting TMPDIR.

As far as libandroid_support goes, it's actually to work around a compile error related to langinfo.h (CFLAGS) and a nl_langinfo reference (LDFLAGS)... I think both are generally part of libc. There might be an iconv error further down, but if so these two flags solve both problems. :-)

I just wanted to know if this issue is going to get solved (I am asking because I don't have the knowledge that you guys have ) because if not I will take an easier path by using cpython and gcc.

yeah, can anyone help me with how to install PyInstaller with Python3 ?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tomtom picture tomtom  路  151Comments

christianrondeau picture christianrondeau  路  81Comments

ghost picture ghost  路  73Comments

Grimler91 picture Grimler91  路  96Comments

ackalker picture ackalker  路  166Comments