Skip to content

Make pip command configurable via PIP variable in Makefile#12641

Merged
bdraco merged 2 commits into
aio-libs:masterfrom
bdraco:makefile-pip-variable
May 19, 2026
Merged

Make pip command configurable via PIP variable in Makefile#12641
bdraco merged 2 commits into
aio-libs:masterfrom
bdraco:makefile-pip-variable

Conversation

@bdraco

@bdraco bdraco commented May 19, 2026

Copy link
Copy Markdown
Member

What do these changes do?

Adds a PIP ?= python -m pip variable to the Makefile and threads $(PIP) through every install recipe (.update-pip, .install-cython, .install-deps, .develop, install); downstream CI such as yarl can now run make .develop PIP="uv pip" to install via uv without us maintaining a parallel .develop-uv target.

Are there changes in behavior for the user?

No; the default expands to the existing python -m pip invocation, so contributors and existing CI see no difference.

Is it a substantial burden for the maintainers to support this?

No; it is one variable plus five mechanical substitutions, and the default value preserves current behavior.

Related issue number

Follow-up to aio-libs/yarl#1716, which switched yarl's downstream aiohttp test runner to uv but still falls back to pip inside make .develop.

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
    • N/A, Makefile-only knob with no behavior change at the default.
  • Documentation reflects the changes
    • N/A, internal contributor knob.
  • If you provide code modification, please add yourself to CONTRIBUTORS.txt
    • Already listed.
  • Add a new news fragment into the CHANGES/ folder
    • CHANGES/12641.contrib.rst.

Drafted with Claude Code (claude-opus-4-7); reviewed by @bdraco.

@psf-chronographer psf-chronographer Bot added the bot:chronographer:provided There is a change note present in this PR label May 19, 2026
@bdraco bdraco added backport-3.13 backport-3.14 Trigger automatic backporting to the 3.14 release branch by Patchback robot labels May 19, 2026
@codecov

codecov Bot commented May 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.95%. Comparing base (8ea87a1) to head (589136a).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #12641   +/-   ##
=======================================
  Coverage   98.95%   98.95%           
=======================================
  Files         131      131           
  Lines       46476    46476           
  Branches     2410     2410           
=======================================
  Hits        45988    45988           
  Misses        366      366           
  Partials      122      122           
Flag Coverage Δ
Autobahn 22.43% <ø> (ø)
CI-GHA 98.92% <ø> (ø)
OS-Linux 98.67% <ø> (ø)
OS-Windows 97.02% <ø> (+<0.01%) ⬆️
OS-macOS 97.91% <ø> (-0.01%) ⬇️
Py-3.10 98.14% <ø> (ø)
Py-3.11 98.41% <ø> (ø)
Py-3.12 98.49% <ø> (ø)
Py-3.13 98.46% <ø> (-0.01%) ⬇️
Py-3.14 98.48% <ø> (-0.01%) ⬇️
Py-3.14t 97.54% <ø> (ø)
Py-pypy-3.11 97.41% <ø> (ø)
VM-macos 97.91% <ø> (-0.01%) ⬇️
VM-ubuntu 98.67% <ø> (ø)
VM-windows 97.02% <ø> (+<0.01%) ⬆️
cython-coverage 37.75% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bdraco bdraco marked this pull request as ready for review May 19, 2026 02:12
@bdraco bdraco requested review from asvetlov and webknjaz as code owners May 19, 2026 02:12
@codspeed-hq

codspeed-hq Bot commented May 19, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 68 untouched benchmarks
⏩ 72 skipped benchmarks1


Comparing bdraco:makefile-pip-variable (589136a) with master (8ea87a1)

Open in CodSpeed

Footnotes

  1. 72 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@bdraco bdraco merged commit 1aef5d7 into aio-libs:master May 19, 2026
48 of 50 checks passed
@patchback

patchback Bot commented May 19, 2026

Copy link
Copy Markdown
Contributor

Backport to 3.13: 💔 cherry-picking failed — conflicts found

❌ Failed to cleanly apply 1aef5d7 on top of patchback/backports/3.13/1aef5d7021e138fa2297f5cc12e2f370c3614c96/pr-12641

Backporting merged PR #12641 into master

  1. Ensure you have a local repo clone of your fork. Unless you cloned it
    from the upstream, this would be your origin remote.
  2. Make sure you have an upstream repo added as a remote too. In these
    instructions you'll refer to it by the name upstream. If you don't
    have it, here's how you can add it:
    $ git remote add upstream https://github.com/aio-libs/aiohttp.git
  3. Ensure you have the latest copy of upstream and prepare a branch
    that will hold the backported code:
    $ git fetch upstream
    $ git checkout -b patchback/backports/3.13/1aef5d7021e138fa2297f5cc12e2f370c3614c96/pr-12641 upstream/3.13
  4. Now, cherry-pick PR Make pip command configurable via PIP variable in Makefile #12641 contents into that branch:
    $ git cherry-pick -x 1aef5d7021e138fa2297f5cc12e2f370c3614c96
    If it'll yell at you with something like fatal: Commit 1aef5d7021e138fa2297f5cc12e2f370c3614c96 is a merge but no -m option was given., add -m 1 as follows instead:
    $ git cherry-pick -m1 -x 1aef5d7021e138fa2297f5cc12e2f370c3614c96
  5. At this point, you'll probably encounter some merge conflicts. You must
    resolve them in to preserve the patch from PR Make pip command configurable via PIP variable in Makefile #12641 as close to the
    original as possible.
  6. Push this branch to your fork on GitHub:
    $ git push origin patchback/backports/3.13/1aef5d7021e138fa2297f5cc12e2f370c3614c96/pr-12641
  7. Create a PR, ensure that the CI is green. If it's not — update it so that
    the tests and any other checks pass. This is it!
    Now relax and wait for the maintainers to process your pull request
    when they have some cycles to do reviews. Don't worry — they'll tell you if
    any improvements are necessary when the time comes!

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@patchback

patchback Bot commented May 19, 2026

Copy link
Copy Markdown
Contributor

Backport to 3.14: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.14/1aef5d7021e138fa2297f5cc12e2f370c3614c96/pr-12641

Backported as #12642

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-3.14 Trigger automatic backporting to the 3.14 release branch by Patchback robot bot:chronographer:provided There is a change note present in this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant