Do build process using system interpreter, then install dependencies into bundled one

This commit is contained in:
DarkPhoenix
2023-12-04 04:59:04 +06:00
parent 653a1585dc
commit 39ee8586d4
2 changed files with 21 additions and 18 deletions

View File

@@ -1,5 +1,19 @@
version: 1
script:
- rm -rf AppDir | true
- mkdir -p AppDir/usr/src
# Install wx (needed by crowdin script) and sqlalchemy (needed by db update script)
- grep -iE 'wxpython|sqlalchemy' requirements.txt | xargs python3 -B -s -m pip install -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-22.04
# Compile app data
- find locale/ -type f -name "*.po" -exec msgen "{}" -o "{}" \;
- python3 -B scripts/compile_lang.py
- python3 -B scripts/dump_crowdin_progress.py
- python3 -B db_update.py
- export PYFA_VERSION="$(python3 -B scripts/dump_version.py)"
# Copy data over to app dir
- cp -r eos graphs gui imgs locale service utils eve.db config.py pyfa.py db_update.py README.md LICENSE version.yml AppDir/usr/src
AppDir:
path: ./AppDir
@@ -8,7 +22,7 @@ AppDir:
name: pyfa
icon: pyfa
version: $PYFA_VERSION
exec: $APPDIR/bin/python3.11
exec: usr/bin/python3.11
exec_args: "-s $APPDIR/opt/pyfa/pyfa.py $@"
apt:
@@ -29,27 +43,16 @@ AppDir:
- python3.11
exclude: []
after_bundle:
# Install python dependencies to bundled interpreter
- python3.11 -s -m pip install --prefix=/usr --root=AppDir -U pip setuptools wheel
- python3.11 -s -m pip install --prefix=/usr --root=AppDir -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-22.04 -r requirements.txt
runtime:
env:
PYTHONHOME: '${APPDIR}/usr'
PYTHONPATH: '${APPDIR}/usr/lib/python3.11/site-packages'
after_runtime:
# Install python dependencies
- python3.11 -s -m pip install --prefix=/usr --root=${APPDIR} -U pip setuptools wheel
- python3.11 -s -m pip install --prefix=/usr --root=${APPDIR} -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-22.04 -r requirements.txt
# Compile app data
- find locale/ -type f -name "*.po" -exec msgen "{}" -o "{}" \;
- python3.11 scripts/compile_lang.py
- python3.11 scripts/dump_crowdin_progress.py
- python3.11 db_update.py
# Calculate app version
- export PYFA_VERSION="$(python3.11 scripts/dump_version.py)"
# Copy app and clean it up
- mkdir -p ${APPDIR}/usr/src
- cp -r eos graphs gui imgs locale service utils eve.db config.py pyfa.py db_update.py README.md LICENSE version.yml ${APPDIR}/usr/src
- find ${APPDIR}/usr/src | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf
AppImage:
sign-key: None
arch: x86_64

View File

@@ -4,7 +4,7 @@ numpy
matplotlib
python-dateutil
requests
sqlalchemy == 1.4.50
sqlalchemy==1.4.50
cryptography
markdown2
packaging