Setuptools-scm unable to detect version

From: Alexis Praga <>
Date: Wed, 01 Feb 2023 21:34:06 UTC

My second question of the evening is for textproc/py-sphinext-opengrap.
Updating to the latest version fails to build (even outside poudriere) with


Traceback (most recent call last):
File "<string>", line 1, in <module>
File "", line 6, in <module>
File "/usr/local/lib/python3.9/site-packages/setuptools/", line 87, in setup
return distutils.core.setup(**attrs)
File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/", line 139, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/lib/python3.9/site-packages/setuptools/", line 476, in __init__
File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/", line 275, in __init__
File "/usr/local/lib/python3.9/site-packages/setuptools/", line 900, in finalize_options
File "/usr/local/lib/python3.9/site-packages/setuptools/", line 920, in _finalize_setup_keywords
ep.load()(self,, value)
File "/usr/local/lib/python3.9/site-packages/setuptools_scm/", line 75, in version_keyword
_assign_version(dist, config)
File "/usr/local/lib/python3.9/site-packages/setuptools_scm/", line 51, in _assign_version
File "/usr/local/lib/python3.9/site-packages/setuptools_scm/", line 106, in _version_missing
raise LookupError(

LookupError: setuptools-scm was unable to detect version for /usr/ports/textproc/py-sphinxext-opengraph/work-py39/sphinxext-opengraph-0.7.5.

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.

It looks like a git repository should be used but there was not trouble for previous version.

Any idea would be much welcome !