@@ -382,10 +382,38 @@ pre-package:
382382  - pipx install "briefcase==${BRIEFCASE_VERSION}" 
383383  - export PATH="${HOME}/.local/bin:${PATH}" 
384384  - python3 -m venv env 
385+   - ./env/bin/python3 -m pip install -U 
386+       pip 
387+       setuptools 
388+       wheel 
389+   #  Latest pip versions on Debian 11 bullseye may throw encoding errors in `compileall.py` if not all modules can be
390+   #  byte-compiled (for example for PySide6). Therefore, patch the Python installation to use 'UTF-8' as fallback
391+   #  encoding.
392+   - |- 
393+     if ! awk -F'=' '$1 == "VERSION_CODENAME" && $2 == "bullseye" { exit 1 }' /etc/os-release; then 
394+       pushd /usr/lib/python3.9 
395+     ( 
396+       echo "--- compileall.py       2025-03-20 02:07:39.000000000 +0000"; 
397+       echo "+++ compileall.py.patched       2025-04-29 10:11:00.568493043 +0000"; 
398+       echo "@@ -252,9 +252,9 @@"; 
399+       echo "                 else:"; 
400+       echo "                     print('*** ', end='')"; 
401+       echo "                 # escape non-printable characters in msg"; 
402+       echo "-                msg = err.msg.encode(sys.stdout.encoding,"; 
403+       echo "+                msg = err.msg.encode(sys.stdout.encoding if sys.stdout.encoding is not None else 'utf-8',"; 
404+       echo "                                      errors='backslashreplace')"; 
405+       echo "-                msg = msg.decode(sys.stdout.encoding)"; 
406+       echo "+                msg = msg.decode(sys.stdout.encoding if sys.stdout.encoding is not None else 'utf-8')"; 
407+       echo "                 print(msg)"; 
408+       echo "             except (SyntaxError, UnicodeError, OSError) as e:"; 
409+       echo "                 success = False"; 
410+     ) | patch -N 
411+       popd 
412+     fi 
385413   script :
386414  #  Install the project in editable mode to force to build all C extenions in-place. Otherwise, they won't be packaged
387415  #  by briefcase
388-   - ./env/bin/python3 -m pip install -e . 
416+   - ./env/bin/python3 -m pip install --no-deps - e . 
389417  - briefcase create linux system 
390418  - briefcase build linux system 
391419  - briefcase package linux system 
@@ -419,6 +447,11 @@ package:ubuntu:24.10:
419447  image : ubuntu:24.10 
420448
421449
450+ package:ubuntu:25.04 :
451+   extends : .package:debian 
452+   image : ubuntu:25.04 
453+ 
454+ 
422455.package:rhel :
423456  stage : package 
424457  needs : ["pre-package"] 
@@ -433,10 +466,14 @@ package:ubuntu:24.10:
433466  - pipx install "briefcase==${BRIEFCASE_VERSION}" 
434467  - export PATH="${HOME}/.local/bin:${PATH}" 
435468  - python3 -m venv env 
469+   - ./env/bin/python3 -m pip install -U 
470+       pip 
471+       setuptools 
472+       wheel 
436473  script :
437474  #  Install the project in editable mode to force to build all C extenions in-place. Otherwise, they won't be packaged
438475  #  by briefcase
439-   - ./env/bin/python3 -m pip install -e . 
476+   - ./env/bin/python3 -m pip install --no-deps - e . 
440477  - briefcase create linux system 
441478  - briefcase build linux system 
442479  - briefcase package linux system 
@@ -455,6 +492,11 @@ package:fedora:41:
455492  image : fedora:41 
456493
457494
495+ package:fedora:42 :
496+   extends : .package:rhel 
497+   image : fedora:42 
498+ 
499+ 
458500package:opensuse:tumbleweed :
459501  stage : package 
460502  image : opensuse/tumbleweed 
@@ -468,10 +510,14 @@ package:opensuse:tumbleweed:
468510  - pipx install "briefcase==${BRIEFCASE_VERSION}" 
469511  - export PATH="${HOME}/.local/bin:${PATH}" 
470512  - python3 -m venv env 
513+   - ./env/bin/python3 -m pip install -U 
514+       pip 
515+       setuptools 
516+       wheel 
471517  script :
472518  #  Install the project in editable mode to force to build all C extenions in-place. Otherwise, they won't be packaged
473519  #  by briefcase
474-   - ./env/bin/python3 -m pip install -e . 
520+   - ./env/bin/python3 -m pip install --no-deps - e . 
475521  - briefcase create linux system 
476522  - briefcase build linux system 
477523  - briefcase package linux system 
@@ -500,10 +546,14 @@ package:flatpack:
500546  - pipx install "briefcase==${BRIEFCASE_VERSION}" 
501547  - export PATH="${HOME}/.local/bin:${PATH}" 
502548  - python3 -m venv env 
549+   - ./env/bin/python3 -m pip install -U 
550+       pip 
551+       setuptools 
552+       wheel 
503553  script :
504554  #  Install the project in editable mode to force to build all C extenions in-place. Otherwise, they won't be packaged
505555  #  by briefcase
506-   - ./env/bin/python3 -m pip install -e . 
556+   - ./env/bin/python3 -m pip install --no-deps - e . 
507557  - briefcase create linux flatpak 
508558  - briefcase build linux flatpak 
509559  - briefcase package linux flatpak 
@@ -575,6 +625,10 @@ package:macos:
575625  - ./create_icns.py pymoldyn/icon.png pymoldyn/icon.icns 
576626  - GR_TEMPDIR="$(mktemp -d)" 
577627  - python3 -m venv env 
628+   - ./env/bin/python3 -m pip install -U 
629+       pip 
630+       setuptools 
631+       wheel 
578632  - GR_STABLE_VERSION="$( 
579633      git ls-remote --tags "https://github.com/sciapp/gr" | 
580634      awk 'match($2, /refs\/tags\/v[0-9]+\.[0-9]+\.[0-9]+$/) { print substr($2, RSTART + length("refs/tags/v")) }' | 
@@ -587,7 +641,7 @@ package:macos:
587641  script :
588642  #  Install the project in editable mode to force to build all C extenions in-place. Otherwise, they won't be packaged
589643  #  by briefcase
590-   - ./env/bin/python3 -m pip install -e . 
644+   - ./env/bin/python3 -m pip install --no-deps - e . 
591645  - briefcase create 
592646  #  Force to use the universal GR binaries for x86_64 and arm64
593647  - rsync -a "${GR_TEMPDIR}/gr/" --exclude "Applications" 
@@ -620,10 +674,14 @@ package:windows:
620674      -define "icon:auto-resize=16,32,48,64,128,256" 
621675      pymoldyn/icon.ico 
622676  - vcvars_cmd python -m venv env 
677+   - ./env/Scripts/python -m pip install -U 
678+       pip 
679+       setuptools 
680+       wheel 
623681  script :
624682  #  Install the project in editable mode to force to build all C extenions in-place. Otherwise, they won't be packaged
625683  #  by briefcase
626-   - ./env/Scripts/python -m pip install -e . 
684+   - ./env/Scripts/python -m pip install --no-deps - e . 
627685  - vcvars_cmd python -m briefcase create 
628686  - vcvars_cmd python -m briefcase build 
629687  - vcvars_cmd python -m briefcase package --adhoc-sign 
0 commit comments