Hello everyone !
So I am trying to build a snap for a project that contains multiple python projects, and fail to do so. The real use case can be found here: https://github.com/basak/certbot-snap-build. But I will simplify the case here to focus on the specific problem encountered.
Let’s suppose that I have a GIT repository, with two python project in it:
project2. Each project is properly configured with setuptools, and so each of them has a
project2 depends on
project1. The two projects are on version
0.1.dev0 on the GIT
master branch and are not released on PyPi. Since
project2 requires new features added on
project1 during development, its
setup.py declares a dependency as follow:
If I want to setup a virtual environment with
project1, I can run
pip install -e project1 -e project2, and everything will work correctly since pip will see successfully that
project1 on version
0.1.dev0 is installed locally when it tries to install
However, I failed at building a snap in this configuration. A typical
snapcraft.yml for this situation would leverage the python plugin into several parts like so:
In this case, snapcraft cannot build the snap. More precisely, the
pull step on
project2 fails with the typical following error:
ERROR: Could not find a version that satisfies the requirement project1>=0.1.dev0
It appears that snapcraft fails at seeing that
project1 has been built and installed during the first part. So during the second part pip tries to retrieve
project1 from PyPi on version
0.1.dev0, but this version has not been released.
Do you have some ideas to fix this situation, and allow the
project2 part to reuse the modules from
project1 part ?