Core26: bundled Python changes

oHi @mr_cal ,

Thanks for the explanations.

I updated to Snapcraft 9.0-RC

  • 1/ With python runtime defined before app,

Same building problem where it cannot find python in 2nd part:

parts:
  python-runtime:
    plugin: nil
    stage-packages:
      - python3
      - python3-venv
      
  bazarr:
    after:
      - python-runtime
    plugin: python

Output:

:: + craftctl default
:: + python3 -m venv /root/parts/bazarr/install
:: + PARTS_PYTHON_VENV_INTERP_PATH=/root/parts/bazarr/install/bin/python3
:: + /root/parts/bazarr/install/bin/pip install -U pip setuptools wheel
:: Requirement already satisfied: pip in /root/parts/bazarr/install/lib/python3.14/site-packages (26.1.1)
:: Requirement already satisfied: setuptools in /root/parts/bazarr/install/lib/python3.14/site-packages (82.0.1)
:: Requirement already satisfied: wheel in /root/parts/bazarr/install/lib/python3.14/site-packages (0.47.0)
:: WARNING: Cache entry deserialization failed, entry ignored
:: Requirement already satisfied: packaging>=24.0 in /root/parts/bazarr/install/lib/python3.14/site-packages (from wheel) (26.2)
:: + /root/parts/bazarr/install/bin/pip install -U -r requirements.txt
:: Ignoring pywin32: markers 'platform_system == "Windows"' don't match your environment
:: Requirement already satisfied: setuptools in /root/parts/bazarr/install/lib/python3.14/site-packages (from -r requirements.txt (line 1)) (82.0.1)
:: Requirement already satisfied: lxml>=4.3.0 in /root/parts/bazarr/install/lib/python3.14/site-packages (from -r requirements.txt (line 2)) (6.1.0)
:: Requirement already satisfied: numpy<2.4.0,>=1.12.0 in /root/parts/bazarr/install/lib/python3.14/site-packages (from -r requirements.txt (line 3)) (2.3.5)
:: Requirement already satisfied: webrtcvad-wheels>=2.0.10 in /root/parts/bazarr/install/lib/python3.14/site-packages (from -r requirements.txt (line 4)) (2.0.14)
:: Requirement already satisfied: Pillow>=9.0.0 in /root/parts/bazarr/install/lib/python3.14/site-packages (from -r requirements.txt (line 5)) (12.2.0)
:: + '[' -f setup.py ']'
:: + '[' -f pyproject.toml ']'
:: + find /root/parts/bazarr/install -type f -executable -print0
:: + xargs --no-run-if-empty -0 sed -i '1 s|^#\!/root/parts/bazarr/install/bin/python3.*$|#!/usr/bin/env python3|'
:: ++ set +o
:: ++ grep errexit
:: + opts_state='set +o errexit'
:: + set +e
:: + install_dir=/root/parts/bazarr/install/usr/bin
:: + stage_dir=/root/stage/usr/bin
:: +++ readlink -f /root/parts/bazarr/install/bin/python3
:: ++ basename /usr/bin/python3.14
:: + basename=python3.14
:: + echo Looking for a Python interpreter called '"python3.14"' in the payload...
:: Looking for a Python interpreter called "python3.14" in the payload...
:: ++ find /root/parts/bazarr/install/usr/bin /root/stage/usr/bin -type f -executable -name python3.14 -print -quit
:: ++ true
:: + payload_python=
:: + '[' -n '' ']'
:: + echo 'Python interpreter not found in payload.'
:: Python interpreter not found in payload.
:: + symlink_target=
:: + '[' -z '' ']'
:: + echo 'No suitable Python interpreter found, giving up.'
:: No suitable Python interpreter found, giving up.
:: + exit 1
Failed to run the build script for part 'bazarr'.
Detailed information:
:: + '[' -z '' ']'
:: + echo 'No suitable Python interpreter found, giving up.'
:: No suitable Python interpreter found, giving up.
:: + exit 1
  • 2/ with python3-minimal, of course, same problem:
parts:
  python-runtime:
    plugin: nil
    stage-packages:
      - python3-minimal
      - python3-venv
  • 3/ adding python3.14-minimal explicitly defined, it builds without error or warning:
parts:
  python-runtime:
    plugin: nil
    stage-packages:
      - python3-minimal
      - python3.14-minimal
      - python3-venv

but as python3.14-minimal is a dependency required by python3and python3-minimal, there seems to be a deeper problem there.

AND we’re now forced to define python version, if it stays this way.

  • but it does NOT run

The modules from requirements.txt are present in the snap libs but not loaded

  • 4/ same thing with whole definition from example:
parts:
  python-runtime:
    plugin: nil
    stage-packages:
      - libpython3.14-minimal
      - libpython3.14-stdlib
      - python3-minimal
      - python3.14-minimal
      - python3.14-venv

builds but does NOT run ; modules NOT loaded.

  • 5/ it runs with python3 + python3-venv + python3.14-minimal definition:
parts:
  python-runtime:
    plugin: nil
    stage-packages:
      - python3.14-minimal
      - python3
      - python3-venv
  • 6/ it builds with python3.13 from deadsnakes ppa but fails to run (no module found even pip)
  python-runtime:
    plugin: nil
    stage-packages:
      - python3.13
      - python3.13-venv

the python version must be defined in build-environment or it uses python 3.14 ; not sure if this is expected (?)

    build-environment:
      - PARTS_PYTHON_INTERPRETER: python3.13
  • Both my snaps bazarr-tak (used for my tests) and flaresolverr-tak using python plugin are working with core26 and snapcraft 9.0-rc now.

Thx <3

Update:

It doesn’t work with a different python version

After a night of thoughts, my guess was that python from stage-packages affected python from snapcraft.

  • So I ran a test:

1/ [Test1] check python version and modules

2/ load python runtime stage-packages

3/ [Test2] check python version and modules

4/ build app with requirements

5/ [Test3] check python version and modules

