Skip to content

wppm --top-level -v , to clean or create a requirements.txt - #2081

Merged
stonebig merged 7 commits into
winpython:masterfrom
stonebig:master
Aug 13, 2026
Merged

wppm --top-level -v , to clean or create a requirements.txt#2081
stonebig merged 7 commits into
winpython:masterfrom
stonebig:master

Conversation

@stonebig

Copy link
Copy Markdown
Contributor

from a never-ending problem to no more a problem

stonebig and others added 7 commits August 13, 2026 17:31
Given a requirements file, drop every entry another entry already brings
in, sort the rest, and comment out what went and why. Given no file, the
same question over what is installed. An optional dependency counts only
where its extra is asked for; a mutual pair keeps both members.

Reading a wheelhouse now skips an archive carrying no metadata instead
of losing the directory with it, and keeps the newest version of a
package where several are present, so the answer stops depending on the
order the files were listed in.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
pip already has --root (an alternate install prefix), one character away,
and "root" reads as the superuser before it reads as a graph node.
"Top level" is the term pipdeptree uses for the same set, so the word is
one its users have already met.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The output is meant to become the requirements file, so plainly it is
that file: the entries, and the notes the source carried, which are its
author's and not ours. Counts and warnings go to stderr, where a
redirection leaves them behind; -v puts the reasoning back on stdout.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
They describe a requirements file and someone will eventually fold both
streams into one; a "# " costs nothing there and reads the same in a
terminal.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Adds -tl / --top-level: keep only the entries no other entry pulls in.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The -v header read "with every entry / another one already pulls in
commented out", a sentence broken where it made no sense. It now carries
the source and a timestamp, then the very counts stderr prints -- one
wording, from top_level_summary(), for both. Under -v stderr stays quiet
rather than repeating them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@stonebig
stonebig merged commit 884cef2 into winpython:master Aug 13, 2026
2 checks passed
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.

1 participant