File tree Expand file tree Collapse file tree 6 files changed +14
-12
lines changed
Expand file tree Collapse file tree 6 files changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -69,11 +69,15 @@ cp "${REPO_ROOT}/appimage/resources/python.desktop" "${name}.desktop"
6969sed -i " s|[{][{]exe[}][}]|${exe} |g" " ${name} .desktop"
7070sed -i " s|[{][{]name[}][}]|${name} |g" " ${name} .desktop"
7171
72+ cp " ${REPO_ROOT} /appimage/resources/apprun.sh" " AppRun"
73+ sed -i " s|[{][{]exe[}][}]|${exe} |g" " AppRun"
74+ sed -i " s|[{][{]entrypoint[}][}]|${APPRUN_ENTRYPOINT} |g" " AppRun"
75+
7276./" ${linuxdeploy} " --appdir AppDir \
7377 --plugin python \
7478 -i " ${REPO_ROOT} /appimage/resources/python.png" \
7579 -d " ${name} .desktop" \
76- --custom-apprun " AppDir/usr/bin/ ${exe} " \
80+ --custom-apprun " AppRun " \
7781 --output " appimage"
7882
7983popd
Original file line number Diff line number Diff line change 11export PYTHON_VERSION=" 3.8.1"
22export PIP_REQUIREMENTS=" numpy scipy matplotlib sympy pandas"
3-
4- export LD_LIBRARY_PATH=" AppDir/usr/python/lib/python3.8/site-packages/numpy/.libs:${LD_LIBRARY_PATH} "
5- export LD_LIBRARY_PATH=" AppDir/usr/python/lib/python3.8/site-packages/matplotlib/.libs:${LD_LIBRARY_PATH} "
Original file line number Diff line number Diff line change 11export PYTHON_VERSION=" 3.8.1"
22export PIP_REQUIREMENTS=" xonsh prompt_toolkit gnureadline Pygments"
3- export PYTHON_ENTRYPOINT =' "-u" "-c" "from xonsh.main import main; main()"'
3+ export APPRUN_ENTRYPOINT =' "-u" "-c" "from xonsh.main import main; main()"'
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ SCRIPT=` readlink -f -- $0 `
4+ SCRIPTPATH=` dirname $SCRIPT `
5+ APPDIR=" ${APPDIR:- $SCRIPTPATH } "
6+
7+ ${APPDIR} /usr/bin/{{exe}} {{entrypoint}} " $@ "
Original file line number Diff line number Diff line change @@ -20,8 +20,6 @@ script=$(readlink -f $0)
2020exe_name=" $( basename ${APPIMAGE:- $script } ) "
2121BASEDIR=" ${APPDIR:- $(readlink -m $(dirname $script ))} "
2222
23- PYTHON_ENTRYPOINT=" ${PYTHON_ENTRYPOINT:- } "
24-
2523# Parse the CLI
2624show_usage () {
2725 echo " Usage: ${exe_name} --appdir <path to AppDir>"
@@ -48,9 +46,6 @@ show_usage () {
4846 echo " Provide extra configuration flags for the Python build. Note"
4947 echo " that the install prefix will be overwritten"
5048 echo " "
51- echo " PYTHON_ENTRYPOINT=\" ${PYTHON_ENTRYPOINT} \" "
52- echo " Extra options when calling the python executable"
53- echo " "
5449 echo " PYTHON_SOURCE=\" ${PYTHON_SOURCE} \" "
5550 echo " The source to use for Python. Can be a directory, an url or/and"
5651 echo " an archive"
171166 cp " ${BASEDIR} /share/python-wrapper.sh" " $python "
172167 sed -i " s|[{][{]PYTHON[}][}]|$python |g" " $python "
173168 sed -i " s|[{][{]PREFIX[}][}]|$prefix |g" " $python "
174- sed -i " s|[{][{]ENTRYPOINT[}][}]|$PYTHON_ENTRYPOINT |g" " $python "
175169 fi
176170done
177171
Original file line number Diff line number Diff line change 3838# Wrap the call to Python in order to mimic a call from the source
3939# executable ($ARGV0), but potentially located outside of the Python
4040# install ($PYTHONHOME)
41- (PYTHONHOME=" ${APPDIR} /${prefix} " exec -a " ${executable} " " $APPDIR /${prefix} /bin/${nickname} " {{ENTRYPOINT}} " $@ " )
41+ (PYTHONHOME=" ${APPDIR} /${prefix} " exec -a " ${executable} " " $APPDIR /${prefix} /bin/${nickname} " " $@ " )
4242exit " $? "
You can’t perform that action at this time.
0 commit comments