diff --git a/.github/workflows/config.json b/.github/workflows/config.json index 6cf513ee..0382284c 100644 --- a/.github/workflows/config.json +++ b/.github/workflows/config.json @@ -1,3 +1,4 @@ { - "node": true -} \ No newline at end of file + "node": true, + "pyinstaller": true +} diff --git a/opengeodeweb-back.spec b/opengeodeweb-back.spec new file mode 100644 index 00000000..76dceeb8 --- /dev/null +++ b/opengeodeweb-back.spec @@ -0,0 +1,45 @@ +# -*- mode: python ; coding: utf-8 -*- +# pyinstaller --onefile --collect-data opengeodeweb_back --recursive-copy-metadata opengeodeweb_back src/opengeodeweb_back/app.py -n opengeodeweb-back +from PyInstaller.utils.hooks import collect_data_files +from PyInstaller.utils.hooks import copy_metadata + +datas = [] +datas += collect_data_files('opengeodeweb_back') +datas += copy_metadata('opengeodeweb_back', recursive=True) + + +a = Analysis( + ['src/opengeodeweb_back/app.py'], + pathex=[], + binaries=[], + datas=datas, + hiddenimports=[], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[], + noarchive=False, + optimize=0, +) +pyz = PYZ(a.pure) + +exe = EXE( + pyz, + a.scripts, + a.binaries, + a.datas, + [], + name='opengeodeweb-back', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=True, + disable_windowed_traceback=False, + argv_emulation=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None, +) diff --git a/requirements.txt b/requirements.txt index b855bc40..4504a827 100644 --- a/requirements.txt +++ b/requirements.txt @@ -60,4 +60,3 @@ werkzeug==3.1.2 # flask # flask-cors -opengeodeweb-microservice==1.*,>=1.0.15