Python Developer Tooling Handbook logo

Python Developer Tooling Handbook

Subscribe
Archives
March 24, 2025

Setuptools 78.0.1 breaking package installation

ℹ️
Update: Setuptools released version 78.0.2 postponing this breaking change.

A recent update to setuptools (version 78.0.1) is breaking installations of many packages, particularly older or unmaintained ones that use dash-separated keys instead of the now-required underscore format.

Setuptools 78.0.1 introduced a breaking change that enforces strict naming conventions in setup.cfg files. Specifically:

  • Options containing dashes (e.g., description-file) are no longer accepted
  • Options must use underscore format instead (e.g., description_file)

The error looks like this:

setuptools.errors.InvalidConfigError: Invalid dash-separated key 'descriptionfile' in 'metadata' (setup.cfg), please use the underscore name 'description_file' instead.

While this validation has been in the code since 2021, it appears to have been fully enforced with the 78.0.1 release.

Affected Packages

Many packages are affected, including but not limited to:

  • ansible-vault
  • opentracing
  • pysdf
  • pypd
  • pyspark (via dependencies)

Current Solutions

As of now, there are several workarounds:

1. Downgrade setuptools

Some users report success by pinning setuptools to an earlier version:

pip install setuptools==77.0.3

2. For uv users

If you’re using the uv package manager, create a file named “build.txt” with the line setuptools<=77.0.3 and run

  • For uv pip: You can use build constraints

    uv pip install --build-constraint build.txt <package>
  • For uv sync: Unfortunately, build constraints aren’t currently supported with uv sync. The uv team is working on a fix—see here and here.

A Fix is Coming

The setuptools team is working on a fix. A pull request (#4911) has been created to revert the removals introduced in v78.0.0, which should restore compatibility with packages using dash-separated keys.

Don't miss what's next. Subscribe to Python Developer Tooling Handbook:
Github
This email brought to you by Buttondown, the easiest way to start and grow your newsletter.