Fix ESRP rejection by upgrading setuptools for PEP 625 sdist naming#609
Merged
Conversation
The build agents use the setuptools bundled with the Python 3.10 venv (65.5.0), which emits legacy hyphenated sdist filenames (azure-functions-durable-*.tar.gz). ESRP requires the PEP 625 normalized underscore form (azure_functions_durable-*.tar.gz), which setuptools >= 69.3.0 produces. Pin setuptools>=69.3.0 before building in both pipelines.
nytian
approved these changes
Jul 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The ESRP release failed with:
The sdist was produced with a legacy hyphenated filename, but ESRP/PyPI now enforce the PEP 625 normalized form (dashes -> underscores).
Root cause
The build steps never install or upgrade setuptools, so the build uses whatever ships with the Python 3.10 venv created by UsePythonVersion@0 -- setuptools 65.5.0. PEP 625 sdist-name normalization only became the default in setuptools 69.3.0, so the older bundled version emits azure-functions-durable-*.tar.gz.
Fix
Install setuptools>=69.3.0 (alongside wheel) before building, in both eng/templates/build.yml (official/ESRP path) and azure-pipelines.yml (CI).
Verification
Simulated the exact build (python setup.py sdist bdist_wheel) in clean Python 3.10 venvs:
The wheel was already correctly named even with old setuptools; only the sdist was affected, so this is the only change required.