Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Building
.snap
packagea few notes for if (when) someone will be digging into this:
Snapcraft (tool for build snap packages) currently does not work on Apple Silicon due to a bug
Snapcraft uses
lxd
for building packages, which currently contains a bug preventing network connections when running in Qemu (ie. UTM).the build can be performed directly on the machine instead of in another layer of virtualization with the following env. variable
SNAPCRAFT_BUILD_ENVIRONMENT=host
apt-get update
for some reason, which does not work under normal user, so the most straightforward way how to avoid this error is to run the build under root (or use sticky bit maybe? idk, I'm running in VM anyway).Snapcraft tries to determine version via
git describe
which looks up only "annotated tags" (which we dont do apparently), so there's added a fallback to determine the version viasetuptools_scm
(python setup.py --version
)current
pyproject.toml
is not fully functional, so I'm moving it out of the way to avoid Snapcraft trying to use it instead ofsetup.py
despite of that there are some changes in
pyproject.toml
I stumbled upon during this task. We'll eventually need these changes anwyay when migrating away fromsetup.py
. These changes are analogy of the following part insetup.py
:there is a bug (feature?) in Snapcraft which does not register
site-packages
inside the.snap
, so it has to be manually appended intoPYTHONPATH
in the build filethere is another bug in Snapcraft which doesnt install
b2.egg-info
and/orb2.dist-info
into the.snap
. I'm not sure about the precise circumstances, but it was happening when I definedstage-packages
in thesnapcraft.yaml
. The snap package is created and can be installed, but when run it ends up with exception (PackageNotFoundError: No package metadata was found for b2
). Didnt dig into it too deep, as the current configuration works.for uploading to B2 it uses the same env. variables / secrets as ci: add debianize build pipeline #176