From 7cad0b2658a6ed74698ee2a6f6a0c8924ccf9518 Mon Sep 17 00:00:00 2001 From: wereii <8504482+wereii@users.noreply.github.com> Date: Wed, 16 Mar 2022 20:26:33 +0100 Subject: [PATCH 1/5] AppImage build --- appimage/AppRun | 19 +++++++++ appimage/Makefile | 67 ++++++++++++++++++++++++++++++ appimage/README.md | 19 +++++++++ appimage/org.pyfa.pyfa.appdata.xml | 17 ++++++++ appimage/pyfa | 3 ++ appimage/pyfa.desktop | 7 ++++ requirements.txt | 2 +- 7 files changed, 133 insertions(+), 1 deletion(-) create mode 100644 appimage/AppRun create mode 100644 appimage/Makefile create mode 100644 appimage/README.md create mode 100644 appimage/org.pyfa.pyfa.appdata.xml create mode 100755 appimage/pyfa create mode 100644 appimage/pyfa.desktop diff --git a/appimage/AppRun b/appimage/AppRun new file mode 100644 index 000000000..fbcfb2257 --- /dev/null +++ b/appimage/AppRun @@ -0,0 +1,19 @@ +#! /bin/bash -i + +# Export APPRUN if running from an extracted image +self="$(readlink -f -- $0)" +here="${self%/*}" +APPDIR="${APPDIR:-${here}}" + +# Export TCl/Tk +export TCL_LIBRARY="${APPDIR}/usr/share/tcltk/tcl8.4" +export TK_LIBRARY="${APPDIR}/usr/share/tcltk/tk8.4" +export TKPATH="${TK_LIBRARY}" + +# Export SSL certificate +export SSL_CERT_FILE="${APPDIR}/opt/_internal/certs.pem" + +# Call the entry point +#! /bin/bash -i + +${APPDIR}/usr/bin/pyfa "$@" diff --git a/appimage/Makefile b/appimage/Makefile new file mode 100644 index 000000000..47dc38169 --- /dev/null +++ b/appimage/Makefile @@ -0,0 +1,67 @@ +APPIMAGETOOL:=appimagetool-x86_64.AppImage +APPIMAGETOOL_URL:=https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage + +PYTHON_APPIMAGE=python3.8.12-cp38-cp38-manylinux2014_x86_64.AppImage +PYTHON_APPIMAGE_URL=https://github.com/niess/python-appimage/releases/download/python3.8/$(PYTHON_APPIMAGE) + +DEPLOY_DIR=AppDir/opt/pyfa + +ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) +PYFA_DIR:=$(realpath $(ROOT_DIR)/..) +EVE_DB:=$(DEPLOY_DIR)/eve.db + +# Relative to Pyfa/ dir +PROJECT_FILES=README.md LICENSE eos graphs gui imgs locale scripts service staticdata utils version.yml config.py db_update.py pyfa.py +PROJECT_SOURCES=$(patsubst %, $(DEPLOY_DIR)/%, $(PROJECT_FILES)) + +# Just so the final appimage is rebuilt when these change +APPIMAGE_FILES=AppRun org.pyfa.pyfa.appdata.xml pyfa pyfa.desktop +APPIMAGE_SOURCES=$(patsubst %, $(ROOT_DIR)/%, $(APPIMAGE_FILES)) + + +Pyfa-x86_64.AppImage: $(PROJECT_SOURCES) | $(APPIMAGETOOL) static deps $(EVE_DB) + ./$(APPIMAGETOOL) AppDir + +$(EVE_DB): $(PYFA_DIR)/eos $(PYFA_DIR)/db_update.py deps + AppDir/usr/bin/python -s $(DEPLOY_DIR)/db_update.py + +.PHONY: deps +deps: $(DEPLOY_DIR) $(PYFA_DIR)/requirements.txt + AppDir/usr/bin/python -s -m pip install -U pip setuptools wheel + AppDir/usr/bin/python -s -m pip install -r $(PYFA_DIR)/requirements.txt + +.PHONY: static +static: $(DEPLOY_DIR) $(APPIMAGE_SOURCES) + cp $(ROOT_DIR)/AppRun AppDir/ + cp $(ROOT_DIR)/pyfa.desktop AppDir/ + cp $(ROOT_DIR)/pyfa.desktop AppDir/usr/share/applications/ + cp $(ROOT_DIR)/org.pyfa.pyfa.appdata.xml AppDir/usr/share/metainfo/ + chmod +x $(ROOT_DIR)/pyfa && cp $(ROOT_DIR)/pyfa AppDir/usr/bin/ + +# Rule to copy generated PROJECT_SOURCES +$(DEPLOY_DIR)/%: $(PYFA_DIR)/% $(DEPLOY_DIR) + cp -r $< $@ + +# Prepare Python base AppImage, stripping Python metadata +$(DEPLOY_DIR): $(PYTHON_APPIMAGE) + ./$(PYTHON_APPIMAGE) --appimage-extract + mv squashfs-root AppDir + rm AppDir/python*.desktop + rm AppDir/usr/share/applications/*.desktop + rm AppDir/usr/share/metainfo/*.appdata.xml + mkdir -p $(DEPLOY_DIR) + +$(PYTHON_APPIMAGE): + curl -LO $(PYTHON_APPIMAGE_URL) + chmod +x $(PYTHON_APPIMAGE) + + +$(APPIMAGETOOL): + curl -LO $(APPIMAGETOOL_URL) + chmod +x $(APPIMAGETOOL) + +clean: + rm -rf AppDir + +clean-all: clean + rm -rf *.AppImage \ No newline at end of file diff --git a/appimage/README.md b/appimage/README.md new file mode 100644 index 000000000..5d6840a5a --- /dev/null +++ b/appimage/README.md @@ -0,0 +1,19 @@ +## Pyfa As AppImage + +Needed for building: + +- Linux distro, currently tested is Arch/Manjaro +- make, curl +- patience, first time building wxPython can take about 10 minutes + +Steps: + +```sh +cd appimage +mkdir build +cd build +make -f ../Makefile +``` + +If everything goes alright, build directory should contain `Pyfa-x86_64.AppImage`. + diff --git a/appimage/org.pyfa.pyfa.appdata.xml b/appimage/org.pyfa.pyfa.appdata.xml new file mode 100644 index 000000000..98a532f95 --- /dev/null +++ b/appimage/org.pyfa.pyfa.appdata.xml @@ -0,0 +1,17 @@ + + + org.pyfa.pyfa + MIT + GPL-3 + Pyfa + Pyfa + + Python Fitting Assitant for EVE Online + + + pyfa.desktop + https://github.com/pyfa-org/Pyfa + + pyfa + + diff --git a/appimage/pyfa b/appimage/pyfa new file mode 100755 index 000000000..5f5c7db49 --- /dev/null +++ b/appimage/pyfa @@ -0,0 +1,3 @@ +#! /bin/bash + +${APPDIR}/usr/bin/python3.8 -s "${APPDIR}/opt/pyfa/pyfa.py" "$@" \ No newline at end of file diff --git a/appimage/pyfa.desktop b/appimage/pyfa.desktop new file mode 100644 index 000000000..ea56f901a --- /dev/null +++ b/appimage/pyfa.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=Application +Name=Pyfa +Exec=pyfa +Comment=Python Fitting Assistant for EVE: Online +Icon=python +Categories=Game; \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 4a95eb125..20f1c128c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -wxPython == 4.0.6 +wxPython <4.1 logbook >= 1.0.0 numpy == 1.19.2 matplotlib == 3.2.2 From e17fe434eeafcf82ec1d8546ff446fe4e48552da Mon Sep 17 00:00:00 2001 From: Tomas S <8504482+wereii@users.noreply.github.com> Date: Thu, 17 Mar 2022 12:02:19 +0100 Subject: [PATCH 2/5] Update with GTK3 Info --- appimage/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/appimage/README.md b/appimage/README.md index 5d6840a5a..6555b0ad6 100644 --- a/appimage/README.md +++ b/appimage/README.md @@ -4,6 +4,7 @@ Needed for building: - Linux distro, currently tested is Arch/Manjaro - make, curl +- GTK3 libraries are needed (`gtk3` for Arch based, `libgtk-3-dev` for debian based) - patience, first time building wxPython can take about 10 minutes Steps: From b1beebda26fcc6df58c0a96660366a049cf1e457 Mon Sep 17 00:00:00 2001 From: blitzmann Date: Wed, 23 Mar 2022 10:28:04 -0400 Subject: [PATCH 3/5] Convert makefile to shell commands in appveyor config, various other tweaks --- .appveyor.yml | 93 ++++++++++++++++++- appimage/Makefile | 67 ------------- appimage/README.md | 20 ---- appimage/pyfa | 3 - {appimage => dist_assets/linux}/AppRun | 0 .../linux}/org.pyfa.pyfa.appdata.xml | 0 dist_assets/linux/pyfa | 3 + dist_assets/linux/pyfa-linux.spec | 70 -------------- {appimage => dist_assets/linux}/pyfa.desktop | 0 requirements.txt | 4 +- scripts/osx-package.sh | 2 + 11 files changed, 96 insertions(+), 166 deletions(-) delete mode 100644 appimage/Makefile delete mode 100644 appimage/README.md delete mode 100755 appimage/pyfa rename {appimage => dist_assets/linux}/AppRun (100%) rename {appimage => dist_assets/linux}/org.pyfa.pyfa.appdata.xml (100%) create mode 100644 dist_assets/linux/pyfa delete mode 100644 dist_assets/linux/pyfa-linux.spec rename {appimage => dist_assets/linux}/pyfa.desktop (100%) diff --git a/.appveyor.yml b/.appveyor.yml index 763ad6515..4d749aa5c 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,9 +1,83 @@ image: - Visual Studio 2019 + - Ubuntu - macos -clone_depth: 400 - +clone_depth: 1 for: + - + matrix: + only: + - image: Ubuntu + environment: + APPVEYOR_SSH_KEY: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDJDW/+oYNGOiPvwuwAL9tc/LQgg58aosIVpMYfepQZ20V+VZnHpZh8IRDA8Jo5xht19p2PksA+hFgqA0kpKtrSkuiWdE8rATQItfk4gf7yB0yGasJGGQZYazy9k/9XtmYkq2HHOOeEqdxvrICddJQ88MLCLT9lJENSUP/YS/yGcjZFXVxE11pTeIcqlCRU+3eYa1v7BeNvXIKNhZoK5orXWrtuH3cy8jrSns/u70aYfJ6B2jA8CnWnDbuvpeQtEY61SQqlKUsSArNa8NAsXj41wr3Ar9gAG9330w7EMTqlutk8HZO35uHI0q5qinUhaQYufPPrVkb2L/N+ZCfu0fnh appveyor" + APPIMAGE_TOOL: appimagetool-x86_64.AppImage + PYTHON_APPIMAGE: python3.7.13-cp37-cp37m-manylinux2014_x86_64.AppImage + DEPLOY_DIR: AppDir/opt/pyfa +# APPVEYOR_SSH_BLOCK: true + cache: + - /home/appveyor/.cache/pip -> requirements.txt + init: + - sh: curl -sflL 'https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-ssh.sh' | bash -e - + install: + - sh: git fetch --prune --unshallow # to fix the version dump issues + - sh: sudo DEBIAN_FRONTEND=noninteractive apt-get -y update + - sh: sudo DEBIAN_FRONTEND=noninteractive apt-get -y install python3.7-dev libgtk-3-dev python3-pip libwebkit2gtk-4.0-dev + before_build: + - sh: mkdir build && cd build + - sh: curl -LO https://github.com/AppImage/AppImageKit/releases/download/13/$APPIMAGE_TOOL && chmod +x $APPIMAGE_TOOL + - sh: curl -LO https://github.com/niess/python-appimage/releases/download/python3.7/$PYTHON_APPIMAGE && chmod +x $PYTHON_APPIMAGE + build_script: + # Prepare Python base AppImage, stripping Python metadata + - sh: ./$PYTHON_APPIMAGE --appimage-extract + - sh: mv squashfs-root AppDir + - sh: rm AppDir/python*.desktop + - sh: rm AppDir/usr/share/applications/*.desktop + - sh: rm AppDir/usr/share/metainfo/*.appdata.xml + - sh: mkdir -p $DEPLOY_DIR + # run install pyfa packages and any other requirements + + - sh: AppDir/usr/bin/python -s -m pip install -U pip setuptools==41.6.0 wheel pathlib2 + - sh: AppDir/usr/bin/python -s -m pip install -r ../requirements.txt + + # Run scripts to prep pyfa data and build database + - sh: cd ../ + - sh: find locale/ -type f -name "*.po" -exec msgen "{}" -o "{}" \; + - sh: build/AppDir/usr/bin/python scripts/compile_lang.py + - sh: build/AppDir/usr/bin/python scripts/dump_crowdin_progress.py + - sh: build/AppDir/usr/bin/python db_update.py + - sh: export PYFA_VERSION="$(python3.7 scripts/dump_version.py)" + + # Copy pyfa files to host + - sh: cp -r eos graphs gui imgs locale service utils eve.db config.py pyfa.py db_update.py README.md LICENSE version.yml ./build/$DEPLOY_DIR + - sh: find ./build/$DEPLOY_DIR | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf + + # Copy static AppImage files + - sh: cd dist_assets/linux + - sh: cp AppRun pyfa.desktop ../../build/AppDir/ + - sh: cp pyfa.desktop ../../build/AppDir/usr/share/applications/ + - sh: cp org.pyfa.pyfa.appdata.xml ../../build/AppDir/usr/share/metainfo/ + - sh: chmod +x pyfa && cp pyfa ../../build/AppDir/usr/bin + - sh: cd ../../ + + # Package it all up + - sh: mkdir dist + - sh: ./build/$APPIMAGE_TOOL build/AppDir dist/pyfa-$PYFA_VERSION-linux.AppImage + after_build: + - sh: ls -la build + artifacts: + - path: dist/pyfa-$PYFA_VERSION-linux.AppImage + deploy: + tag: $PYFA_VERSION + release: pyfa $PYFA_VERSION + description: 'Release description' + provider: GitHub + auth_token: + secure: M94o0xMtzxrvlKpqMcXU2KfbJdd3aYJ3UxWzePUz/pkT1/Ojiis052CiLsLVyzJg + draft: true + force_update: false + # deploy on tag push only + on: + APPVEYOR_REPO_TAG: true - matrix: only: @@ -13,7 +87,11 @@ for: # Should be enabled only for build process debugging # init: # - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) + cache: + - C:\users\appveyor\appdata\local\pip\cache\ -> requirements.txt install: + - cmd: git fetch --prune --unshallow # to fix the version dump issues + - ps: echo("OS version:") - ps: "[System.Environment]::OSVersion.Version" @@ -96,11 +174,15 @@ for: matrix: only: - image: macos - # Should be enabled only for build process debugging + environment: + APPVEYOR_SSH_KEY: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDJDW/+oYNGOiPvwuwAL9tc/LQgg58aosIVpMYfepQZ20V+VZnHpZh8IRDA8Jo5xht19p2PksA+hFgqA0kpKtrSkuiWdE8rATQItfk4gf7yB0yGasJGGQZYazy9k/9XtmYkq2HHOOeEqdxvrICddJQ88MLCLT9lJENSUP/YS/yGcjZFXVxE11pTeIcqlCRU+3eYa1v7BeNvXIKNhZoK5orXWrtuH3cy8jrSns/u70aYfJ6B2jA8CnWnDbuvpeQtEY61SQqlKUsSArNa8NAsXj41wr3Ar9gAG9330w7EMTqlutk8HZO35uHI0q5qinUhaQYufPPrVkb2L/N+ZCfu0fnh appveyor" + cache: + - /Users/appveyor/Library/Caches/pip/ -> requirements.txt init: # - sh: curl -sflL 'https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-ssh.sh' | bash -e - - sh: source ~/venv3.7/bin/activate install: + - sh: git fetch --prune --unshallow # to fix the version dump issues - sh: bash scripts/osx-setup.sh build_script: - sh: bash scripts/osx-translations.sh @@ -110,6 +192,9 @@ for: after_build: - sh: export PYFA_VERSION="$(python3 scripts/dump_version.py)" - sh: bash scripts/osx-package.sh +# on_finish: +# - sh: export APPVEYOR_SSH_BLOCK=true +# - sh: curl -sflL 'https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-ssh.sh' | bash -e - artifacts: - path: dist/pyfa*-mac.zip before_deploy: @@ -126,4 +211,4 @@ for: force_update: false # deploy on tag push only on: - APPVEYOR_REPO_TAG: true + APPVEYOR_REPO_TAG: true \ No newline at end of file diff --git a/appimage/Makefile b/appimage/Makefile deleted file mode 100644 index 47dc38169..000000000 --- a/appimage/Makefile +++ /dev/null @@ -1,67 +0,0 @@ -APPIMAGETOOL:=appimagetool-x86_64.AppImage -APPIMAGETOOL_URL:=https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage - -PYTHON_APPIMAGE=python3.8.12-cp38-cp38-manylinux2014_x86_64.AppImage -PYTHON_APPIMAGE_URL=https://github.com/niess/python-appimage/releases/download/python3.8/$(PYTHON_APPIMAGE) - -DEPLOY_DIR=AppDir/opt/pyfa - -ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) -PYFA_DIR:=$(realpath $(ROOT_DIR)/..) -EVE_DB:=$(DEPLOY_DIR)/eve.db - -# Relative to Pyfa/ dir -PROJECT_FILES=README.md LICENSE eos graphs gui imgs locale scripts service staticdata utils version.yml config.py db_update.py pyfa.py -PROJECT_SOURCES=$(patsubst %, $(DEPLOY_DIR)/%, $(PROJECT_FILES)) - -# Just so the final appimage is rebuilt when these change -APPIMAGE_FILES=AppRun org.pyfa.pyfa.appdata.xml pyfa pyfa.desktop -APPIMAGE_SOURCES=$(patsubst %, $(ROOT_DIR)/%, $(APPIMAGE_FILES)) - - -Pyfa-x86_64.AppImage: $(PROJECT_SOURCES) | $(APPIMAGETOOL) static deps $(EVE_DB) - ./$(APPIMAGETOOL) AppDir - -$(EVE_DB): $(PYFA_DIR)/eos $(PYFA_DIR)/db_update.py deps - AppDir/usr/bin/python -s $(DEPLOY_DIR)/db_update.py - -.PHONY: deps -deps: $(DEPLOY_DIR) $(PYFA_DIR)/requirements.txt - AppDir/usr/bin/python -s -m pip install -U pip setuptools wheel - AppDir/usr/bin/python -s -m pip install -r $(PYFA_DIR)/requirements.txt - -.PHONY: static -static: $(DEPLOY_DIR) $(APPIMAGE_SOURCES) - cp $(ROOT_DIR)/AppRun AppDir/ - cp $(ROOT_DIR)/pyfa.desktop AppDir/ - cp $(ROOT_DIR)/pyfa.desktop AppDir/usr/share/applications/ - cp $(ROOT_DIR)/org.pyfa.pyfa.appdata.xml AppDir/usr/share/metainfo/ - chmod +x $(ROOT_DIR)/pyfa && cp $(ROOT_DIR)/pyfa AppDir/usr/bin/ - -# Rule to copy generated PROJECT_SOURCES -$(DEPLOY_DIR)/%: $(PYFA_DIR)/% $(DEPLOY_DIR) - cp -r $< $@ - -# Prepare Python base AppImage, stripping Python metadata -$(DEPLOY_DIR): $(PYTHON_APPIMAGE) - ./$(PYTHON_APPIMAGE) --appimage-extract - mv squashfs-root AppDir - rm AppDir/python*.desktop - rm AppDir/usr/share/applications/*.desktop - rm AppDir/usr/share/metainfo/*.appdata.xml - mkdir -p $(DEPLOY_DIR) - -$(PYTHON_APPIMAGE): - curl -LO $(PYTHON_APPIMAGE_URL) - chmod +x $(PYTHON_APPIMAGE) - - -$(APPIMAGETOOL): - curl -LO $(APPIMAGETOOL_URL) - chmod +x $(APPIMAGETOOL) - -clean: - rm -rf AppDir - -clean-all: clean - rm -rf *.AppImage \ No newline at end of file diff --git a/appimage/README.md b/appimage/README.md deleted file mode 100644 index 6555b0ad6..000000000 --- a/appimage/README.md +++ /dev/null @@ -1,20 +0,0 @@ -## Pyfa As AppImage - -Needed for building: - -- Linux distro, currently tested is Arch/Manjaro -- make, curl -- GTK3 libraries are needed (`gtk3` for Arch based, `libgtk-3-dev` for debian based) -- patience, first time building wxPython can take about 10 minutes - -Steps: - -```sh -cd appimage -mkdir build -cd build -make -f ../Makefile -``` - -If everything goes alright, build directory should contain `Pyfa-x86_64.AppImage`. - diff --git a/appimage/pyfa b/appimage/pyfa deleted file mode 100755 index 5f5c7db49..000000000 --- a/appimage/pyfa +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/bash - -${APPDIR}/usr/bin/python3.8 -s "${APPDIR}/opt/pyfa/pyfa.py" "$@" \ No newline at end of file diff --git a/appimage/AppRun b/dist_assets/linux/AppRun similarity index 100% rename from appimage/AppRun rename to dist_assets/linux/AppRun diff --git a/appimage/org.pyfa.pyfa.appdata.xml b/dist_assets/linux/org.pyfa.pyfa.appdata.xml similarity index 100% rename from appimage/org.pyfa.pyfa.appdata.xml rename to dist_assets/linux/org.pyfa.pyfa.appdata.xml diff --git a/dist_assets/linux/pyfa b/dist_assets/linux/pyfa new file mode 100644 index 000000000..06deb5555 --- /dev/null +++ b/dist_assets/linux/pyfa @@ -0,0 +1,3 @@ +#! /bin/bash + +${APPDIR}/usr/bin/python3.7 -s "${APPDIR}/opt/pyfa/pyfa.py" "$@" \ No newline at end of file diff --git a/dist_assets/linux/pyfa-linux.spec b/dist_assets/linux/pyfa-linux.spec deleted file mode 100644 index bfc24a2f2..000000000 --- a/dist_assets/linux/pyfa-linux.spec +++ /dev/null @@ -1,70 +0,0 @@ -# -*- mode: python -*- - -import os -from itertools import chain -import subprocess - -label = subprocess.check_output([ - "git", "describe", "--tags"]).strip() - -with open('gitversion', 'w+') as f: - f.write(label.decode()) - -block_cipher = None - - -added_files = [ - ( 'imgs/gui/*.png', 'imgs/gui' ), - ( 'imgs/gui/*.gif', 'imgs/gui' ), - ( 'imgs/icons/*.png', 'imgs/icons' ), - ( 'imgs/renders/*.png', 'imgs/renders' ), - ( 'dist_assets/win/pyfa.ico', '.' ), - ( 'dist_assets/cacert.pem', '.' ), - ( 'eve.db', '.' ), - ( 'README.md', '.' ), - ( 'LICENSE', '.' ), - ( 'gitversion', '.' ), - ] - -import_these = [] - -# Walk directories that do dynamic importing -paths = ('eos/effects', 'eos/db/migrations', 'service/conversions') -for root, folders, files in chain.from_iterable(os.walk(path) for path in paths): - for file_ in files: - if file_.endswith(".py") and not file_.startswith("_"): - mod_name = "{}.{}".format( - root.replace("/", "."), - file_.split(".py")[0], - ) - import_these.append(mod_name) - - -a = Analysis(['pyfa.py'], - pathex=[], - binaries=[], - datas=added_files, - hiddenimports=import_these, - hookspath=[], - runtime_hooks=[], - excludes=[], - win_no_prefer_redirects=False, - win_private_assemblies=False, - cipher=block_cipher) -pyz = PYZ(a.pure, a.zipped_data, - cipher=block_cipher) -exe = EXE(pyz, - a.scripts, - exclude_binaries=True, - name='pyfa', - debug=False, - strip=False, - upx=True, - console=True ) -coll = COLLECT(exe, - a.binaries, - a.zipfiles, - a.datas, - strip=False, - upx=True, - name='pyfa') diff --git a/appimage/pyfa.desktop b/dist_assets/linux/pyfa.desktop similarity index 100% rename from appimage/pyfa.desktop rename to dist_assets/linux/pyfa.desktop diff --git a/requirements.txt b/requirements.txt index 20f1c128c..1b334c6db 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -wxPython <4.1 +wxPython == 4.0.6 logbook >= 1.0.0 numpy == 1.19.2 matplotlib == 3.2.2 @@ -12,4 +12,4 @@ roman >= 2.0.0 beautifulsoup4 >= 4.6.0 pyyaml >= 5.1 python-jose==3.0.1 -requests-cache==0.8.1 \ No newline at end of file +requests-cache==0.8.1 diff --git a/scripts/osx-package.sh b/scripts/osx-package.sh index 278694dd7..56a2f99b1 100644 --- a/scripts/osx-package.sh +++ b/scripts/osx-package.sh @@ -7,5 +7,7 @@ echo "Building distributive..." python3 -m PyInstaller -y --clean --windowed dist_assets/mac/pyfa.spec echo "Compressing distributive..." cd dist +/usr/libexec/PlistBuddy -c "Add :CFBundleVersion string ${PYFA_VERSION}" "pyfa.app/Contents/Info.plist" # Add missing +/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString ${PYFA_VERSION}" "pyfa.app/Contents/Info.plist" # Modify existing zip -r "pyfa-$PYFA_VERSION-mac.zip" pyfa.app md5 -r "pyfa-$PYFA_VERSION-mac.zip" From 67119fcff14c6d577a558b4cfce7ebd8deafe218 Mon Sep 17 00:00:00 2001 From: blitzmann Date: Wed, 23 Mar 2022 22:32:54 -0400 Subject: [PATCH 4/5] fix crowdin error for PRs --- scripts/dump_crowdin_progress.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/dump_crowdin_progress.py b/scripts/dump_crowdin_progress.py index 7779947ce..17d3d7cdd 100644 --- a/scripts/dump_crowdin_progress.py +++ b/scripts/dump_crowdin_progress.py @@ -19,6 +19,10 @@ params = { resp = requests.get('https://api.crowdin.com/api/project/pyfa/status', params=params) data = resp.json() +if resp.status_code is not 200: + print("Error fetching Crowdin progress. Error: {}; {}".format(data['error']['message'], key[-3:])) + sys.exit() + for x in data: x['code'] = x['code'].replace('-', '_') lang = wx.Locale.FindLanguageInfo(x['code']) From 518b4abf8c54a0ff1ae1c5da7c767cf0374a19d8 Mon Sep 17 00:00:00 2001 From: blitzmann Date: Wed, 23 Mar 2022 22:55:22 -0400 Subject: [PATCH 5/5] fix crowdin error for PRs --- scripts/dump_crowdin_progress.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/dump_crowdin_progress.py b/scripts/dump_crowdin_progress.py index 17d3d7cdd..c7d50032f 100644 --- a/scripts/dump_crowdin_progress.py +++ b/scripts/dump_crowdin_progress.py @@ -6,7 +6,7 @@ import sys key = os.environ.get("CROWDIN_API_KEY", None) -if key is None: +if key is None or key == '': # if building from a forked PR, this is normal. Secret veariables are generally unavailable in those circumstances print("CROWDIN_API_KEY env variable not found, cannot fetch translation status.") sys.exit() @@ -20,7 +20,7 @@ resp = requests.get('https://api.crowdin.com/api/project/pyfa/status', params=pa data = resp.json() if resp.status_code is not 200: - print("Error fetching Crowdin progress. Error: {}; {}".format(data['error']['message'], key[-3:])) + print("Error fetching Crowdin progress. Error: {}; {}".format(data['error']['message'])) sys.exit() for x in data:
Python Fitting Assitant for EVE Online +