setuptools_scm: unable to detect version
Did something that was fixed already break again for this?
I have a debian buster vagrant machine that throws the “unable to detect version” now and it used to always work.
tox # works
fakeroot -u tox # fails with "unable to detect version"
A debian bullseye vagrant machine with a very similar setup works.
https://github.com/borgbackup/borg/pull/7224 this is the code I used (see Vagrantfile).
BTW: on misc. ubuntu dists this is broken since a longer while.
Traceback from the buster machine:
(borg-env) vagrant@buster:/vagrant/borg/borg$ borg -V
borg 1.2.3
(borg-env) vagrant@buster:/vagrant/borg/borg$ fakeroot -u tox
GLOB sdist-make: /vagrant/borg/borg/setup.py
ERROR: invocation failed (exit code 1), logfile: /vagrant/borg/borg/.tox/log/GLOB-0.log
================================================================================= log start ==================================================================================
Detected OpenSSL [via pkg-config]
Detected and preferring liblz4 [via pkg-config]
Detected and preferring libzstd [via pkg-config]
Using bundled xxhash
Traceback (most recent call last):
File "/vagrant/borg/borg/setup.py", line 263, in <module>
setup(
File "/home/vagrant/.pyenv/versions/3.9.16/envs/borg-env/lib/python3.9/site-packages/setuptools/__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "/home/vagrant/.pyenv/versions/3.9.16/envs/borg-env/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 109, in setup
_setup_distribution = dist = klass(attrs)
File "/home/vagrant/.pyenv/versions/3.9.16/envs/borg-env/lib/python3.9/site-packages/setuptools/dist.py", line 462, in __init__
_Distribution.__init__(
File "/home/vagrant/.pyenv/versions/3.9.16/envs/borg-env/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 293, in __init__
self.finalize_options()
File "/home/vagrant/.pyenv/versions/3.9.16/envs/borg-env/lib/python3.9/site-packages/setuptools/dist.py", line 886, in finalize_options
ep(self)
File "/home/vagrant/.pyenv/versions/3.9.16/envs/borg-env/lib/python3.9/site-packages/setuptools/dist.py", line 907, in _finalize_setup_keywords
ep.load()(self, ep.name, value)
File "/home/vagrant/.pyenv/versions/3.9.16/envs/borg-env/lib/python3.9/site-packages/setuptools_scm/integration.py", line 75, in version_keyword
_assign_version(dist, config)
File "/home/vagrant/.pyenv/versions/3.9.16/envs/borg-env/lib/python3.9/site-packages/setuptools_scm/integration.py", line 51, in _assign_version
_version_missing(config)
File "/home/vagrant/.pyenv/versions/3.9.16/envs/borg-env/lib/python3.9/site-packages/setuptools_scm/__init__.py", line 106, in _version_missing
raise LookupError(
LookupError: setuptools-scm was unable to detect version for /vagrant/borg/borg.
Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.
For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj
================================================================================== log end ===================================================================================
ERROR: FAIL could not package project - v = InvocationError('/home/vagrant/.pyenv/versions/3.9.16/envs/borg-env/bin/python3.9 setup.py sdist --formats=zip --dist-dir .tox/dist', 1)
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (7 by maintainers)
That’s planned, but I’m currently a bit stretched