It is not possible to build a python snap that has setup.py requirements
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
Triaged
|
High
|
Unassigned |
Bug Description
There are some python projects that have dependencies on their setup.py This is probably a bad practice but we can see it in offlineimap [1] and rasterio [2], so we should probably have to support it in a nice way.
If the snapcraft.yaml is not on the same repository as the setup.py, we have a way to make it work like popey did in [3].
However, if we want the snapcraft.yaml in the same repo, the separate part for the setup dependencies will not work. The python plugin will see the setup.py and try to install it, even in the separate part.
This is because the default source is `.`. Maybe, we should support a `source: nil`, that is useful only to install stuff in stage, that's required for other parts, but doesn't assume that it has a source directory.
I made a dirty workaround, using `source: snap`, which will find only the snapcraft.yaml in the dir so it will not try to install the setup.py.
[1] https:/
[2] https:/
[3] https:/
Changed in snapcraft: | |
status: | New → Confirmed |
Here is my workaround for rasterio: /github. com/elopio/ rasterio/ blob/4bf0bf1409 97ad83e44e3c14e 1bea3e32ab27aa3 /snap/snapcraft .yaml#L27
https:/