Fix: honor pinned constraints in pip install recipes (#70)#71
Open
Fix: honor pinned constraints in pip install recipes (#70)#71
Conversation
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.
Summary
PIP_CONSTRAINTS_FLAGMakefile variable incore/mxenv.mkthat resolves to-c constraints-mxdev.txtwhen present, falls back to the user'sconstraints.txt, and is empty otherwise.pip installrecipe across the topic templates through this flag and drops-U.make installno longer silently upgrades transitive deps past project pins.Why
sphinx-autobuild,coverage, and other tool installs ran withpip install -U <pkg>and no-c <constraints>, so transitive deps (e.g.starlette,uvicorn,websockets) were pulled to latest even when pinned inconstraints.txt. Local venvs diverged from CI builds, breaking reproducibility for projects that rely on pin discipline.The fix uses lazy expansion (
=not:=) so\$(wildcard …)re-evaluates per use — the same recipe correctly resolves whethermxfileshas run yet or not. No domain-graph reordering needed.Scope
src/mxmake/topics/core/mxenv.mk— flag definition + bootstrap installssrc/mxmake/topics/docs/sphinx.mksrc/mxmake/topics/qa/{coverage,ruff,black,isort,mypy,pyrefly,pyupgrade,test,ty,zpretty}.mksrc/mxmake/topics/applications/{cookiecutter,twisted,zest-releaser}.mksrc/mxmake/topics/i18n/lingua.mksrc/mxmake/topics/ldap/python-ldap.mksrc/mxmake/topics/core/packages.mk— added a comment noting that constraints are already embedded inrequirements-mxdev.txt(so this recipe is intentionally untouched)src/mxmake/tests/expected/Makefile— snapshot updated to lock the post-fix outputMakefile— regenerated via dogfoodmxmake updateCHANGES.md— 2.2.1 entrydocs/source/migration.md— 2.2.1 behavior-change sectionTest plan
pytest src/mxmake/tests/— 32 passedmake installagainst regenerated Makefile — clean runmake test && make check && make typecheck— all greengrep -rn "install -U" src/mxmake/topics/— no matchespip install <pkgs>recipe in topics now passes\$(PIP_CONSTRAINTS_FLAG)starlette/uvicorn/websocketsinconstraints.txt, runmxmake update && make clean install, confirmpip freezematches the pins