setuptools: FTBFS in mantic

Bug #2037205 reported by Graham Inggs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dh-python (Debian)
New
Unknown
dh-python (Ubuntu)
New
Undecided
Unassigned
setuptools (Debian)
Fix Released
Unknown
setuptools (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

As seen in the mantic test rebuild [1], setuptools 68.1.2-1 currently FTBFS:

Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/setuptools/config/setupcfg.py", line 284, in __setitem__
    current_value = getattr(target_obj, option_name)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'MinimalDistribution' object has no attribute 'entry_points'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/setup.py", line 92, in <module>
    dist = setuptools.setup(**setup_params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/setuptools/__init__.py", line 106, in setup
    _install_setup_requires(attrs)
  File "/<<PKGBUILDDIR>>/setuptools/__init__.py", line 77, in _install_setup_requires
    dist.parse_config_files(ignore_option_errors=True)
  File "/<<PKGBUILDDIR>>/setuptools/dist.py", line 895, in parse_config_files
    setupcfg.parse_configuration(
  File "/<<PKGBUILDDIR>>/setuptools/config/setupcfg.py", line 177, in parse_configuration
    options.parse()
  File "/<<PKGBUILDDIR>>/setuptools/config/setupcfg.py", line 500, in parse
    section_parser_method(section_options)
  File "/<<PKGBUILDDIR>>/setuptools/config/setupcfg.py", line 727, in parse_section_entry_points
    self['entry_points'] = parsed
    ~~~~^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/setuptools/config/setupcfg.py", line 286, in __setitem__
    raise KeyError(option_name)
KeyError: 'entry_points'
E: pybuild pybuild:395: clean: plugin distutils failed with: exit code=1: python3.11 setup.py clean

[1] https://people.canonical.com/~ginggs/ftbfs-report/test-rebuild-20230830-mantic-mantic.html

Tags: ftbfs
Graham Inggs (ginggs)
tags: added: ftbfs
Changed in setuptools (Debian):
status: Unknown → New
Revision history for this message
Paul Mars (upils) wrote :

Same bug encountered by Fedora back in January when they updated to python 3.11 https://github.com/pypa/setuptools/issues/3761

Revision history for this message
Paul Mars (upils) wrote :

I have a patch fixing the build locally. I build with the following command:

sbuild -s -b --source-only-changes --no-arch-all --no-arch-any -d mantic

But then in launchpad this is still failing the same way. I made sure my schroot is using updates and proposed. dh-python is in the same version in both environment so this change https://tracker.debian.org/news/1457024/accepted-dh-python-620230825-source-into-unstable/ should not be the cause.

I also checked that my patch was applied but since this is the same failure as before the fix it seems my patch is either ignored or something different is happening on launchpad (cleaning some files before the build?).

Here is a failing buildlog with my patch https://launchpadlibrarian.net/689440963/buildlog_ubuntu-mantic-amd64.setuptools_68.1.2-1.ppa6ubuntu1.ppa1_BUILDING.txt.gz

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "setuptool.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Revision history for this message
Graham Inggs (ginggs) wrote :

"patch" flag removed from the attachment
"patch" tag removed
~ubuntu-sponsors unsubscribed

tags: removed: patch
Revision history for this message
Graham Inggs (ginggs) wrote :

Simple workaround:

--- a/debian/rules
+++ b/debian/rules
@@ -26,7 +26,7 @@
 override_dh_auto_clean:
 # # Keep entry_points, we need it to drive setup.py
 # -mv setuptools.egg-info/entry_points.txt .
- dh_auto_clean
+ rm -rf $(CURDIR)/.pybuild/
 # mkdir -p setuptools.egg-info
 # mv entry_points.txt setuptools.egg-info

Revision history for this message
Graham Inggs (ginggs) wrote :

Discussing the best solution with dh-python maintainers

Changed in dh-python (Debian):
status: Unknown → New
Matthias Klose (doko)
Changed in setuptools (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package setuptools - 68.1.2-2

---------------
setuptools (68.1.2-2) unstable; urgency=medium

  * Don't run dh_auto_clean, just remove the .pybuild directory manually.
    dh-python would remove the egg-info dir during the dh_auto_clean call.
    Closes: #1052540, #1052783. LP: #2037205.

 -- Matthias Klose <email address hidden> Wed, 04 Oct 2023 10:28:14 +0200

Changed in setuptools (Ubuntu):
status: Fix Committed → Fix Released
Changed in setuptools (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.