question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[regression in 2.14.0] setuptools-scm was unable to detect version for '/wrkdirs/usr/ports/textproc/yq/work/yq-2.14.0'.

See original GitHub issue

The FreeBSD package build fails:

===>  Configuring for yq-2.14.0
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "setup.py", line 5, in <module>
    setup(
  File "/usr/local/lib/python3.8/site-packages/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/usr/local/lib/python3.8/distutils/core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "/usr/local/lib/python3.8/site-packages/setuptools/dist.py", line 455, in __init__
    _Distribution.__init__(self, {
  File "/usr/local/lib/python3.8/distutils/dist.py", line 292, in __init__
    self.finalize_options()
  File "/usr/local/lib/python3.8/site-packages/setuptools/dist.py", line 801, in finalize_options
    ep(self)
  File "/usr/local/lib/python3.8/site-packages/setuptools/dist.py", line 808, in _finalize_setup_keywords
    ep.load()(self, ep.name, value)
  File "/usr/local/lib/python3.8/site-packages/setuptools_scm/integration.py", line 65, in version_keyword
    dist.metadata.version = _get_version(config)
  File "/usr/local/lib/python3.8/site-packages/setuptools_scm/__init__.py", line 177, in _get_version
    parsed_version = _do_parse(config)
  File "/usr/local/lib/python3.8/site-packages/setuptools_scm/__init__.py", line 135, in _do_parse
    raise LookupError(
LookupError: setuptools-scm was unable to detect version for '/wrkdirs/usr/ports/textproc/yq/work/yq-2.14.0'.

It builds from the tarball downloaded from GitHub.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
kislyukcommented, Feb 22, 2022

OK, I was able to reproduce the issue. It looks like you originally tried to pull the tag’s tarball from github. Note that the line immediately following your pasted snippet gives the explanation for the error:

  LookupError: setuptools-scm was unable to detect version for /private/var/folders/mg/s14fqnk1089g4jggcbyz2xnr0000gp/T/pip-req-build-nsqjbwin.

  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’s unfortunate that with setuptools-scm raw tarballs from github don’t work, perhaps there is a way to hide them from the release. But setuptools-scm is the best way for maintainers to manage release versions so this will be a common issue.

0reactions
yurivictcommented, Feb 21, 2022

Strangely, it builds with the tarball from PyPI.

So closing.

Thanks for your help!

Read more comments on GitHub >

github_iconTop Results From Across the Web

setuptools-scm was unable to detect version for '/tmp' · Issue ...
I'm using the following namespace-package structure (the namespace is in this example nametest): root ├── name-common │ ├── nametest ...
Read more >
LookupError: setuptools-scm was unable to detect version ...
I'm trying to install setup.py (from the website: https://github.com/richpsharp/ipbes-analysis/tree/1.1.0/ipbes-ndr) in the python virtual ...
Read more >
setuptools-scm - PyPI
If the normal methods for detecting the version (SCM version, sdist metadata) fail, and the parent directory name starts with parentdir_prefix_version, then ...
Read more >
Frequently Asked Questions - PyScaffold
setuptools-scm was unable to detect version for 'your/project'. This means that setuptools-scm could not find an intact git repository. If you still want...
Read more >
[#IMPALA-5190] Python xdist installation fails with "LookupError
Python xdist installation fails with "LookupError: setuptools-scm was unable to detect version". Status: Assignee: Priority: Resolution: Resolved.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found