fix(build): add setuptools build dependency for flatdict#181
fix(build): add setuptools build dependency for flatdict#181
Conversation
Co-authored-by: liupeirong <1184120+liupeirong@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR fixes a devcontainer build failure where flatdict==4.0.1 requires pkg_resources (provided by setuptools) during its build process but doesn't declare it as a build dependency. The fix adds a uv-specific configuration to ensure setuptools is available when building flatdict in isolation.
Changes:
- Added
[tool.uv.extra-build-dependencies]section topyproject.tomlspecifying that flatdict requires setuptools as a build dependency
|
Closing and re-opening this PR to unblock the failed actions permissions issues. |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
|
Thanks for the fix! 🎉 Great catch on the missing I went ahead and updated the PR description to align with our pull request template — added the structured sections (Description, Type of Change, Testing Performed, etc.) and linked this to #179 with a Appreciate the contribution! |
|
Actually on a clean Ubuntu 24.04 LTS, opening the dev container for the first time still fails. Now it complains there's no module |
There was a problem hiding this comment.
Actually on a clean Ubuntu 24.04 LTS, opening the dev container for the first time still fails. Now it complains there's no module
pkg_resourcesfound.pkg_resourcesis deprecated, so installing it is more complicated.flatdictdoesn't seem to be used anywhere in the repo. @agreaves-ms, can you confirm if it's still needed?
#196 removed flatdict and other unused dependencies, so I agree we should consider if this PR is even needed anymore or if we can close it.
Pull Request
Description
Adds
setuptoolsas an explicit build dependency forflatdictinpyproject.tomlvia the[tool.uv.extra-build-dependencies]table. Whenuvbuildsflatdict==4.0.1in an isolated environment (such as the devcontainer), it fails withModuleNotFoundError: No module named 'pkg_resources'becauseflatdict'ssetup.pyimportspkg_resourceswithout declaringsetuptoolsas a build requirement. This override ensuressetuptoolsis present during the build.Closes #179
Type of Change
Component(s) Affected
deploy/000-prerequisites- Azure subscription setupdeploy/001-iac- Terraform infrastructuredeploy/002-setup- OSMO control plane / Helmdeploy/004-workflow- Training workflowssrc/training- Python training scriptsdocs/- DocumentationTesting Performed
planreviewed (no unexpected changes)applytested in dev environmentsmoke_test_azure.py)Documentation Impact
Checklist