Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 892353 - dev-python/pikepdf fails to compile with: ValueError: not enough values to unpack (expected 3, got 1)
Summary: dev-python/pikepdf fails to compile with: ValueError: not enough values to un...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Andrey Grozin
URL:
Whiteboard:
Keywords:
Depends on: 892413
Blocks:
  Show dependency tree
 
Reported: 2023-01-28 07:24 UTC by tt_1
Modified: 2023-01-28 20:26 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,5.71 KB, text/x-log)
2023-01-28 07:24 UTC, tt_1
Details
output from emerge --info (emerge-info,8.26 KB, text/plain)
2023-01-28 07:24 UTC, tt_1
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tt_1 2023-01-28 07:24:08 UTC
Created attachment 849333 [details]
build.log

so this package is broken at the moment: 

>>> Compiling source in /var/tmp/portage/dev-python/pikepdf-6.2.6/work/pikepdf-6.2.6 ...
 * python3_10: running distutils-r1_run_phase distutils-r1_python_compile
python3.10 setup.py build_ext -j 12
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/pikepdf-6.2.6/work/pikepdf-6.2.6/setup.py", line 101, in <module>
    setup(
  File "/usr/lib/python3.10/site-packages/setuptools/__init__.py", line 87, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 147, in setup
    _setup_distribution = dist = klass(attrs)
  File "/usr/lib/python3.10/site-packages/setuptools/dist.py", line 475, in __init__
    _Distribution.__init__(
  File "/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 283, in __init__
    self.finalize_options()
  File "/usr/lib/python3.10/site-packages/setuptools/dist.py", line 899, in finalize_options
    ep(self)
  File "/usr/lib/python3.10/site-packages/setuptools_scm/integration.py", line 123, in infer_version
    _assign_version(dist, config)
  File "/usr/lib/python3.10/site-packages/setuptools_scm/integration.py", line 59, in _assign_version
    maybe_version = _get_version(config)
  File "/usr/lib/python3.10/site-packages/setuptools_scm/__init__.py", line 154, in _get_version
    parsed_version = _do_parse(config)
  File "/usr/lib/python3.10/site-packages/setuptools_scm/__init__.py", line 101, in _do_parse
    version = _version_from_entrypoints(config) or _version_from_entrypoints(
  File "/usr/lib/python3.10/site-packages/setuptools_scm/_entrypoints.py", line 66, in _version_from_entrypoints
    version: ScmVersion | None = _call_entrypoint_fn(root, config, ep.load())
  File "/usr/lib/python3.10/site-packages/setuptools_scm/_entrypoints.py", line 40, in _call_entrypoint_fn
    return fn(root, config=config)
  File "/usr/lib/python3.10/site-packages/setuptools_scm/git.py", line 312, in parse_archival
    return archival_to_version(data, config=config)
  File "/usr/lib/python3.10/site-packages/setuptools_scm/git.py", line 286, in archival_to_version
    tag, number, node, _ = _git_parse_describe(archival_describe)
  File "/usr/lib/python3.10/site-packages/setuptools_scm/git.py", line 245, in _git_parse_describe
    tag, number, node = describe_output.rsplit("-", 2)
ValueError: not enough values to unpack (expected 3, got 1)
 * ERROR: dev-python/pikepdf-6.2.6::gentoo failed (compile phase):
 *   (no error message)
Comment 1 tt_1 2023-01-28 07:24:40 UTC
Created attachment 849335 [details]
output from emerge --info
Comment 2 tt_1 2023-01-28 07:25:54 UTC
To fix this, I have to emerge dev-python/setuptools_scm_git_archive to my system. I don't know why this was removed from BDEPEND a week ago, it is still needed at build time.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-28 07:27:51 UTC
I think it might be something else on your system which needs dev-python/setuptools_scm_git_archive, as nothing in pikepdf actually tries to use it as far as I can see.

If you edit /usr/lib/python3.10/site-packages/setuptools_scm/integration.py and put a print(dist_name) under 'config = Configuration.from_file(dist_name=dist_name)', what does the new build.log look like?
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-28 07:28:37 UTC
(In reply to tt_1 from comment #2)
> To fix this, I have to emerge dev-python/setuptools_scm_git_archive to my
> system. I don't know why this was removed from BDEPEND a week ago, it is
> still needed at build time.

It was removed because of https://github.com/pikepdf/pikepdf/commit/cc977d343ce044fe021c545c8d8c6b159d477f6b. pikepdf isn't actually using it - if I'm wrong, please show me where.

I suspect something else on your system is missing the dep and when setuptools initialises, it finds that package, and blows up.
Comment 5 Chris Mayo 2023-01-28 17:10:00 UTC
There was a bug in setuptools_scm-7.0.5.

Fixed in setuptools_scm-7.1.0:
https://github.com/pypa/setuptools_scm/pull/772

Stabilization bug 892413 filed.
Comment 6 tt_1 2023-01-28 20:26:14 UTC
its fixed with setuptools_scm-7.1.0, thank you for the hint and fast stabilization.