When building a charm using layer-basic fails because pbr<6.1.1 can't be built with setuptools>=82.0 due to the drop of pkg_resources, this can't be addressed by pinning setuptools, because pip will build pbr in an isolated environment.
:: Collecting pbr<6.1.1 (from -r /tmp/tmpt0pr1_kw/wheelhouse.txt (line 55))
:: Using cached pbr-6.1.0.tar.gz (124 kB)
:: Installing build dependencies: started
:: Installing build dependencies: finished with status 'done'
:: Getting requirements to build wheel: started
:: Getting requirements to build wheel: finished with status 'error'
:: error: subprocess-exited-with-error
::
:: × Getting requirements to build wheel did not run successfully.
:: │ exit code: 1
:: ╰─> [22 lines of output]
:: Traceback (most recent call last):
:: File "/tmp/tmp438b5rxl/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
:: main()
:: File "/tmp/tmp438b5rxl/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
:: json_out['return_val'] = hook(**hook_input['kwargs'])
:: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:: File "/tmp/tmp438b5rxl/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
:: return hook(config_settings)
:: ^^^^^^^^^^^^^^^^^^^^^
:: File "/tmp/pip-build-env-avujfybc/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 333, in get_requires_for_build_wheel
:: return self._get_build_requires(config_settings, requirements=[])
:: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:: File "/tmp/pip-build-env-avujfybc/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires
:: self.run_setup()
:: File "/tmp/pip-build-env-avujfybc/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 520, in run_setup
:: super().run_setup(setup_script=setup_script)
:: File "/tmp/pip-build-env-avujfybc/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 317, in run_setup
:: exec(code, locals())
:: File "<string>", line 18, in <module>
:: File "/tmp/pip-download-kuycbmxk/pbr_44eca0dc1cc2429fb2c1ebcbee964869/pbr/util.py", line 75, in <module>
:: import pkg_resources
:: ModuleNotFoundError: No module named 'pkg_resources'
:: [end of output]
When building a charm using layer-basic fails because pbr<6.1.1 can't be built with setuptools>=82.0 due to the drop of
pkg_resources, this can't be addressed by pinning setuptools, because pip will build pbr in an isolated environment.References:
pkg_resourcespypa/setuptools#5174