I don't have PYTHONPATH set or ran pip. Untarred the stagefile, added my packages to the world file, and changed the Python impls as mentioned at the end of this post. Plus a few USE flags for the world set - I can post a full list if that helps.
Here are the full logs of the above commands, first is a simple "emerge -1 setuptools":
Code: Select all
# emerge -av1 setuptools
* IMPORTANT: 14 news items need reading for repository 'gentoo'.
* Use eselect news read to view new items.
These are the packages that would be merged, in order:
Calculating dependencies... done!
Dependency resolution took 0.47 s (backtrack: 0/20).
[ebuild N ] dev-python/setuptools-69.5.1-r1::gentoo USE="-test" PYTHON_TARGETS="python3_11 python3_12 -pypy3 -python3_10" 0 KiB
[ebuild N ] dev-python/setuptools-scm-8.0.4::gentoo USE="-test" PYTHON_TARGETS="python3_11 python3_12 -pypy3 -python3_10" 0 KiB
Total: 2 packages (2 new), Size of downloads: 0 KiB
Would you like to merge these packages? [Yes/No]
>>> Verifying ebuild manifests
>>> Emerging (1 of 2) dev-python/setuptools-69.5.1-r1::gentoo
* Fetching files in the background.
* To view fetch progress, run in another terminal:
* tail -f /var/log/emerge-fetch.log
* setuptools-69.5.1.tar.gz BLAKE2B SHA512 size ;-) ... [ ok ]
>>> Unpacking source...
>>> Unpacking setuptools-69.5.1.tar.gz to /var/tmp/portage/dev-python/setuptools-69.5.1-r1/work
>>> Source unpacked in /var/tmp/portage/dev-python/setuptools-69.5.1-r1/work
>>> Preparing source in /var/tmp/portage/dev-python/setuptools-69.5.1-r1/work/setuptools-69.5.1 ...
* Applying setuptools-62.4.0-py-compile.patch ... [ ok ]
* Build system packages:
* dev-python/gpep517 : 15
* dev-python/installer : 0.7.0
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-python/setuptools-69.5.1-r1/work/setuptools-69.5.1 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-python/setuptools-69.5.1-r1/work/setuptools-69.5.1 ...
* python3_11: running distutils-r1_run_phase distutils-r1_python_compile
* Building the wheel for setuptools-69.5.1 via setuptools.build_meta
python3.11 -m gpep517 build-wheel --prefix=/usr --backend setuptools.build_meta --output-fd 3 --wheel-dir /var/tmp/portage/dev-python/setuptools-69.5.1-r1/work/setuptools-69.5.1-python3_11/wheel
2024-05-05 20:19:18,000 gpep517 INFO Building wheel via backend setuptools.build_meta
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/usr/lib/python3.11/site-packages/gpep517/__main__.py", line 429, in <module>
sys.exit(main())
^^^^^^
File "/usr/lib/python3.11/site-packages/gpep517/__main__.py", line 425, in main
return func(args)
^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/gpep517/__main__.py", line 215, in build_wheel
print(build_wheel_impl(args, args.wheel_dir), file=out)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/gpep517/__main__.py", line 207, in build_wheel_impl
wheel_name = backend.build_wheel(str(wheel_dir), args.config_json)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/tmp/portage/dev-python/setuptools-69.5.1-r1/work/setuptools-69.5.1/setuptools/build_meta.py", line 410, in build_wheel
return self._build_with_temp_dir(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/tmp/portage/dev-python/setuptools-69.5.1-r1/work/setuptools-69.5.1/setuptools/build_meta.py", line 395, in _build_with_temp_dir
self.run_setup()
File "/var/tmp/portage/dev-python/setuptools-69.5.1-r1/work/setuptools-69.5.1/setuptools/build_meta.py", line 311, in run_setup
exec(code, locals())
File "<string>", line 93, in <module>
File "/var/tmp/portage/dev-python/setuptools-69.5.1-r1/work/setuptools-69.5.1/setuptools/__init__.py", line 104, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/tmp/portage/dev-python/setuptools-69.5.1-r1/work/setuptools-69.5.1/setuptools/_distutils/core.py", line 146, in setup
_setup_distribution = dist = klass(attrs)
^^^^^^^^^^^^
File "/var/tmp/portage/dev-python/setuptools-69.5.1-r1/work/setuptools-69.5.1/setuptools/dist.py", line 307, in __init__
_Distribution.__init__(self, dist_attrs)
File "/var/tmp/portage/dev-python/setuptools-69.5.1-r1/work/setuptools-69.5.1/setuptools/_distutils/dist.py", line 284, in __init__
self.finalize_options()
File "/var/tmp/portage/dev-python/setuptools-69.5.1-r1/work/setuptools-69.5.1/setuptools/dist.py", line 657, in finalize_options
for ep in sorted(loaded, key=by_order):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/tmp/portage/dev-python/setuptools-69.5.1-r1/work/setuptools-69.5.1/setuptools/dist.py", line 656, in <lambda>
loaded = map(lambda e: e.load(), filtered)
^^^^^^^^
File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 202, in load
module = import_module(match.group('module'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1140, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'setuptools_scm.integration'
* ERROR: dev-python/setuptools-69.5.1-r1::gentoo failed (compile phase):
* Wheel build failed
*
* Call stack:
* ebuild.sh, line 136: Called src_compile
* environment, line 3992: Called distutils-r1_src_compile
* environment, line 1894: Called _distutils-r1_run_foreach_impl 'distutils-r1_python_compile'
* environment, line 724: Called python_foreach_impl 'distutils-r1_run_phase' 'distutils-r1_python_compile'
* environment, line 3603: Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile'
* environment, line 3109: Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile'
* environment, line 3107: Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'distutils-r1_python_compile'
* environment, line 1210: Called distutils-r1_run_phase 'distutils-r1_python_compile'
* environment, line 1876: Called distutils-r1_python_compile
* environment, line 1692: Called distutils_pep517_install '/var/tmp/portage/dev-python/setuptools-69.5.1-r1/work/setuptools-69.5.1-python3_11/install'
* environment, line 2261: Called die
* The specific snippet of code:
* local wheel=$("${cmd[@]}" 3>&1 1>&2 || die "Wheel build failed");
*
* If you need support, post the output of `emerge --info '=dev-python/setuptools-69.5.1-r1::gentoo'`,
* the complete build log and the output of `emerge -pqv '=dev-python/setuptools-69.5.1-r1::gentoo'`.
* The complete build log is located at '/var/tmp/portage/dev-python/setuptools-69.5.1-r1/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/dev-python/setuptools-69.5.1-r1/temp/environment'.
* Working directory: '/var/tmp/portage/dev-python/setuptools-69.5.1-r1/work/setuptools-69.5.1'
* S: '/var/tmp/portage/dev-python/setuptools-69.5.1-r1/work/setuptools-69.5.1'
>>> Failed to emerge dev-python/setuptools-69.5.1-r1, Log file:
>>> '/var/tmp/portage/dev-python/setuptools-69.5.1-r1/temp/build.log'
* Messages for package dev-python/setuptools-69.5.1-r1:
* ERROR: dev-python/setuptools-69.5.1-r1::gentoo failed (compile phase):
* Wheel build failed
*
* Call stack:
* ebuild.sh, line 136: Called src_compile
* environment, line 3992: Called distutils-r1_src_compile
* environment, line 1894: Called _distutils-r1_run_foreach_impl 'distutils-r1_python_compile'
* environment, line 724: Called python_foreach_impl 'distutils-r1_run_phase' 'distutils-r1_python_compile'
* environment, line 3603: Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile'
* environment, line 3109: Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile'
* environment, line 3107: Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'distutils-r1_python_compile'
* environment, line 1210: Called distutils-r1_run_phase 'distutils-r1_python_compile'
* environment, line 1876: Called distutils-r1_python_compile
* environment, line 1692: Called distutils_pep517_install '/var/tmp/portage/dev-python/setuptools-69.5.1-r1/work/setuptools-69.5.1-python3_11/install'
* environment, line 2261: Called die
* The specific snippet of code:
* local wheel=$("${cmd[@]}" 3>&1 1>&2 || die "Wheel build failed");
*
* If you need support, post the output of `emerge --info '=dev-python/setuptools-69.5.1-r1::gentoo'`,
* the complete build log and the output of `emerge -pqv '=dev-python/setuptools-69.5.1-r1::gentoo'`.
* The complete build log is located at '/var/tmp/portage/dev-python/setuptools-69.5.1-r1/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/dev-python/setuptools-69.5.1-r1/temp/environment'.
* Working directory: '/var/tmp/portage/dev-python/setuptools-69.5.1-r1/work/setuptools-69.5.1'
* S: '/var/tmp/portage/dev-python/setuptools-69.5.1-r1/work/setuptools-69.5.1'
Second one a "emerge -1 --nodeps setuptools-scm" (done just for testing what this one shows):
Code: Select all
# emerge -av1 --nodeps setuptools-scm
* IMPORTANT: 14 news items need reading for repository 'gentoo'.
* Use eselect news read to view new items.
These are the packages that would be merged, in order:
[ebuild N ] dev-python/setuptools-scm-8.0.4::gentoo USE="-test" PYTHON_TARGETS="python3_11 python3_12 -pypy3 -python3_10" 0 KiB
Total: 1 package (1 new), Size of downloads: 0 KiB
Would you like to merge these packages? [Yes/No]
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) dev-python/setuptools-scm-8.0.4::gentoo
* setuptools-scm-8.0.4.tar.gz BLAKE2B SHA512 size ;-) ... [ ok ]
>>> Unpacking source...
>>> Unpacking setuptools-scm-8.0.4.tar.gz to /var/tmp/portage/dev-python/setuptools-scm-8.0.4/work
>>> Source unpacked in /var/tmp/portage/dev-python/setuptools-scm-8.0.4/work
>>> Preparing source in /var/tmp/portage/dev-python/setuptools-scm-8.0.4/work/setuptools-scm-8.0.4 ...
* Build system packages:
* dev-python/gpep517 : 15
* dev-python/installer : 0.7.0
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-python/setuptools-scm-8.0.4/work/setuptools-scm-8.0.4 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-python/setuptools-scm-8.0.4/work/setuptools-scm-8.0.4 ...
* python3_11: running distutils-r1_run_phase distutils-r1_python_compile
* Building the wheel for setuptools-scm-8.0.4 via _own_version_helper:build_meta
python3.11 -m gpep517 build-wheel --prefix=/usr --backend _own_version_helper:build_meta --output-fd 3 --wheel-dir /var/tmp/portage/dev-python/setuptools-scm-8.0.4/work/setuptools-scm-8.0.4-python3_11/wheel
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/usr/lib/python3.11/site-packages/gpep517/__main__.py", line 429, in <module>
sys.exit(main())
^^^^^^
File "/usr/lib/python3.11/site-packages/gpep517/__main__.py", line 425, in main
return func(args)
^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/gpep517/__main__.py", line 215, in build_wheel
print(build_wheel_impl(args, args.wheel_dir), file=out)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/gpep517/__main__.py", line 198, in build_wheel_impl
backend = importlib.import_module(package)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/var/tmp/portage/dev-python/setuptools-scm-8.0.4/work/setuptools-scm-8.0.4/_own_version_helper.py", line 13, in <module>
from setuptools import build_meta as build_meta # noqa
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: cannot import name 'build_meta' from 'setuptools' (unknown location)
* ERROR: dev-python/setuptools-scm-8.0.4::gentoo failed (compile phase):
* Wheel build failed
*
* Call stack:
* ebuild.sh, line 136: Called src_compile
* environment, line 3972: Called distutils-r1_src_compile
* environment, line 1880: Called _distutils-r1_run_foreach_impl 'distutils-r1_python_compile'
* environment, line 725: Called python_foreach_impl 'distutils-r1_run_phase' 'distutils-r1_python_compile'
* environment, line 3589: Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile'
* environment, line 3095: Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile'
* environment, line 3093: Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'distutils-r1_python_compile'
* environment, line 1196: Called distutils-r1_run_phase 'distutils-r1_python_compile'
* environment, line 1862: Called distutils-r1_python_compile
* environment, line 1678: Called distutils_pep517_install '/var/tmp/portage/dev-python/setuptools-scm-8.0.4/work/setuptools-scm-8.0.4-python3_11/install'
* environment, line 2247: Called die
* The specific snippet of code:
* local wheel=$("${cmd[@]}" 3>&1 1>&2 || die "Wheel build failed");
*
* If you need support, post the output of `emerge --info '=dev-python/setuptools-scm-8.0.4::gentoo'`,
* the complete build log and the output of `emerge -pqv '=dev-python/setuptools-scm-8.0.4::gentoo'`.
* The complete build log is located at '/var/tmp/portage/dev-python/setuptools-scm-8.0.4/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/dev-python/setuptools-scm-8.0.4/temp/environment'.
* Working directory: '/var/tmp/portage/dev-python/setuptools-scm-8.0.4/work/setuptools-scm-8.0.4'
* S: '/var/tmp/portage/dev-python/setuptools-scm-8.0.4/work/setuptools-scm-8.0.4'
>>> Failed to emerge dev-python/setuptools-scm-8.0.4, Log file:
>>> '/var/tmp/portage/dev-python/setuptools-scm-8.0.4/temp/build.log'
* Messages for package dev-python/setuptools-scm-8.0.4:
* ERROR: dev-python/setuptools-scm-8.0.4::gentoo failed (compile phase):
* Wheel build failed
*
* Call stack:
* ebuild.sh, line 136: Called src_compile
* environment, line 3972: Called distutils-r1_src_compile
* environment, line 1880: Called _distutils-r1_run_foreach_impl 'distutils-r1_python_compile'
* environment, line 725: Called python_foreach_impl 'distutils-r1_run_phase' 'distutils-r1_python_compile'
* environment, line 3589: Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile'
* environment, line 3095: Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile'
* environment, line 3093: Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'distutils-r1_python_compile'
* environment, line 1196: Called distutils-r1_run_phase 'distutils-r1_python_compile'
* environment, line 1862: Called distutils-r1_python_compile
* environment, line 1678: Called distutils_pep517_install '/var/tmp/portage/dev-python/setuptools-scm-8.0.4/work/setuptools-scm-8.0.4-python3_11/install'
* environment, line 2247: Called die
* The specific snippet of code:
* local wheel=$("${cmd[@]}" 3>&1 1>&2 || die "Wheel build failed");
*
* If you need support, post the output of `emerge --info '=dev-python/setuptools-scm-8.0.4::gentoo'`,
* the complete build log and the output of `emerge -pqv '=dev-python/setuptools-scm-8.0.4::gentoo'`.
* The complete build log is located at '/var/tmp/portage/dev-python/setuptools-scm-8.0.4/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/dev-python/setuptools-scm-8.0.4/temp/environment'.
* Working directory: '/var/tmp/portage/dev-python/setuptools-scm-8.0.4/work/setuptools-scm-8.0.4'
* S: '/var/tmp/portage/dev-python/setuptools-scm-8.0.4/work/setuptools-scm-8.0.4'
Python implementations are configured like this:
Code: Select all
PYTHON_TARGETS="python3_11 python3_12"
PYTHON_SINGLE_TARGET="python3_11"
Not sure why it doesn't show the two newer Python versions as new uses, porbably because I've already tried to merge it many times over.
Building it with
Code: Select all
PYTHON_TARGETS="python3_10"
PYTHON_SINGLE_TARGET="python3_10"
doesn't work either, same error.
If I read the output correctly, some plugin that setuptools tries to import has a dependency on setuptools-scm, possibly "wheel", but that's not exactly clear as the code seems to iterate over a list of plugins.
That said, I suspect setuptools itself isn't the real culprit, but some other package used in the build. As a C++ dev, I sadly don't have enough insight into how this stuff works.
Debian is available in three different versions: rusty, stale and broken.