Skip to content

Install setuptools_scm via pip to fix vcs_versioning build failure#610

Merged
andystaples merged 3 commits into
devfrom
fix/setuptools-scm-vcs-versioning
Jul 9, 2026
Merged

Install setuptools_scm via pip to fix vcs_versioning build failure#610
andystaples merged 3 commits into
devfrom
fix/setuptools-scm-vcs-versioning

Conversation

@andystaples

Copy link
Copy Markdown
Collaborator

Problem

Follow-up to #609. With setuptools upgraded to >= 69.3.0, the build now fails earlier with:

File ".eggs/setuptools_scm-10.2.0-py3.10.egg/setuptools_scm/__init__.py", line 8, in <module>
    from vcs_versioning import Configuration
ModuleNotFoundError: No module named 'vcs_versioning'

Root cause

setup.py declares setup_requires=['setuptools_scm'], which triggers setuptools' deprecated fetch_build_eggs path. That path fetches setuptools_scm as an egg into .eggs/ but does NOT install its transitive dependency vcs_versioning (split out as a separate distribution in setuptools_scm 10.x). Importing setuptools_scm then fails.

This did not surface in #609's local simulation because that run happened to have setuptools_scm already pip-installed (which also pulls vcs_versioning), masking the egg-fetch path the agents actually use.

Fix

Install setuptools_scm via pip in both pipelines. Once the requirement is already satisfied in the environment, setuptools skips the deprecated egg-fetch entirely, and pip has resolved vcs_versioning transitively.

Verification

Reproduced the agent path in a clean Python 3.10 venv (requirements + setuptools>=69.3.0 wheel, no explicit setuptools_scm) -> ModuleNotFoundError: No module named 'vcs_versioning'. After adding pip install setuptools_scm the build succeeds and still emits the PEP 625 normalized azure_functions_durable-*.tar.gz.

setup.py's setup_requires=['setuptools_scm'] uses the deprecated fetch_build_eggs path, which fetches setuptools_scm as an egg but not its transitive dependency vcs_versioning (split out in setuptools_scm 10.x), causing ModuleNotFoundError during build. Pip-installing setuptools_scm satisfies the requirement (resolving vcs_versioning) and skips the egg-fetch path.
@andystaples

Copy link
Copy Markdown
Collaborator Author

@microsoft-github-policy-service rerun

…cnow()

- UsePythonVersion versionSpec '3.10.x' -> '3.10' to satisfy the hosted-agent recommendation to avoid pinning a patch version.
- Replace datetime.utcnow() (deprecated, slated for removal) with datetime.now(timezone.utc).replace(tzinfo=None), preserving the naive-UTC value the test relies on.
@andystaples andystaples merged commit 01290d1 into dev Jul 9, 2026
9 checks passed
@andystaples andystaples deleted the fix/setuptools-scm-vcs-versioning branch July 9, 2026 17:38
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