borg
borg copied to clipboard
pip: has inconsistent version: expected '1.2.3', but metadata has '0.0.0'
I have been hitting this problem for a while. The way borg is installed is generated via flatpak-builder-tools
The message is
borgbackup-1.2.3.tar.gz has inconsistent version: expected '1.2.3', but metadata has '0.0.0'
And I ran into it today again
https://buildbot.flathub.org/#/builders/37/builds/2462
The workaround is to use --use-deprecated=legacy-resolver
but that doesn't sound quite right.
The build command is
pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"borgbackup\" --no-build-isolation
that .tar.gz is the download from pypi.org?
did you try older/newer pip
in case they have a bug in their resolver?
/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py:265: UserWarning: Unknown distribution option: 'use_scm_version'
Hmm, the pyproject.toml says borg requires setuptools_scm, but here it complains about the config dict for that.
It is https://files.pythonhosted.org/packages/e6/a5/69a9ddce8ae769e1bf4d1f1e93459238f473bad770d4dddba108db91971c/borgbackup-1.2.3.tar.gz
I don't think it's a bug in the resolver if the metadata contains '0.0.0'. The expected '1.2.3' comes from the filename afaik
Edit: The manifest is here https://github.com/flathub/org.gnome.World.PikaBackup/blob/beta/python3-borgbackup.json
Something unrelated i noticed: it says "using bundled xxhash". So you do not have libxxhash-dev installed there?
Something unrelated i noticed: it says "using bundled xxhash". So you do not have libxxhash-dev installed there?
You can't really install packages in Flatpak, instead you usually build things. Is the bundled version bad?
xxhash: No, I just noticed it discovered all from libs via pkg-config, just not that.
I had a look into the .tar.gz: PKG-INFO
says 1.2.3 and also borg/_version.py
says 1.2.3.
Maybe pip or setuptools_scm malfunctioning somehow?
Unfortunately python packaging is just weird magic to me
@sophie-h I think this is happening because you use this option --no-build-isolation
, in which case you have to install all build dependencies manually. In this case, you are missing setuptools-scm
which is used for borg versioning. Try pip install setuptools-scm
https://github.com/borgbackup/borg/issues/7302#issuecomment-1407755293 I also have seen this while tweaking setup in borg 1.4-maint branch, but then resolved it after I moved most stuff to pyproject.tom
and using only pip install
and python -m build
.
Guess it is worth retrying this with 1.4-maint (or some 1.4 alpha/beta release soon).
Someone explained to me that I manually need to installl setuptools-scm
because whatever is provided in the Flatpak Sdk is not enough to resolve the version properly. Sorry for the fuzz. For people working with python that's probably obvious.
In this case, you are missing setuptools-scm which is used for borg versioning. Try pip install setuptools-scm
Ah, also here, thanks!