I’m trying to build a snap with Electron and a Python server running in the background. When building the Python code via Python plugin I’m facing below error.
+ snapcraftctl build
+ python3 -m venv /root/parts/server/install
+ SNAPCRAFT_PYTHON_VENV_INTERP_PATH=/root/parts/server/install/bin/python3
+ pip install -U pip setuptools wheel
Collecting pip
Using cached pip-21.3.1-py3-none-any.whl (1.7 MB)
Collecting setuptools
Using cached setuptools-58.3.0-py3-none-any.whl (946 kB)
Collecting wheel
Using cached wheel-0.37.0-py2.py3-none-any.whl (35 kB)
Installing collected packages: pip, setuptools, wheel
Attempting uninstall: pip
Found existing installation: pip 20.0.2
Uninstalling pip-20.0.2:
ERROR: Could not install packages due to an EnvironmentError: [Errno 30] Read-only file system: '__init__.py'
Failed to build 'server'.
Recommended resolution:
Check the build logs and ensure the part's configuration and sources are correct.
After some trial and error I’ve found that the root cause is this section of my snapcraft.yaml file.
extensions:
- gnome-3-38
When I comment it out, my snap builds fine but so far I haven’t managed to find a solution to the problem and the error message didn’t help a lot.
I’ve built a minimal reproduction here -> https://github.com/nemwiz/snapcraft-python-gnome-issue