Skip to content

Commit 8a5b811

Browse files
stonebigclaude
andcommitted
fix wppm -p pkg[.] showing only the last extra, and make -p -l0 a true one-liner
- down(): the results accumulation had moved outside the per-extra loop, so only the alphabetically last extra was displayed - wppm -p -l0 now means depth 0 like wppm -r -l0 (was silently depth 2) - missing-dependency '==?' lines now respect the requested depth - bump wppm version to 17.7.20260716 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 0776758 commit 8a5b811

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

‎wppm/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@
2828
OTHER DEALINGS IN THE SOFTWARE.
2929
"""
3030

31-
__version__ = '17.7.20260715'
31+
__version__ = '17.7.20260716'
3232
__license__ = __doc__
3333
__project_url__ = 'http://winpython.github.io/'

‎wppm/piptree.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ def _get_dependency_tree(self, package_name: str, extra: str = "", version_req:
246246
verbose=verbose,
247247
upward=upward,
248248
)
249-
elif not upward and (not dependency.get("req_marker") or self._marker_true(dependency["req_marker"], extra)):
249+
elif not upward and len(path) < depth and (not dependency.get("req_marker") or self._marker_true(dependency["req_marker"], extra)):
250250
# not there but was required
251251
wall_hit += " "
252252
ret += [[f'{dependency["req_key"]}==? {dependency["req_version"]}']]
@@ -269,9 +269,10 @@ def down(self, ppw: str = "", extra: str = "", depth: int = 20, indent: int = 4,
269269
if extra == ".":
270270
for one_extra in sorted(self.distro[p]["provides"]):
271271
a = self._get_dependency_tree(p, one_extra, version_req, depth, verbose=verbose, ppend=ppend)
272+
results += a if (len(a[0])>1 or ppend=="") else []
272273
else:
273274
a = self._get_dependency_tree(p, extra, version_req, depth, verbose=verbose, ppend=ppend)
274-
results += a if (len(a[0])>1 or ppend=="") else []
275+
results += a if (len(a[0])>1 or ppend=="") else []
275276
rawtext = json.dumps(results, indent=indent)
276277
lines = [l[2*indent:] for l in rawtext.split("\n") if len(l.strip()) > 2]
277278
return "\n".join(lines).replace('"', "")

‎wppm/wppm.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ def main(test=False):
298298
pip = piptree.PipData(targetpython, args.wheelsource)
299299
for args_fname in args.fname:
300300
pack, extra, *other = (args_fname + "[").replace("]", "[").split("[")
301-
print(pip.down(pack, extra, args.levels if args.levels>0 else 2, verbose=args.verbose))
301+
print(pip.down(pack, extra, args.levels if args.levels>=0 else 2, verbose=args.verbose))
302302
sys.exit()
303303
elif args.pipup:
304304
pip = piptree.PipData(targetpython, args.wheelsource)

0 commit comments

Comments
 (0)