Philipp Hörist pushed to branch windows-fix at gajim / gajim
Commits:
e879e090 by Philipp Hörist at 2026-06-27T14:14:33+02:00
perf: Windows: Compile python files so startup is faster
- - - - -
59df8097 by Philipp Hörist at 2026-06-27T14:17:10+02:00
ci: Windows: Make Windows build easier to execute locally
- - - - -
2 changed files:
- win/_base.sh
- win/misc/create_launcher.py
Changes:
=====================================
win/_base.sh
=====================================
@@ -88,8 +88,8 @@ function build_pacman {
pacman --root "${BUILD_ROOT}" "$@"
}
-function build_pip {
- "${BUILD_ROOT}"/"${MSYSTEM_PREFIX:1}"/bin/"${PYTHON_ID}".exe -m pip "$@"
+function build_pip_install {
+ "${BUILD_ROOT}"/"${MSYSTEM_PREFIX:1}"/bin/"${PYTHON_ID}".exe -m pip
install --break-system-packages "$@"
}
function build_python {
@@ -97,7 +97,7 @@ function build_python {
}
function build_compileall {
- build_python -m compileall -b "$@"
+ build_python -m compileall -q -f "$@"
}
function install_pre_deps {
@@ -129,8 +129,8 @@ function install_mingw_deps {
}
function install_python_deps {
- build_pip install precis-i18n
- build_pip install $(echo "$PYTHON_REQUIREMENTS" | tr ["\\n"] [" "])
+ build_pip_install precis-i18n
+ build_pip_install $(echo "$PYTHON_REQUIREMENTS" | tr ["\\n"] [" "])
}
function post_install_deps {
@@ -153,7 +153,7 @@ function install_gajim {
cd ..
build_python make.py build --dist=win
- build_pip install .
+ build_pip_install .
QL_VERSION=$(MSYSTEM= build_python -c \
"import gajim; import sys;
sys.stdout.write(gajim.__version__.split('+')[0])")
@@ -318,8 +318,9 @@ function cleanup_install {
find "${MINGW_ROOT}" -name "*.sh" -exec rm -f {} \;
find "${MINGW_ROOT}" -name "*.whl" -exec rm -f {} \;
- find "${MINGW_ROOT}" -type d -name "__pycache__" -prune -exec rm -rf {} \;
- find "${MINGW_ROOT}"/bin -name "*.pyc" -exec rm -f {} \;
+ # Byte-compile Python files and clean up afterwards
+ echo "Byte-compile Python files"
+ build_compileall "${MINGW_ROOT}"
echo "Run depcheck.py"
build_python "${MISC}/depcheck.py"
@@ -336,8 +337,8 @@ function makepri {
}
function build_exe_installer {
- MSYSTEM='MINGW64' /usr/bin/bash -lc "cd ${BUILD_ROOT} && makensis -NOCD
-DVERSION=\"$QL_VERSION_DESC\" -DARCH=\"${MSYSTEM_CARCH}\"
-DPREFIX=\"${MSYSTEM_PREFIX:1}\" ${MISC}/gajim.nsi"
- MSYSTEM='MINGW64' /usr/bin/bash -lc "cd ${BUILD_ROOT} && makensis -NOCD
-DVERSION=\"$QL_VERSION_DESC\" -DARCH=\"${MSYSTEM_CARCH}\"
-DPREFIX=\"${MSYSTEM_PREFIX:1}\" ${MISC}/gajim-portable.nsi"
+ cd ${BUILD_ROOT} && makensis -NOCD -DVERSION=\"$QL_VERSION_DESC\"
-DARCH=\"${MSYSTEM_CARCH}\" -DPREFIX=\"${MSYSTEM_PREFIX:1}\" ${MISC}/gajim.nsi
+ cd ${BUILD_ROOT} && makensis -NOCD -DVERSION=\"$QL_VERSION_DESC\"
-DARCH=\"${MSYSTEM_CARCH}\" -DPREFIX=\"${MSYSTEM_PREFIX:1}\"
${MISC}/gajim-portable.nsi
}
function build_msix_installer {
=====================================
win/misc/create_launcher.py
=====================================
@@ -112,7 +112,6 @@ def get_launcher_code(*, debug: bool) -> str:
Py_NoUserSiteDirectory = 1;
Py_IgnoreEnvironmentFlag = 1;
- Py_DontWriteBytecodeFlag = 1;
Py_FrozenFlag = 1;
Py_Initialize();
PySys_SetArgvEx(__argc, szArglist, 0);
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/compare/7877efc7bf9c78f25b2d0898dc57547a8a05a052...59df809720ce3ebab2c800797e48f2a24d45a174
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/compare/7877efc7bf9c78f25b2d0898dc57547a8a05a052...59df809720ce3ebab2c800797e48f2a24d45a174
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]