Description
setuptools version
80.9.0
Python version
3.10.12
OS
Ubuntu 22.04 LTS
Additional environment information
No response
Description
I have a daily Jenkins job that tests my Ansible playbooks. It started failing on May 15 by failing to pip install certbot certbot-augeas
on an Ubuntu 22.04 LTS VM. I've reduced the failing test case to this command:
pip cache purge && rm -fr /tmp/env && virtualenv /tmp/env && /tmp/env/bin/pip install -U setuptools && /tmp/env/bin/pip install python-augeas
May 14 is the release date of setuptools 80.7.0. I've verified that if I pip install 'setuptools < 80.7.0'
, the failure goes away, but if I pip install setuptools==80.7.0
, the failure reappears.
The setup.py in python-augeas looks a bit old-fashioned, but doesn't seem to be using any fancy features? It uses the deprecated test_suite
, but I don't think that could cause python setup.py egg_info
to fail.
For some reason the failure only shows up on Ubuntu 22.04, while the same Ansible playbook (and my reproducer one-liner) runs fine against an Ubuntu 24.04 LTS VM (with Python 3.12.3).
Expected behavior
I expect pip install certbot-apache
to succeed.
How to Reproduce
virtualenv env && env/bin/pip install -U setuptools && env/bin/pip install python-augeas
Output
ansible@jammy:/tmp$ virtualenv env && env/bin/pip install -U setuptools && env/bin/pip install python-augeas
created virtual environment CPython3.10.12.final.0-64 in 105ms
creator CPython3Posix(dest=/tmp/env, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/ansible/.local/share/virtualenv)
added seed packages: pip==22.0.2, setuptools==59.6.0, wheel==0.37.1
activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
Requirement already satisfied: setuptools in ./env/lib/python3.10/site-packages (59.6.0)
Collecting setuptools
Downloading setuptools-80.9.0-py3-none-any.whl (1.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 7.3 MB/s eta 0:00:00
Installing collected packages: setuptools
Attempting uninstall: setuptools
Found existing installation: setuptools 59.6.0
Uninstalling setuptools-59.6.0:
Successfully uninstalled setuptools-59.6.0
Successfully installed setuptools-80.9.0
Collecting python-augeas
Downloading python-augeas-1.2.0.tar.gz (99 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 99.4/99.4 KB 1.6 MB/s eta 0:00:00
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [52 lines of output]
/tmp/env/lib/python3.10/site-packages/setuptools/__init__.py:92: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!
********************************************************************************
Requirements should be satisfied by a PEP 517 installer.
If you are using pip, you can try `pip install --use-pep517`.
By 2025-Oct-31, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
********************************************************************************
!!
dist.fetch_build_eggs(dist.setup_requires)
/tmp/env/lib/python3.10/site-packages/setuptools/_distutils/dist.py:289: UserWarning: Unknown distribution option: 'test_suite'
warnings.warn(msg)
Traceback (most recent call last):
File "/tmp/pip-install-n6pg4cb9/python-augeas_40492a9571144f39af4a1ca1a1ffafcb/.eggs/cffi-1.17.1-py3.10-linux-x86_64.egg/cffi/cparser.py", line 5, in <module>
from . import _pycparser as pycparser
ImportError: cannot import name '_pycparser' from 'cffi' (/tmp/pip-install-n6pg4cb9/python-augeas_40492a9571144f39af4a1ca1a1ffafcb/.eggs/cffi-1.17.1-py3.10-linux-x86_64.egg/cffi/__init__.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-n6pg4cb9/python-augeas_40492a9571144f39af4a1ca1a1ffafcb/setup.py", line 16, in <module>
setup(name=name,
File "/tmp/env/lib/python3.10/site-packages/setuptools/__init__.py", line 115, in setup
return distutils.core.setup(**attrs)
File "/tmp/env/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 148, in setup
_setup_distribution = dist = klass(attrs)
File "/tmp/env/lib/python3.10/site-packages/setuptools/dist.py", line 321, in __init__
_Distribution.__init__(self, dist_attrs)
File "/tmp/env/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 309, in __init__
self.finalize_options()
File "/tmp/env/lib/python3.10/site-packages/setuptools/dist.py", line 784, in finalize_options
ep(self)
File "/tmp/env/lib/python3.10/site-packages/setuptools/dist.py", line 804, in _finalize_setup_keywords
ep.load()(self, ep.name, value)
File "/tmp/pip-install-n6pg4cb9/python-augeas_40492a9571144f39af4a1ca1a1ffafcb/.eggs/cffi-1.17.1-py3.10-linux-x86_64.egg/cffi/setuptools_ext.py", line 216, in cffi_modules
add_cffi_module(dist, cffi_module)
File "/tmp/pip-install-n6pg4cb9/python-augeas_40492a9571144f39af4a1ca1a1ffafcb/.eggs/cffi-1.17.1-py3.10-linux-x86_64.egg/cffi/setuptools_ext.py", line 49, in add_cffi_module
execfile(build_file_name, mod_vars)
File "/tmp/pip-install-n6pg4cb9/python-augeas_40492a9571144f39af4a1ca1a1ffafcb/.eggs/cffi-1.17.1-py3.10-linux-x86_64.egg/cffi/setuptools_ext.py", line 25, in execfile
exec(code, glob, glob)
File "augeas/ffi.py", line 19, in <module>
ffi = FFI()
File "/tmp/pip-install-n6pg4cb9/python-augeas_40492a9571144f39af4a1ca1a1ffafcb/.eggs/cffi-1.17.1-py3.10-linux-x86_64.egg/cffi/api.py", line 65, in __init__
from . import cparser
File "/tmp/pip-install-n6pg4cb9/python-augeas_40492a9571144f39af4a1ca1a1ffafcb/.eggs/cffi-1.17.1-py3.10-linux-x86_64.egg/cffi/cparser.py", line 7, in <module>
import pycparser
ModuleNotFoundError: No module named 'pycparser'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.