parts:
  test:
    plugin: nil
    override-build: |
      python3 -V
      pip list
      craftctl default
      
  python-runtime:
    after:
      - test
    plugin: nil
    stage-packages:
      - python3.14-minimal
      - python3
      - python3-venv
      
  test2:
    after:
      - python-runtime
    plugin: nil
    override-build: |
      python3 -V
      pip list
      craftctl default
      
  bazarr:
    after:
      - test2
    plugin: python
    python-requirements:
      - requirements.txt
    source: .
    override-pull: |
      # Pull
      rm -rf $CRAFT_PART_SRC/{,.[!.],..?}*
      download_url=$(curl -sL https://api.github.com/repos/morpheus65535/bazarr/releases/latest | sed -nre "s/^.*\"browser_download_url\": \"([^\"]*)\".*/\1/p")
      wget "${download_url}" -O srcfile
      unzip srcfile
      
      craftctl default
    #build-environment:
    #  - PARTS_PYTHON_INTERPRETER: python3.14
    override-build: |
      # Get Last Source Tag version and Check Snap (with same Source) version
      src_version=$(curl -sL https://api.github.com/repos/morpheus65535/bazarr/releases/latest | sed -nre "s/^.*\/download\/v([^\/]*)\/.*/\1/p")
      echo "Source last tag: ${src_version}"
      snap_last_version=$(curl -sL -H "Snap-Device-Series: 16" "https://api.snapcraft.io/v2/snaps/info/bazarr-tak?architecture=${CRAFT_ARCH_BUILD_FOR}&fields=version" | sed -nre "s/^.*\"stable\"\,\"track\"\:\"latest\"\}\,\"version\"\:\"([^\"]*)\".*/\1/p");
      echo "Snap last version: ${snap_last_version}"
      snap_build_with_same_version=$(echo $snap_last_version | sed -nre "s/^($src_version.*).*/\1/p");
      # Same version ?
      if [ -z "$snap_build_with_same_version" ]
      then
        new_snap_version="${src_version}";
      else
        # Get snap build version
        snap_build=$(echo $snap_build_with_same_version | sed -nre 's/^.*-v([0-9]*).*/\1/p');
        # Already a build version ?
        if [ -z "$snap_build" ]
        then
          # init @v2
          new_snap_build="2";
        else
          # increment @v+1
          new_snap_build=$(($snap_build+1));
        fi

        new_snap_version="${src_version}-v${new_snap_build}";
      fi

       craftctl set version=$new_snap_version

      # Build
      INST_DIR="$CRAFT_PART_INSTALL/Bazarr"
      mkdir -p "$INST_DIR"
      cp -a ./* $INST_DIR
      
      craftctl default
    build-packages:
      - curl
      - wget
      - unzip
      
  test3:
    after:
      - bazarr
    plugin: nil
    override-build: |
      python3 -V
      pip list
      craftctl default
  • It results that snapcraft python is affected by this ; with different modules and different modules versions:
Building test
:: + python3 -V
:: Python 3.14.4
:: + pip list
:: Package           Version
:: ----------------- -------
:: autocommand       2.2.2
:: inflect           7.5.0
:: jaraco.context    6.0.1
:: jaraco.functools  4.1.0
:: jaraco.text       4.0.0
:: more-itertools    10.8.0
:: packaging         26.0
:: pip               25.1.1
:: setuptools        78.1.1
:: typeguard         4.4.4
:: typing_extensions 4.15.0
:: wheel             0.46.3
:: zipp              3.23.0
:: + craftctl default
Building test2
:: + python3 -V
:: Python 3.14.4
:: + pip list
:: Package           Version
:: ----------------- -------
:: autocommand       2.2.2
:: inflect           7.5.0
:: jaraco.context    6.0.1
:: jaraco.functools  4.1.0
:: jaraco.text       4.0.0
:: more-itertools    10.8.0
:: packaging         26.0
:: pip               25.1.1
:: setuptools        78.1.1
:: typeguard         4.4.4
:: typing_extensions 4.15.0
:: wheel             0.46.3
:: zipp              3.23.0
Building test3
:: + python3 -V
:: Python 3.14.4
:: + pip list
:: Package          Version
:: ---------------- -------
:: lxml             6.1.0
:: numpy            2.3.5
:: packaging        26.2
:: pillow           12.2.0
:: pip              26.1.1
:: setuptools       82.0.1
:: webrtcvad-wheels 2.0.14
:: wheel            0.47.0
:: + craftctl default

Wouldn’t it be problematic for the other parts of snapcraft that uses python ?

Whole output:

Building test
:: + python3 -V
:: Python 3.14.4
:: + pip list
:: Package           Version
:: ----------------- -------
:: autocommand       2.2.2
:: inflect           7.5.0
:: jaraco.context    6.0.1
:: jaraco.functools  4.1.0
:: jaraco.text       4.0.0
:: more-itertools    10.8.0
:: packaging         26.0
:: pip               25.1.1
:: setuptools        78.1.1
:: typeguard         4.4.4
:: typing_extensions 4.15.0
:: wheel             0.46.3
:: zipp              3.23.0
:: + craftctl default
Skipping pull for test (already ran)
Skipping build for test (already ran)
Staging test (required to build 'python-runtime')
Building python-runtime
Skipping pull for python-runtime (already ran)
Skipping build for python-runtime (already ran)
Staging python-runtime (required to build 'test2')
Building test2
:: + python3 -V
:: Python 3.14.4
:: + pip list
:: Package           Version
:: ----------------- -------
:: autocommand       2.2.2
:: inflect           7.5.0
:: jaraco.context    6.0.1
:: jaraco.functools  4.1.0
:: jaraco.text       4.0.0
:: more-itertools    10.8.0
:: packaging         26.0
:: pip               25.1.1
:: setuptools        78.1.1
:: typeguard         4.4.4
:: typing_extensions 4.15.0
:: wheel             0.46.3
:: zipp              3.23.0
:: + craftctl default
Skipping pull for test2 (already ran)
Skipping build for test2 (already ran)
Staging test2 (required to build 'bazarr')
Building bazarr
:: ++ curl -sL https://api.github.com/repos/morpheus65535/bazarr/releases/latest
:: ++ sed -nre 's/^.*\/download\/v([^\/]*)\/.*/\1/p'
:: + src_version=1.5.6
:: + echo 'Source last tag: 1.5.6'
:: Source last tag: 1.5.6
:: ++ curl -sL -H 'Snap-Device-Series: 16' 'https://api.snapcraft.io/v2/snaps/info/bazarr-tak?architecture=amd64&fields=version'
:: ++ sed -nre 's/^.*"stable"\,"track"\:"latest"\}\,"version"\:"([^"]*)".*/\1/p'
:: + snap_last_version=1.5.6
:: + echo 'Snap last version: 1.5.6'
:: Snap last version: 1.5.6
:: ++ echo 1.5.6
:: ++ sed -nre 's/^(1.5.6.*).*/\1/p'
:: + snap_build_with_same_version=1.5.6
:: + '[' -z 1.5.6 ']'
:: ++ echo 1.5.6
:: ++ sed -nre 's/^.*-v([0-9]*).*/\1/p'
:: + snap_build=
:: + '[' -z '' ']'
:: + new_snap_build=2
:: + new_snap_version=1.5.6-v2
:: + craftctl set version=1.5.6-v2
:: + INST_DIR=/root/parts/bazarr/install/Bazarr
:: + mkdir -p /root/parts/bazarr/install/Bazarr
:: + cp -a ./LICENSE ./README.md ./VERSION ./bazarr ./bazarr.py ./custom_libs ./frontend ./icon.png ./libs ./migrations ./postgres-requirements.txt ./requirements.txt ./snap ./srcfile /root/parts/bazarr/install/Bazarr
:: + craftctl default
:: + python3 -m venv /root/parts/bazarr/install
:: + PARTS_PYTHON_VENV_INTERP_PATH=/root/parts/bazarr/install/bin/python3
:: + /root/parts/bazarr/install/bin/pip install -U pip setuptools wheel
:: Requirement already satisfied: pip in /root/parts/bazarr/install/lib/python3.14/site-packages (25.1.1)
:: Collecting pip
::   Downloading pip-26.1.1-py3-none-any.whl.metadata (4.6 kB)
:: Collecting setuptools
::   Downloading setuptools-82.0.1-py3-none-any.whl.metadata (6.5 kB)
:: Collecting wheel
::   Downloading wheel-0.47.0-py3-none-any.whl.metadata (2.3 kB)
:: Collecting packaging>=24.0 (from wheel)
::   Downloading packaging-26.2-py3-none-any.whl.metadata (3.5 kB)
:: Downloading pip-26.1.1-py3-none-any.whl (1.8 MB)
::    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 6.3 MB/s eta 0:00:00
:: Downloading setuptools-82.0.1-py3-none-any.whl (1.0 MB)
::    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.0/1.0 MB 6.3 MB/s eta 0:00:00
:: Downloading wheel-0.47.0-py3-none-any.whl (32 kB)
:: Downloading packaging-26.2-py3-none-any.whl (100 kB)
:: Installing collected packages: setuptools, pip, packaging, wheel
::   Attempting uninstall: pip
::     Found existing installation: pip 25.1.1
::     Uninstalling pip-25.1.1:
::       Successfully uninstalled pip-25.1.1
::
:: Successfully installed packaging-26.2 pip-26.1.1 setuptools-82.0.1 wheel-0.47.0
:: + /root/parts/bazarr/install/bin/pip install -U -r requirements.txt
:: WARNING: Cache entry deserialization failed, entry ignored
:: Ignoring pywin32: markers 'platform_system == "Windows"' don't match your environment
:: Requirement already satisfied: setuptools in /root/parts/bazarr/install/lib/python3.14/site-packages (from -r requirements.txt (line 1)) (82.0.1)
:: WARNING: Cache entry deserialization failed, entry ignored
:: Collecting lxml>=4.3.0 (from -r requirements.txt (line 2))
::   Downloading lxml-6.1.0-cp314-cp314-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl.metadata (4.0 kB)
:: Collecting numpy<2.4.0,>=1.12.0 (from -r requirements.txt (line 3))
::   Downloading numpy-2.3.5-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (62 kB)
:: Collecting webrtcvad-wheels>=2.0.10 (from -r requirements.txt (line 4))
::   Downloading webrtcvad_wheels-2.0.14.tar.gz (70 kB)
::   Installing build dependencies: started
::   Installing build dependencies: finished with status 'done'
::   Getting requirements to build wheel: started
::   Getting requirements to build wheel: finished with status 'done'
::   Preparing metadata (pyproject.toml): started
::   Preparing metadata (pyproject.toml): finished with status 'done'
:: Collecting Pillow>=9.0.0 (from -r requirements.txt (line 5))
::   Downloading pillow-12.2.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (8.8 kB)
:: Downloading numpy-2.3.5-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (16.6 MB)
::    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.6/16.6 MB 9.0 MB/s  0:00:01
:: Downloading lxml-6.1.0-cp314-cp314-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl (5.2 MB)
::    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.2/5.2 MB 9.1 MB/s  0:00:00
:: Downloading pillow-12.2.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (7.1 MB)
::    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.1/7.1 MB 9.2 MB/s  0:00:00
:: Building wheels for collected packages: webrtcvad-wheels
::   Building wheel for webrtcvad-wheels (pyproject.toml): started
::   Building wheel for webrtcvad-wheels (pyproject.toml): finished with status 'done'
::   Created wheel for webrtcvad-wheels: filename=webrtcvad_wheels-2.0.14-cp314-cp314-linux_x86_64.whl size=77816 sha256=3b16f50b8aa370c88cbf9cb4f2ee74ef7ca77a42558e75d7fc6a7371f804e3e6
::   Stored in directory: /root/.cache/pip/wheels/34/cc/e8/c2a5f73b19d5dbc9b454ac337f4acb9c5b1c903cffabf045e4
:: Successfully built webrtcvad-wheels
:: Installing collected packages: webrtcvad-wheels, Pillow, numpy, lxml
::
:: Successfully installed Pillow-12.2.0 lxml-6.1.0 numpy-2.3.5 webrtcvad-wheels-2.0.14
:: + '[' -f setup.py ']'
:: + '[' -f pyproject.toml ']'
:: + find /root/parts/bazarr/install -type f -executable -print0
:: + xargs --no-run-if-empty -0 sed -i '1 s|^#\!/root/parts/bazarr/install/bin/python3.*$|#!/usr/bin/env python3|'
:: ++ set +o
:: ++ grep errexit
:: + opts_state='set +o errexit'
:: + set +e
:: + install_dir=/root/parts/bazarr/install/usr/bin
:: + stage_dir=/root/stage/usr/bin
:: +++ readlink -f /root/parts/bazarr/install/bin/python3
:: ++ basename /usr/bin/python3.14
:: + basename=python3.14
:: Looking for a Python interpreter called "python3.14" in the payload...
:: + echo Looking for a Python interpreter called '"python3.14"' in the payload...
:: ++ find /root/parts/bazarr/install/usr/bin /root/stage/usr/bin -type f -executable -name python3.14 -print -quit
:: ++ true
:: + payload_python=/root/stage/usr/bin/python3.14
:: + '[' -n /root/stage/usr/bin/python3.14 ']'
:: Found interpreter in payload: "/root/stage/usr/bin/python3.14"
:: + echo Found interpreter in payload: '"/root/stage/usr/bin/python3.14"'
:: + installed_python=/root/stage/usr/bin/python3.14
:: + '[' /root/stage/usr/bin/python3.14 = /root/stage/usr/bin/python3.14 ']'
:: + symlink_target=../usr/bin/python3.14
:: + '[' -z ../usr/bin/python3.14 ']'
:: + eval 'set +o errexit'
:: ++ set +o errexit
:: + ln -sf ../usr/bin/python3.14 /root/parts/bazarr/install/bin/python3
Skipping pull for bazarr (already ran)
Skipping build for bazarr (already ran)
Staging bazarr (required to build 'test3')
Building test3
:: + python3 -V
:: Python 3.14.4
:: + pip list
:: Package          Version
:: ---------------- -------
:: lxml             6.1.0
:: numpy            2.3.5
:: packaging        26.2
:: pillow           12.2.0
:: pip              26.1.1
:: setuptools       82.0.1
:: webrtcvad-wheels 2.0.14
:: wheel            0.47.0
:: + craftctl default
  • Same test with python3.13 from deadsnakes ppa:

Diff:

package-repositories:
  - type: apt
    ppa: deadsnakes/ppa
  python-runtime:
    after:
      - test
    plugin: nil
    stage-packages:
      #- python3.14-minimal
      - python3.13
      - python3.13-venv
    build-environment:
      - PARTS_PYTHON_INTERPRETER: python3.13

Output:

Building test
:: + python3 -V
:: Python 3.14.4
:: + pip list
:: Package           Version
:: ----------------- -------
:: autocommand       2.2.2
:: inflect           7.5.0
:: jaraco.context    6.0.1
:: jaraco.functools  4.1.0
:: jaraco.text       4.0.0
:: more-itertools    10.8.0
:: packaging         26.0
:: pip               25.1.1
:: setuptools        78.1.1
:: typeguard         4.4.4
:: typing_extensions 4.15.0
:: wheel             0.46.3
:: zipp              3.23.0
:: + craftctl default
Building test2
:: + python3 -V
:: Python 3.14.4
:: + pip list
:: Package           Version
:: ----------------- -------
:: autocommand       2.2.2
:: inflect           7.5.0
:: jaraco.context    6.0.1
:: jaraco.functools  4.1.0
:: jaraco.text       4.0.0
:: more-itertools    10.8.0
:: packaging         26.0
:: pip               25.1.1
:: setuptools        78.1.1
:: typeguard         4.4.4
:: typing_extensions 4.15.0
:: wheel             0.46.3
:: zipp              3.23.0
:: + craftctl default
Building test3
:: + python3 -V
:: Python 3.13.13
:: + pip list
:: Traceback (most recent call last):
::   File "/root/stage/bin/pip", line 3, in <module>
::     from pip._internal.cli.main import main
:: ModuleNotFoundError: No module named 'pip'
'override-build' in part 'test3' failed with code 1.
Detailed information:
:: + python3 -V
:: + pip list
:: Traceback (most recent call last):
::   File "/root/stage/bin/pip", line 3, in <module>
::     from pip._internal.cli.main import main
:: ModuleNotFoundError: No module named 'pip'
Recommended resolution: Review the scriptlet and make sure it's correct.

Snapcraft now uses python3.13 (and fails to find even pip).

Whole output:

Building test
:: + python3 -V
:: Python 3.14.4
:: + pip list
:: Package           Version
:: ----------------- -------
:: autocommand       2.2.2
:: inflect           7.5.0
:: jaraco.context    6.0.1
:: jaraco.functools  4.1.0
:: jaraco.text       4.0.0
:: more-itertools    10.8.0
:: packaging         26.0
:: pip               25.1.1
:: setuptools        78.1.1
:: typeguard         4.4.4
:: typing_extensions 4.15.0
:: wheel             0.46.3
:: zipp              3.23.0
:: + craftctl default
Skipping pull for test (already ran)
Skipping build for test (already ran)
Staging test (required to build 'python-runtime')
Building python-runtime
Skipping pull for python-runtime (already ran)
Skipping build for python-runtime (already ran)
Staging python-runtime (required to build 'test2')
Building test2
:: + python3 -V
:: Python 3.14.4
:: + pip list
:: Package           Version
:: ----------------- -------
:: autocommand       2.2.2
:: inflect           7.5.0
:: jaraco.context    6.0.1
:: jaraco.functools  4.1.0
:: jaraco.text       4.0.0
:: more-itertools    10.8.0
:: packaging         26.0
:: pip               25.1.1
:: setuptools        78.1.1
:: typeguard         4.4.4
:: typing_extensions 4.15.0
:: wheel             0.46.3
:: zipp              3.23.0
:: + craftctl default
Skipping pull for test2 (already ran)
Skipping build for test2 (already ran)
Staging test2 (required to build 'bazarr')
Building bazarr
:: ++ curl -sL https://api.github.com/repos/morpheus65535/bazarr/releases/latest
:: ++ sed -nre 's/^.*\/download\/v([^\/]*)\/.*/\1/p'
:: + src_version=1.5.6
:: + echo 'Source last tag: 1.5.6'
:: Source last tag: 1.5.6
:: ++ curl -sL -H 'Snap-Device-Series: 16' 'https://api.snapcraft.io/v2/snaps/info/bazarr-tak?architecture=amd64&fields=version'
:: ++ sed -nre 's/^.*"stable"\,"track"\:"latest"\}\,"version"\:"([^"]*)".*/\1/p'
:: + snap_last_version=1.5.6
:: + echo 'Snap last version: 1.5.6'
:: Snap last version: 1.5.6
:: ++ echo 1.5.6
:: ++ sed -nre 's/^(1.5.6.*).*/\1/p'
:: + snap_build_with_same_version=1.5.6
:: + '[' -z 1.5.6 ']'
:: ++ echo 1.5.6
:: ++ sed -nre 's/^.*-v([0-9]*).*/\1/p'
:: + snap_build=
:: + '[' -z '' ']'
:: + new_snap_build=2
:: + new_snap_version=1.5.6-v2
:: + craftctl set version=1.5.6-v2
:: + INST_DIR=/root/parts/bazarr/install/Bazarr
:: + mkdir -p /root/parts/bazarr/install/Bazarr
:: + cp -a ./LICENSE ./README.md ./VERSION ./bazarr ./bazarr.py ./custom_libs ./frontend ./icon.png ./libs ./migrations ./postgres-requirements.txt ./requirements.txt ./snap ./srcfile /root/parts/bazarr/install/Bazarr
:: + craftctl default
:: + python3.13 -m venv /root/parts/bazarr/install
:: + PARTS_PYTHON_VENV_INTERP_PATH=/root/parts/bazarr/install/bin/python3.13
:: + /root/parts/bazarr/install/bin/pip install -U pip setuptools wheel
:: Requirement already satisfied: pip in /root/parts/bazarr/install/lib/python3.13/site-packages (26.0.1)
:: Collecting pip
::   Downloading pip-26.1.1-py3-none-any.whl.metadata (4.6 kB)
:: Collecting setuptools
::   Downloading setuptools-82.0.1-py3-none-any.whl.metadata (6.5 kB)
:: Collecting wheel
::   Downloading wheel-0.47.0-py3-none-any.whl.metadata (2.3 kB)
:: Collecting packaging>=24.0 (from wheel)
::   Downloading packaging-26.2-py3-none-any.whl.metadata (3.5 kB)
:: Downloading pip-26.1.1-py3-none-any.whl (1.8 MB)
::    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 7.9 MB/s  0:00:00
:: Downloading setuptools-82.0.1-py3-none-any.whl (1.0 MB)
::    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.0/1.0 MB 5.7 MB/s  0:00:00
:: Downloading wheel-0.47.0-py3-none-any.whl (32 kB)
:: Downloading packaging-26.2-py3-none-any.whl (100 kB)
:: Installing collected packages: setuptools, pip, packaging, wheel
::   Attempting uninstall: pip
::     Found existing installation: pip 26.0.1
::     Uninstalling pip-26.0.1:
::       Successfully uninstalled pip-26.0.1
::
:: Successfully installed packaging-26.2 pip-26.1.1 setuptools-82.0.1 wheel-0.47.0
:: + /root/parts/bazarr/install/bin/pip install -U -r requirements.txt
:: Ignoring pywin32: markers 'platform_system == "Windows"' don't match your environment
:: Requirement already satisfied: setuptools in /root/parts/bazarr/install/lib/python3.13/site-packages (from -r requirements.txt (line 1)) (82.0.1)
:: Collecting lxml>=4.3.0 (from -r requirements.txt (line 2))
::   Downloading lxml-6.1.0-cp313-cp313-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl.metadata (4.0 kB)
:: Collecting numpy<2.4.0,>=1.12.0 (from -r requirements.txt (line 3))
::   Downloading numpy-2.3.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (62 kB)
:: Collecting webrtcvad-wheels>=2.0.10 (from -r requirements.txt (line 4))
::   Downloading webrtcvad_wheels-2.0.14-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (5.5 kB)
:: Collecting Pillow>=9.0.0 (from -r requirements.txt (line 5))
::   Downloading pillow-12.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (8.8 kB)
:: Downloading numpy-2.3.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (16.6 MB)
::    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.6/16.6 MB 9.0 MB/s  0:00:01
:: Downloading lxml-6.1.0-cp313-cp313-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl (5.2 MB)
::    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.2/5.2 MB 9.0 MB/s  0:00:00
:: Downloading webrtcvad_wheels-2.0.14-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (82 kB)
:: Downloading pillow-12.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (7.1 MB)
::    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.1/7.1 MB 7.1 MB/s  0:00:00
:: Installing collected packages: webrtcvad-wheels, Pillow, numpy, lxml
::
:: Successfully installed Pillow-12.2.0 lxml-6.1.0 numpy-2.3.5 webrtcvad-wheels-2.0.14
:: + '[' -f setup.py ']'
:: + '[' -f pyproject.toml ']'
:: + find /root/parts/bazarr/install -type f -executable -print0
:: + xargs --no-run-if-empty -0 sed -i '1 s|^#\!/root/parts/bazarr/install/bin/python3.13.*$|#!/usr/bin/env python3.13|'
:: ++ set +o
:: ++ grep errexit
:: + opts_state='set +o errexit'
:: + set +e
:: + install_dir=/root/parts/bazarr/install/usr/bin
:: + stage_dir=/root/stage/usr/bin
:: +++ readlink -f /root/parts/bazarr/install/bin/python3.13
:: ++ basename /root/stage/usr/bin/python3.13
:: + basename=python3.13
:: + echo Looking for a Python interpreter called '"python3.13"' in the payload...
:: Looking for a Python interpreter called "python3.13" in the payload...
:: ++ find /root/parts/bazarr/install/usr/bin /root/stage/usr/bin -type f -executable -name python3.13 -print -quit
:: ++ true
:: + payload_python=/root/stage/usr/bin/python3.13
:: + '[' -n /root/stage/usr/bin/python3.13 ']'
:: + echo Found interpreter in payload: '"/root/stage/usr/bin/python3.13"'
:: + installed_python=/root/stage/usr/bin/python3.13
:: + '[' /root/stage/usr/bin/python3.13 = /root/stage/usr/bin/python3.13 ']'
:: + symlink_target=../usr/bin/python3.13
:: + '[' -z ../usr/bin/python3.13 ']'
:: + eval 'set +o errexit'
:: ++ set +o errexit
:: + ln -sf ../usr/bin/python3.13 /root/parts/bazarr/install/bin/python3.13
:: Found interpreter in payload: "/root/stage/usr/bin/python3.13"
Skipping pull for bazarr (already ran)
Skipping build for bazarr (already ran)
Staging bazarr (required to build 'test3')
Building test3
:: + python3 -V
:: Python 3.13.13
:: + pip list
:: Traceback (most recent call last):
::   File "/root/stage/bin/pip", line 3, in <module>
::     from pip._internal.cli.main import main
:: ModuleNotFoundError: No module named 'pip'
'override-build' in part 'test3' failed with code 1.
Detailed information:
:: + python3 -V
:: + pip list
:: Traceback (most recent call last):
::   File "/root/stage/bin/pip", line 3, in <module>
::     from pip._internal.cli.main import main
:: ModuleNotFoundError: No module named 'pip'
Recommended resolution: Review the scriptlet and make sure it's correct.

Info:

I edited my previous post ; with python3.13 it builds but does NOT run (no modules loaded even not pip)

I noticed @lengau published Install python-runtime-core24-312 on Linux | Snap Store

I think it would be awesome if there would be python snaps where we could β€˜depend’ on; my company is using multiple different python based snaps and we’d prefer not to balloon every one snap with their own python.

Is someone (maybe at canonical, such as @lengau, who obviously experimented with it) picking this up? Otherwise I guess we ourselves would at least privately publish python 3.10, 3.12 and 3.14. If there’s more interest maybe we can publish all recent pythons across core24 and core26 publicly.

It’s certainly feasible to do (that’s what my experiment was about), but we don’t currently have capacity on the correct teams to pick it up officially. I would be happy to help work on content snaps like this, but it would only be in a personal capacity.

oHi,

I tried with stable Snapcraft 9.0.0 (rev. 18124) and core26 20260531 (rev. 409).

  • venv is still not hermetic with other parts of the snap during build
  • case A: same python libs than snapcraft ones: does NOT build
  • case B: different python libs version than snapcraft ones: does NOT build

Same tests than before:

  • Case A (python 3.14):
Building test3
:: + python3 -V
:: Python 3.14.4
:: + pip list
:: Traceback (most recent call last):
::   File "/root/stage/bin/pip", line 5, in <module>
::     from pip._internal.cli.main import main
:: ModuleNotFoundError: No module named 'pip'
  • Case B (python 3.13):
Building test3
:: + python3 -V
:: Python 3.13.14
:: + pip list
:: Traceback (most recent call last):
::   File "/root/stage/bin/pip", line 3, in <module>
::     from pip._internal.cli.main import main
:: ModuleNotFoundError: No module named 'pip'

Thanks.

Edit:

When snap is built with case A (= no test3 performed), python modules are not loaded when running the snap.

Description:

Here is a proof-of-concept – not a reference, and there must be proper way to do it – on how to have a working python plugin.

Problems:

  • 1/ For now, the python plugin messes with python environment provided with snapcraft.
  • 2/ With core26 and snapcraft 9, the plugin doesn’t pack the snap properly anymore and modules are not loaded both for python runtime using same version than the one used by snapcraft (was working somehow before) and for runtime using a different version (was not working before).

Postulates:

  • For the build of a snap, Snapcraft, some of its plugins and extensions, require the python runtime and environment they come provided with ; thus, a virtual environment (a.k.a. venv) seems to be required not to mess with it for the python plugin
  • A venv is currently declared but never activated or used
  • My guess is that a snap can come with only 1 python runtime and 1 environment. If it’s not the case it would greatly complicate the task: is it possible to run several apps/daemons with different runtime within a snap? may need to copy and adapt the venv locally to avoid readonly? may need to know which runtime&venv to use with each app/daemon? …

What it is not:

This post does NOT treat about:

  • How to package this for a smooth user experience ; possible with a plugin only ? requires an extension ?..
  • What source should provide python runtime(s) not available in default repositories ? and how to specify it ?
  • How to manage conflicts in module dependencies for different parts using the python plugin
  • How to make manual change properly in the venv for custom override-build ; requires activation/deactivation ; not sure it can be transparent to the user to avoid problems

Proof of concept:

  • snapcraft.yaml
name: test-python
title: test-python
summary: summary
description: description
website: https://example.com
source-code: https://example.com
issues: https://example.com
contact: mailto:me@example.com
license: MIT
grade: stable
confinement: strict
base: core26
adopt-info: test-python
platforms:
  amd64:
  arm64:
  armhf:
  
# Add deadsnakes ppa to have access to Python 3.13 for this proof-of-concept
package-repositories:
  - type: apt
    ppa: deadsnakes/ppa

apps:
  test-python:
    command: bin/run-test-python.sh
    daemon: simple
    restart-condition: always
    environment:
      PATH: $SNAP/venv/bin/:$PATH # Required as I choose not to move venv/bin to $SNAP/bin as it is done now
      PYTHONPATH: $SNAP/venv/lib/python3.13/site-packages:$PYTHONPATH # Required as using python runtime with venv modules

parts:

  # Get python used by snapcraft info
  test:
    plugin: nil
    override-build: |
      python3 -V
      pip list
      craftctl default
      
  # Prepare python used by the snap app/daemon
  python-runtime:
    after:
      - test
    plugin: nil
    override-build: |
      craftctl default
      
      # TODO: define global: PARTS_PYTHON_INTERPRETER=python3.13 (but keep default snapcraft python)
      # TODO: define global: PARTS_PYTHON_VENV=$CRAFT_PRIME/venv
      
      # Create a unique venv (in case of several parts using the python plugin)
      rm -rf $CRAFT_PRIME/venv
      mkdir -p $CRAFT_PRIME/venv
    stage-packages:
      - python3.13-venv # Required to have python + venv + libs
      
  # Check python used by snapcraft has not been altered
  test2:
    after:
      - python-runtime
    plugin: nil
    override-build: |
      python3 -V
      pip list
      craftctl default
      
  # The app/daemon using python plugin
  test-python:
    after:
      - test2
    plugin: nil #python
    #python-requirements:
    #  - requirements.txt
    source: .
    override-pull: |
      # Pull
      rm -rf $CRAFT_PART_SRC/{,.[!.],..?}*
      download_url=$(curl -sL https://api.github.com/repos/morpheus65535/bazarr/releases/latest | sed -nre "s/^.*\"browser_download_url\": \"([^\"]*)\".*/\1/p")
      wget "${download_url}" -O srcfile
      unzip srcfile
      
      craftctl default
    #build-environment:
    #  - PARTS_PYTHON_INTERPRETER: python3.13 # Should be define once in python-runtime
    override-build: |
      craftctl set version="1.0"

      # Build
      INST_DIR="$CRAFT_PART_INSTALL/Bazarr"
      mkdir -p "$INST_DIR"
      cp -a ./* $INST_DIR
      
      #craftctl default
      PARTS_PYTHON_INTERPRETER=python3.13 #TODO: Remove ; defined in python-runtime ; used for working example
      PARTS_PYTHON_VENV=$CRAFT_PRIME/venv #TODO: Remove ; defined in python-runtime ; used for working example
      
      # Create venv and activate it
      $PARTS_PYTHON_INTERPRETER -m venv $PARTS_PYTHON_VENV
      source $PARTS_PYTHON_VENV/bin/activate
      
      # Install projects requirements
      #pip install -U pip setuptools wheel # from original plugin ; required ?
      pip install -U -r requirements.txt
      # TODO: manage 'setup.py'
      # TODO: manage 'pyproject.toml'
      
      # Quit venv to return to default python used by snapcraft
      deactivate
    build-packages:
      - curl
      - wget
      - unzip
      
  # Check python used by snapcraft has not been altered
  test3:
    after:
      - test-python
    plugin: nil
    override-build: |
      python3 -V
      pip list
      craftctl default
      
  # Prepare the snap to use the snap python runtime -> needs to be the last action
  post-python:
    after:
      - test3
    plugin: nil
    override-prime: |
      # rm unused files -> we use venv content without activating it
      rm -f $CRAFT_PRIME/venv/pyvenv.cfg #content is wrong anyway
      rm -f $CRAFT_PRIME/venv/bin/activate* #content is wrong anyway
      rm -f $CRAFT_PRIME/venv/bin/Activate* #content is wrong anyway
      
      # Fix shebang interpreter for all python files created (especially pip)
      # requires absolute path ; here "venv/bin/python3.13" -> Works only for scripts commands running from $SNAP folder # other way possible ??
      for file in $CRAFT_PRIME/venv/bin/*; do
        sed -i 's/\/root\/prime\///g' $file # Make proper regex and avoid python/3/3.x files + directories
      done
      
      # Target snap python3 runtime (instead of default binaries)
      rm -f $CRAFT_PRIME/venv/bin/python*
      ln -sf ../../usr/bin/python3.13 $CRAFT_PRIME/venv/bin/python3.13
      ln -sf ./python3.13 $CRAFT_PRIME/venv/bin/python3
      ln -sf ./python3 $CRAFT_PRIME/venv/bin/python

  local:
    plugin: dump
    source: snap/local
    override-prime: |
      craftctl default
      chmod +rx $CRAFT_PRIME/bin/run-test-python.sh
    
  • local/bin/run-test-python.sh
#!/bin/bash -e

cd $SNAP # required for shebang of python scripts
python3 -V
pip list

Output:

  • Build
Starting snapcraft, version 9.0.0
Logging execution to '/tmp/snapcraft.log'
Refreshing repositories
Package repositories installed
Initializing lifecycle
Installing build-packages
Installing build-snaps
Pulling local
Pulling test
Pulling python-runtime
Fetching stage-packages
Downloading package: python3.13
Downloading package: libpython3.13-stdlib
Downloading package: python3.13-venv
Extracting stage package: python3.13
Extracting stage package: libpython3.13-stdlib
Extracting stage package: python3.13-venv

[...]

Building local
:: + cp --archive --link --no-dereference . /root/parts/local/install
Building test
:: + python3 -V
:: Python 3.14.4
:: + pip list
:: Package           Version
:: ----------------- -------
:: autocommand       2.2.2
:: inflect           7.5.0
:: jaraco.context    6.0.1
:: jaraco.functools  4.1.0
:: jaraco.text       4.0.0
:: more-itertools    10.8.0
:: packaging         26.0
:: pip               25.1.1
:: setuptools        78.1.1
:: typeguard         4.4.4
:: typing_extensions 4.15.0
:: wheel             0.46.3
:: zipp              3.23.0
:: + craftctl default
Skipping pull for test (already ran)
Skipping build for test (already ran)
Staging test (required to build 'python-runtime')
Building python-runtime
:: + craftctl default
:: + rm -rf /root/prime/venv
:: + mkdir -p /root/prime/venv
Skipping pull for python-runtime (already ran)
Skipping build for python-runtime (already ran)
Staging python-runtime (required to build 'test2')
Building test2
:: + python3 -V
:: Python 3.14.4
:: + pip list
:: Package           Version
:: ----------------- -------
:: autocommand       2.2.2
:: inflect           7.5.0
:: jaraco.context    6.0.1
:: jaraco.functools  4.1.0
:: jaraco.text       4.0.0
:: more-itertools    10.8.0
:: packaging         26.0
:: pip               25.1.1
:: setuptools        78.1.1
:: typeguard         4.4.4
:: typing_extensions 4.15.0
:: wheel             0.46.3
:: zipp              3.23.0
:: + craftctl default
Skipping pull for test2 (already ran)
Skipping build for test2 (already ran)
Staging test2 (required to build 'test-python')
Building test-python
:: + craftctl set version=1.0
:: + INST_DIR=/root/parts/test-python/install/Bazarr
:: + mkdir -p /root/parts/test-python/install/Bazarr
:: + cp -a ./LICENSE ./README.md ./VERSION ./bazarr ./bazarr.py ./custom_libs ./frontend ./icon.png ./libs ./migrations ./postgres-requirements.txt ./requirements.txt ./snap ./srcfile /root/parts/test-python/install/Bazarr
:: + PARTS_PYTHON_INTERPRETER=python3.13
:: + PARTS_PYTHON_VENV=/root/prime/venv
:: + python3.13 -m venv /root/prime/venv
:: + source /root/prime/venv/bin/activate
:: ++ deactivate nondestructive
:: ++ '[' -n '' ']'
:: ++ '[' -n '' ']'
:: ++ hash -r
:: ++ '[' -n '' ']'
:: ++ unset VIRTUAL_ENV
:: ++ unset VIRTUAL_ENV_PROMPT
:: ++ '[' '!' nondestructive = nondestructive ']'
:: ++ case "$(uname)" in
:: +++ uname
:: ++ export VIRTUAL_ENV=/root/prime/venv
:: ++ VIRTUAL_ENV=/root/prime/venv
:: ++ _OLD_VIRTUAL_PATH=/root/stage/usr/bin:/snap/snapcraft/18124/libexec/snapcraft:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
:: ++ PATH=/root/prime/venv/bin:/root/stage/usr/bin:/snap/snapcraft/18124/libexec/snapcraft:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
:: ++ export PATH
:: ++ VIRTUAL_ENV_PROMPT=venv
:: ++ export VIRTUAL_ENV_PROMPT
:: ++ '[' -n '' ']'
:: ++ '[' -z '' ']'
:: ++ _OLD_VIRTUAL_PS1=
:: ++ PS1='(venv) '
:: ++ export PS1
:: ++ hash -r
:: + pip install -U -r requirements.txt
:: Ignoring pywin32: markers 'platform_system == "Windows"' don't match your environment
:: Collecting setuptools (from -r requirements.txt (line 1))
::   Downloading setuptools-82.0.1-py3-none-any.whl.metadata (6.5 kB)
:: Collecting lxml>=4.3.0 (from -r requirements.txt (line 2))
::   Downloading lxml-6.1.1-cp313-cp313-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl.metadata (3.5 kB)
:: Collecting numpy<2.4.0,>=1.12.0 (from -r requirements.txt (line 3))
::   Downloading numpy-2.3.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (62 kB)
:: Collecting webrtcvad-wheels>=2.0.10 (from -r requirements.txt (line 4))
::   Downloading webrtcvad_wheels-2.0.14-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (5.5 kB)
:: Collecting Pillow>=9.0.0 (from -r requirements.txt (line 5))
::   Downloading pillow-12.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (8.8 kB)
:: Downloading numpy-2.3.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (16.6 MB)
::    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.6/16.6 MB 4.9 MB/s  0:00:03
:: Downloading setuptools-82.0.1-py3-none-any.whl (1.0 MB)
::    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.0/1.0 MB 4.4 MB/s  0:00:00
:: Downloading lxml-6.1.1-cp313-cp313-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl (5.2 MB)
::    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.2/5.2 MB 4.5 MB/s  0:00:01
:: Downloading webrtcvad_wheels-2.0.14-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (82 kB)
:: Downloading pillow-12.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (7.1 MB)
::    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.1/7.1 MB 4.6 MB/s  0:00:01
:: Installing collected packages: webrtcvad-wheels, setuptools, Pillow, numpy, lxml
::
:: Successfully installed Pillow-12.2.0 lxml-6.1.1 numpy-2.3.5 setuptools-82.0.1 webrtcvad-wheels-2.0.14
:: + deactivate
:: + '[' -n /root/stage/usr/bin:/snap/snapcraft/18124/libexec/snapcraft:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin ']'
:: + PATH=/root/stage/usr/bin:/snap/snapcraft/18124/libexec/snapcraft:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
:: + export PATH
:: + unset _OLD_VIRTUAL_PATH
:: + '[' -n '' ']'
:: + hash -r
:: + '[' -n '' ']'
:: + unset VIRTUAL_ENV
:: + unset VIRTUAL_ENV_PROMPT
:: + '[' '!' '' = nondestructive ']'
:: + unset -f deactivate
Skipping pull for test-python (already ran)
Skipping build for test-python (already ran)
Staging test-python (required to build 'test3')
Building test3
:: + python3 -V
:: Python 3.14.4
:: + pip list
:: Package           Version
:: ----------------- -------
:: autocommand       2.2.2
:: inflect           7.5.0
:: jaraco.context    6.0.1
:: jaraco.functools  4.1.0
:: jaraco.text       4.0.0
:: more-itertools    10.8.0
:: packaging         26.0
:: pip               25.1.1
:: setuptools        78.1.1
:: typeguard         4.4.4
:: typing_extensions 4.15.0
:: wheel             0.46.3
:: zipp              3.23.0
:: + craftctl default
Skipping pull for test3 (already ran)
Skipping build for test3 (already ran)
Staging test3 (required to build 'post-python')
Building post-python
Staging local
Skipping stage for test (already ran)
Skipping stage for python-runtime (already ran)
Skipping stage for test2 (already ran)
Skipping stage for test-python (already ran)
Skipping stage for test3 (already ran)
Staging post-python
Priming local
:: + craftctl default
:: + chmod +rx /root/prime/bin/run-test-python.sh
Priming test
Priming python-runtime
Priming test2
Priming test-python
Priming test3
Priming post-python
:: + rm -f /root/prime/venv/pyvenv.cfg
:: + rm -f /root/prime/venv/bin/activate /root/prime/venv/bin/activate.csh /root/prime/venv/bin/activate.fish
:: + rm -f /root/prime/venv/bin/Activate.ps1
:: + for file in /root/prime/venv/bin/*
:: + sed -i 's/\/root\/prime\///g' /root/prime/venv/bin/f2py
:: + for file in /root/prime/venv/bin/*
:: + sed -i 's/\/root\/prime\///g' /root/prime/venv/bin/numpy-config
:: + for file in /root/prime/venv/bin/*
:: + sed -i 's/\/root\/prime\///g' /root/prime/venv/bin/pip
:: + for file in /root/prime/venv/bin/*
:: + sed -i 's/\/root\/prime\///g' /root/prime/venv/bin/pip3
:: + for file in /root/prime/venv/bin/*
:: + sed -i 's/\/root\/prime\///g' /root/prime/venv/bin/pip3.13
:: + for file in /root/prime/venv/bin/*
:: + sed -i 's/\/root\/prime\///g' /root/prime/venv/bin/python
:: + for file in /root/prime/venv/bin/*
:: + sed -i 's/\/root\/prime\///g' /root/prime/venv/bin/python3
:: + for file in /root/prime/venv/bin/*
:: + sed -i 's/\/root\/prime\///g' /root/prime/venv/bin/python3.13
:: + rm -f /root/prime/venv/bin/python /root/prime/venv/bin/python3 /root/prime/venv/bin/python3.13
:: + ln -sf ../../usr/bin/python3.13 /root/prime/venv/bin/python3.13
:: + ln -sf ./python3.13 /root/prime/venv/bin/python3
:: + ln -sf ./python3 /root/prime/venv/bin/python
Packing...
Reading snap metadata...
Running linters...
Running linter: classic
Running linter: gpu
Running linter: library
Running linter: metadata
Creating snap package...
Packed test-python_1.0_amd64.snap
  • Run
Started snap.test-python.test-python.service - Service for snap application test-python.test-python.
test-python.test-python[10809]: Python 3.13.14
test-python.test-python[10811]: Package          Version
test-python.test-python[10811]: ---------------- -------
test-python.test-python[10811]: lxml             6.1.1
test-python.test-python[10811]: numpy            2.3.5
test-python.test-python[10811]: pillow           12.2.0
test-python.test-python[10811]: pip              26.1.2
test-python.test-python[10811]: setuptools       82.0.1
test-python.test-python[10811]: webrtcvad-wheels 2.0.14

Thanks <3