Skip to content

Commit 7ad1851

Browse files
committed
switching to pip install directly in AppImage
The previous solution of doing the `pip install` with the system's python, then rsync'ing into the AppImage had a couple issues: 1. It was overwriting bin/python3.7 with a symlink back outside the AppImage, totally defeating the purpose of the AppImage and causing issues with systems that don't have python3.7 installed (see maltfield#4) 2. It means that the system must have the same python version as the python version that's in our base python AppImage I'm attempting to do this the proper way, but it's currently failing on my local system with this error: + /tmp/appimagetool.AppImage /tmp/kivy_appdir dist/helloWorld.AppImage appimagetool, continuous build (commit effcebc), build 2084 built on 2019-05-01 21:02:41 UTC WARNING: appstreamcli command is missing, please install it if you want to use AppStream metadata Using architecture x86_64 /tmp/kivy_appdir should be packaged as dist/helloWorld.AppImage AppStream upstream metadata found in usr/share/metainfo/python3.7.8.appdata.xml Generating squashfs... Parallel mksquashfs: Using 4 processors Creating 4.0 filesystem on dist/helloWorld.AppImage, block size 131072. [===========================================- ] 3820/5306 71% FATAL ERROR:gzip uncompress failed with error code -3 Embedding ELF... Not able to open the AppImage for writing, aborting I'm hoping that this is a memory-bound issue and it will "just work" on the GitHub shared runner cloud *fingers crossed* * AppImage/AppImageKit#398 (comment)
1 parent 7408659 commit 7ad1851

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

build/linux/buildAppImage.sh

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,21 @@ which python
3434
which python3.7
3535

3636
# setup a virtualenv to isolate our app's python depends
37-
${PYTHON_PATH} -m pip install --upgrade --user pip setuptools
38-
${PYTHON_PATH} -m pip install --upgrade --user virtualenv
39-
${PYTHON_PATH} -m virtualenv /tmp/kivy_venv
37+
#${PYTHON_PATH} -m pip install --upgrade --user pip setuptools
38+
#${PYTHON_PATH} -m pip install --upgrade --user virtualenv
39+
#${PYTHON_PATH} -m virtualenv /tmp/kivy_venv
4040

4141
# install kivy and all other python dependencies with pip into our virtual env
4242
# we'll later add these to our AppDir for building the AppImage
43-
source /tmp/kivy_venv/bin/activate; python -m pip install -r requirements.txt
43+
#source /tmp/kivy_venv/bin/activate; python -m pip install -r requirements.txt
4444

4545
##################
4646
# PREPARE APPDIR #
4747
##################
4848

49+
# cleanup old appdir, if exists
50+
rm -rf /tmp/kivy_appdir
51+
4952
# We use this python-appimage release as a base for building our own python
5053
# AppImage. We only have to add our code and depends to it.
5154
cp build/deps/python3.7.8-cp37-cp37m-manylinux2014_x86_64.AppImage /tmp/python.AppImage
@@ -54,7 +57,9 @@ chmod +x /tmp/python.AppImage
5457
mv squashfs-root /tmp/kivy_appdir
5558

5659
# copy depends that were installed with kivy into our kivy AppDir
57-
rsync -a /tmp/kivy_venv/ /tmp/kivy_appdir/opt/python3.7/
60+
#rsync -a /tmp/kivy_venv/ /tmp/kivy_appdir/opt/python3.7/
61+
#/tmp/kivy_appdir/opt/python3.7/bin/python3.7 -m pip install -r requirements.txt
62+
/tmp/kivy_appdir/AppRun -m pip install -r requirements.txt
5863

5964
# add our code to the AppDir
6065
rsync -a src /tmp/kivy_appdir/opt/

0 commit comments

Comments
 (0)