Skip to content

Fix ESRP rejection by upgrading setuptools for PEP 625 sdist naming#609

Merged
andystaples merged 1 commit into
devfrom
fix/sdist-pep625-filename-normalization
Jul 9, 2026
Merged

Fix ESRP rejection by upgrading setuptools for PEP 625 sdist naming#609
andystaples merged 1 commit into
devfrom
fix/sdist-pep625-filename-normalization

Conversation

@andystaples

Copy link
Copy Markdown
Collaborator

Problem

The ESRP release failed with:

Filename 'azure-functions-durable-1.6.0.tar.gz' is invalid, should be 'azure_functions_durable-1.6.0.tar.gz'.

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:

setuptools sdist filename Result
65.5.0 (bundled today) azure-functions-durable-*.tar.gz rejected
69.2.0 azure-functions-durable-*.tar.gz hyphen
69.3.0 (chosen lower bound) azure_functions_durable-*.tar.gz underscore
83.0.0 (latest) azure_functions_durable-*.tar.gz underscore

The wheel was already correctly named even with old setuptools; only the sdist was affected, so this is the only change required.

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.
@andystaples andystaples merged commit 924c215 into dev Jul 9, 2026
9 checks passed
@andystaples andystaples deleted the fix/sdist-pep625-filename-normalization branch July 9, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants