src/eric7/Documentation/Source/eric7.PipInterface.pipdeptree.html

branch
eric7
changeset 9596
397f385b95d8
parent 9218
71cf3979a6c9
child 9850
20c49b517679
equal deleted inserted replaced
9595:2bd590c40309 9596:397f385b95d8
7 <body> 7 <body>
8 <a NAME="top" ID="top"></a> 8 <a NAME="top" ID="top"></a>
9 <h1>eric7.PipInterface.pipdeptree</h1> 9 <h1>eric7.PipInterface.pipdeptree</h1>
10 10
11 <p> 11 <p>
12 Copyright (c) 2015 Vineet Naik (naikvin@gmail.com) 12 Copyright (c) The pipdeptree developers
13 </p> 13 </p>
14 <p> 14 <p>
15 Permission is hereby granted, free of charge, to any person obtaining 15 Permission is hereby granted, free of charge, to any person obtaining
16 a copy of this software and associated documentation files (the 16 a copy of this software and associated documentation files (the
17 "Software"), to deal in the Software without restriction, including 17 "Software"), to deal in the Software without restriction, including
139 <td><a href="#render_text">render_text</a></td> 139 <td><a href="#render_text">render_text</a></td>
140 <td>Print tree as text on console</td> 140 <td>Print tree as text on console</td>
141 </tr> 141 </tr>
142 <tr> 142 <tr>
143 <td><a href="#sorted_tree">sorted_tree</a></td> 143 <td><a href="#sorted_tree">sorted_tree</a></td>
144 <td>Sorts the dict representation of the tree</td> 144 <td>Sorts the dict representation of the tree.</td>
145 </tr> 145 </tr>
146 </table> 146 </table>
147 <hr /> 147 <hr />
148 <hr /> 148 <hr />
149 <a NAME="DistPackage" ID="DistPackage"></a> 149 <a NAME="DistPackage" ID="DistPackage"></a>
150 <h2>DistPackage</h2> 150 <h2>DistPackage</h2>
151 151
152 <p> 152 <p>
153 Wrapper class for pkg_resources.Distribution instances 153 Wrapper class for pkg_resources.Distribution instances
154 </p> 154 </p>
155 <p> 155 <p>
156 :param obj: pkg_resources.Distribution to wrap over 156 :param obj: pkg_resources.Distribution to wrap over
157 :param req: optional ReqPackage object to associate this 157 :param req: optional ReqPackage object to associate this DistPackage with. This is useful for displaying the tree
158 DistPackage with. This is useful for displaying the 158 in reverse
159 tree in reverse
160 </p> 159 </p>
161 <h3>Derived from</h3> 160 <h3>Derived from</h3>
162 Package 161 Package
163 <h3>Class Attributes</h3> 162 <h3>Class Attributes</h3>
164 163
182 <td><a href="#DistPackage.as_dict">as_dict</a></td> 181 <td><a href="#DistPackage.as_dict">as_dict</a></td>
183 <td></td> 182 <td></td>
184 </tr> 183 </tr>
185 <tr> 184 <tr>
186 <td><a href="#DistPackage.as_parent_of">as_parent_of</a></td> 185 <td><a href="#DistPackage.as_parent_of">as_parent_of</a></td>
187 <td>Return a DistPackage instance associated to a requirement</td> 186 <td>Return a DistPackage instance associated to a requirement.</td>
188 </tr> 187 </tr>
189 <tr> 188 <tr>
190 <td><a href="#DistPackage.as_requirement">as_requirement</a></td> 189 <td><a href="#DistPackage.as_requirement">as_requirement</a></td>
191 <td>Return a ReqPackage representation of this DistPackage</td> 190 <td>Return a ReqPackage representation of this DistPackage</td>
192 </tr> 191 </tr>
216 <a NAME="DistPackage.as_parent_of" ID="DistPackage.as_parent_of"></a> 215 <a NAME="DistPackage.as_parent_of" ID="DistPackage.as_parent_of"></a>
217 <h4>DistPackage.as_parent_of</h4> 216 <h4>DistPackage.as_parent_of</h4>
218 <b>as_parent_of</b>(<i>req</i>) 217 <b>as_parent_of</b>(<i>req</i>)
219 218
220 <p> 219 <p>
221 Return a DistPackage instance associated to a requirement 220 Return a DistPackage instance associated to a requirement. This association is necessary for reversing the
222 </p> 221 PackageDAG.
223 <p> 222 </p>
224 This association is necessary for reversing the PackageDAG. 223 <p>
225 </p> 224 If `req` is None, and the `req` attribute of the current instance is also None, then the same instance will be
226 <p>
227 If `req` is None, and the `req` attribute of the current
228 instance is also None, then the same instance will be
229 returned. 225 returned.
230 </p> 226 </p>
231 <p> 227 <p>
232 :param ReqPackage req: the requirement to associate with 228 :param ReqPackage req: the requirement to associate with
233 :returns: DistPackage instance 229 :returns: DistPackage instance
234 </p>
235 <p>
236
237 </p> 230 </p>
238 <a NAME="DistPackage.as_requirement" ID="DistPackage.as_requirement"></a> 231 <a NAME="DistPackage.as_requirement" ID="DistPackage.as_requirement"></a>
239 <h4>DistPackage.as_requirement</h4> 232 <h4>DistPackage.as_requirement</h4>
240 <b>as_requirement</b>(<i></i>) 233 <b>as_requirement</b>(<i></i>)
241 234
255 <hr /> 248 <hr />
256 <a NAME="Package" ID="Package"></a> 249 <a NAME="Package" ID="Package"></a>
257 <h2>Package</h2> 250 <h2>Package</h2>
258 251
259 <p> 252 <p>
260 Abstract class for wrappers around objects that pip returns. 253 Abstract class for wrappers around objects that pip returns. This class needs to be subclassed with implementations
261 </p> 254 for `render_as_root` and `render_as_branch` methods.
262 <p>
263 This class needs to be subclassed with implementations for
264 `render_as_root` and `render_as_branch` methods.
265 </p>
266 <p>
267
268 </p> 255 </p>
269 <h3>Derived from</h3> 256 <h3>Derived from</h3>
270 object 257 None
271 <h3>Class Attributes</h3> 258 <h3>Class Attributes</h3>
272 259
273 <table> 260 <table>
274 <tr><td>None</td></tr> 261 <tr><td>None</td></tr>
275 </table> 262 </table>
358 <hr /> 345 <hr />
359 <a NAME="PackageDAG" ID="PackageDAG"></a> 346 <a NAME="PackageDAG" ID="PackageDAG"></a>
360 <h2>PackageDAG</h2> 347 <h2>PackageDAG</h2>
361 348
362 <p> 349 <p>
363 Representation of Package dependencies as directed acyclic graph 350 Representation of Package dependencies as directed acyclic graph using a dict (Mapping) as the underlying
364 using a dict (Mapping) as the underlying datastructure. 351 datastructure.
365 </p> 352 </p>
366 <p> 353 <p>
367 The nodes and their relationships (edges) are internally 354 The nodes and their relationships (edges) are internally stored using a map as follows,
368 stored using a map as follows,
369 </p> 355 </p>
370 <p> 356 <p>
371 {a: [b, c], 357 {a: [b, c],
372 b: [d], 358 b: [d],
373 c: [d, e], 359 c: [d, e],
375 e: [], 361 e: [],
376 f: [b], 362 f: [b],
377 g: [e, f]} 363 g: [e, f]}
378 </p> 364 </p>
379 <p> 365 <p>
380 Here, node `a` has 2 children nodes `b` and `c`. Consider edge 366 Here, node `a` has 2 children nodes `b` and `c`. Consider edge direction from `a` -> `b` and `a` -> `c`
381 direction from `a` -> `b` and `a` -> `c` respectively. 367 respectively.
382 </p> 368 </p>
383 <p> 369 <p>
384 A node is expected to be an instance of a subclass of 370 A node is expected to be an instance of a subclass of `Package`. The keys are must be of class `DistPackage` and
385 `Package`. The keys are must be of class `DistPackage` and each 371 each item in values must be of class `ReqPackage`. (See also ReversedPackageDAG where the key and value types are
386 item in values must be of class `ReqPackage`. (See also
387 ReversedPackageDAG where the key and value types are
388 interchanged). 372 interchanged).
389 </p>
390 <p>
391
392 </p> 373 </p>
393 <h3>Derived from</h3> 374 <h3>Derived from</h3>
394 Mapping 375 Mapping
395 <h3>Class Attributes</h3> 376 <h3>Class Attributes</h3>
396 377
430 <td><a href="#PackageDAG.filter">filter</a></td> 411 <td><a href="#PackageDAG.filter">filter</a></td>
431 <td>Filters nodes in a graph by given parameters</td> 412 <td>Filters nodes in a graph by given parameters</td>
432 </tr> 413 </tr>
433 <tr> 414 <tr>
434 <td><a href="#PackageDAG.get_children">get_children</a></td> 415 <td><a href="#PackageDAG.get_children">get_children</a></td>
435 <td>Get child nodes for a node by it's key</td> 416 <td>Get child nodes for a node by its key</td>
436 </tr> 417 </tr>
437 <tr> 418 <tr>
438 <td><a href="#PackageDAG.get_node_as_parent">get_node_as_parent</a></td> 419 <td><a href="#PackageDAG.get_node_as_parent">get_node_as_parent</a></td>
439 <td>Get the node from the keys of the dict representing the DAG.</td> 420 <td>Get the node from the keys of the dict representing the DAG.</td>
440 </tr> 421 </tr>
441 <tr> 422 <tr>
442 <td><a href="#PackageDAG.reverse">reverse</a></td> 423 <td><a href="#PackageDAG.reverse">reverse</a></td>
443 <td>Reverse the DAG, or turn it upside-down</td> 424 <td>Reverse the DAG, or turn it upside-down.</td>
444 </tr> 425 </tr>
445 <tr> 426 <tr>
446 <td><a href="#PackageDAG.sort">sort</a></td> 427 <td><a href="#PackageDAG.sort">sort</a></td>
447 <td>Return sorted tree in which the underlying _obj dict is an OrderedDict, sorted alphabetically by the keys</td> 428 <td>Return sorted tree in which the underlying _obj dict is an dict, sorted alphabetically by the keys.</td>
448 </tr> 429 </tr>
449 </table> 430 </table>
450 <h3>Static Methods</h3> 431 <h3>Static Methods</h3>
451 432
452 <table> 433 <table>
487 <a NAME="PackageDAG.filter" ID="PackageDAG.filter"></a> 468 <a NAME="PackageDAG.filter" ID="PackageDAG.filter"></a>
488 <h4>PackageDAG.filter</h4> 469 <h4>PackageDAG.filter</h4>
489 <b>filter</b>(<i>include, exclude</i>) 470 <b>filter</b>(<i>include, exclude</i>)
490 471
491 <p> 472 <p>
492 Filters nodes in a graph by given parameters 473 Filters nodes in a graph by given parameters
493 </p> 474 </p>
494 <p> 475 <p>
495 If a node is included, then all it's children are also 476 If a node is included, then all it's children are also included.
496 included.
497 </p> 477 </p>
498 <p> 478 <p>
499 :param set include: set of node keys to include (or None) 479 :param set include: set of node keys to include (or None)
500 :param set exclude: set of node keys to exclude (or None) 480 :param set exclude: set of node keys to exclude (or None)
501 :returns: filtered version of the graph 481 :returns: filtered version of the graph
502 :rtype: PackageDAG 482 :rtype: PackageDAG
503 </p> 483 </p>
504 <p>
505
506 </p>
507 <a NAME="PackageDAG.get_children" ID="PackageDAG.get_children"></a> 484 <a NAME="PackageDAG.get_children" ID="PackageDAG.get_children"></a>
508 <h4>PackageDAG.get_children</h4> 485 <h4>PackageDAG.get_children</h4>
509 <b>get_children</b>(<i>node_key</i>) 486 <b>get_children</b>(<i>node_key</i>)
510 487
511 <p> 488 <p>
512 Get child nodes for a node by it's key 489 Get child nodes for a node by its key
513 </p> 490 </p>
514 <p> 491 <p>
515 :param str node_key: key of the node to get children of 492 :param str node_key: key of the node to get children of
516 :returns: list of child nodes 493 :returns: list of child nodes
517 :rtype: ReqPackage[] 494 :rtype: ReqPackage[]
518 </p> 495 </p>
519 <p>
520
521 </p>
522 <a NAME="PackageDAG.get_node_as_parent" ID="PackageDAG.get_node_as_parent"></a> 496 <a NAME="PackageDAG.get_node_as_parent" ID="PackageDAG.get_node_as_parent"></a>
523 <h4>PackageDAG.get_node_as_parent</h4> 497 <h4>PackageDAG.get_node_as_parent</h4>
524 <b>get_node_as_parent</b>(<i>node_key</i>) 498 <b>get_node_as_parent</b>(<i>node_key</i>)
525 499
526 <p> 500 <p>
527 Get the node from the keys of the dict representing the DAG. 501 Get the node from the keys of the dict representing the DAG.
528 </p> 502 </p>
529 <p> 503 <p>
530 This method is useful if the dict representing the DAG 504 This method is useful if the dict representing the DAG contains different kind of objects in keys and values.
531 contains different kind of objects in keys and values. Use 505 Use this method to look up a node obj as a parent (from the keys of the dict) given a node key.
532 this method to lookup a node obj as a parent (from the keys of
533 the dict) given a node key.
534 </p> 506 </p>
535 <p> 507 <p>
536 :param node_key: identifier corresponding to key attr of node obj 508 :param node_key: identifier corresponding to key attr of node obj
537 :returns: node obj (as present in the keys of the dict) 509 :returns: node obj (as present in the keys of the dict)
538 :rtype: Object 510 :rtype: Object
539 </p> 511 </p>
540 <p>
541
542 </p>
543 <a NAME="PackageDAG.reverse" ID="PackageDAG.reverse"></a> 512 <a NAME="PackageDAG.reverse" ID="PackageDAG.reverse"></a>
544 <h4>PackageDAG.reverse</h4> 513 <h4>PackageDAG.reverse</h4>
545 <b>reverse</b>(<i></i>) 514 <b>reverse</b>(<i></i>)
546 515
547 <p> 516 <p>
548 Reverse the DAG, or turn it upside-down 517 Reverse the DAG, or turn it upside-down.
549 </p> 518 </p>
550 <p> 519 <p>
551 In other words, the directions of edges of the nodes in the 520 In other words, the directions of edges of the nodes in the DAG will be reversed.
552 DAG will be reversed. 521 </p>
553 </p> 522 <p>
554 <p> 523 Note that this function purely works on the nodes in the graph. This implies that to perform a combination of
555 Note that this function purely works on the nodes in the 524 filtering and reversing, the order in which `filter` and `reverse` methods should be applied is important. For
556 graph. This implies that to perform a combination of filtering 525 e.g., if reverse is called on a filtered graph, then only the filtered nodes and it's children will be
557 and reversing, the order in which `filter` and `reverse` 526 considered when reversing. On the other hand, if filter is called on reversed DAG, then the definition of
558 methods should be applied is important. For eg. if reverse is 527 "child" nodes is as per the reversed DAG.
559 called on a filtered graph, then only the filtered nodes and
560 it's children will be considered when reversing. On the other
561 hand, if filter is called on reversed DAG, then the definition
562 of "child" nodes is as per the reversed DAG.
563 </p> 528 </p>
564 <p> 529 <p>
565 :returns: DAG in the reversed form 530 :returns: DAG in the reversed form
566 :rtype: ReversedPackageDAG 531 :rtype: ReversedPackageDAG
567 </p>
568 <p>
569
570 </p> 532 </p>
571 <a NAME="PackageDAG.sort" ID="PackageDAG.sort"></a> 533 <a NAME="PackageDAG.sort" ID="PackageDAG.sort"></a>
572 <h4>PackageDAG.sort</h4> 534 <h4>PackageDAG.sort</h4>
573 <b>sort</b>(<i></i>) 535 <b>sort</b>(<i></i>)
574 536
575 <p> 537 <p>
576 Return sorted tree in which the underlying _obj dict is an 538 Return sorted tree in which the underlying _obj dict is an dict, sorted alphabetically by the keys.
577 OrderedDict, sorted alphabetically by the keys 539 </p>
578 </p> 540 <p>
579 <p> 541 :returns: Instance of same class with dict
580 :returns: Instance of same class with OrderedDict
581 </p>
582 <p>
583
584 </p> 542 </p>
585 <div align="right"><a href="#top">Up</a></div> 543 <div align="right"><a href="#top">Up</a></div>
586 <hr /> 544 <hr />
587 <hr /> 545 <hr />
588 <a NAME="ReqPackage" ID="ReqPackage"></a> 546 <a NAME="ReqPackage" ID="ReqPackage"></a>
589 <h2>ReqPackage</h2> 547 <h2>ReqPackage</h2>
590 548
591 <p> 549 <p>
592 Wrapper class for Requirements instance 550 Wrapper class for Requirements instance
593 </p> 551 </p>
594 <p> 552 <p>
595 :param obj: The `Requirements` instance to wrap over 553 :param obj: The `Requirements` instance to wrap over
596 :param dist: optional `pkg_resources.Distribution` instance for 554 :param dist: optional `pkg_resources.Distribution` instance for this requirement
597 this requirement
598 </p> 555 </p>
599 <h3>Derived from</h3> 556 <h3>Derived from</h3>
600 Package 557 Package
601 <h3>Class Attributes</h3> 558 <h3>Class Attributes</h3>
602 559
691 <hr /> 648 <hr />
692 <a NAME="ReversedPackageDAG" ID="ReversedPackageDAG"></a> 649 <a NAME="ReversedPackageDAG" ID="ReversedPackageDAG"></a>
693 <h2>ReversedPackageDAG</h2> 650 <h2>ReversedPackageDAG</h2>
694 651
695 <p> 652 <p>
696 Representation of Package dependencies in the reverse 653 Representation of Package dependencies in the reverse order.
697 order. 654 </p>
698 </p> 655 <p>
699 <p> 656 Similar to it's super class `PackageDAG`, the underlying datastructure is a dict, but here the keys are expected to
700 Similar to it's super class `PackageDAG`, the underlying 657 be of type `ReqPackage` and each item in the values of type `DistPackage`.
701 datastructure is a dict, but here the keys are expected to be of 658 </p>
702 type `ReqPackage` and each item in the values of type 659 <p>
703 `DistPackage`. 660 Typically, this object will be obtained by calling `PackageDAG.reverse`.
704 </p>
705 <p>
706 Typically, this object will be obtained by calling
707 `PackageDAG.reverse`.
708 </p>
709 <p>
710
711 </p> 661 </p>
712 <h3>Derived from</h3> 662 <h3>Derived from</h3>
713 PackageDAG 663 PackageDAG
714 <h3>Class Attributes</h3> 664 <h3>Class Attributes</h3>
715 665
739 <a NAME="ReversedPackageDAG.reverse" ID="ReversedPackageDAG.reverse"></a> 689 <a NAME="ReversedPackageDAG.reverse" ID="ReversedPackageDAG.reverse"></a>
740 <h4>ReversedPackageDAG.reverse</h4> 690 <h4>ReversedPackageDAG.reverse</h4>
741 <b>reverse</b>(<i></i>) 691 <b>reverse</b>(<i></i>)
742 692
743 <p> 693 <p>
744 Reverse the already reversed DAG to get the PackageDAG again 694 Reverse the already reversed DAG to get the PackageDAG again
745 </p> 695 </p>
746 <p> 696 <p>
747 :returns: reverse of the reversed DAG 697 :returns: reverse of the reversed DAG
748 :rtype: PackageDAG 698 :rtype: PackageDAG
749 </p>
750 <p>
751
752 </p> 699 </p>
753 <div align="right"><a href="#top">Up</a></div> 700 <div align="right"><a href="#top">Up</a></div>
754 <hr /> 701 <hr />
755 <hr /> 702 <hr />
756 <a NAME="_get_args" ID="_get_args"></a> 703 <a NAME="_get_args" ID="_get_args"></a>
760 <div align="right"><a href="#top">Up</a></div> 707 <div align="right"><a href="#top">Up</a></div>
761 <hr /> 708 <hr />
762 <hr /> 709 <hr />
763 <a NAME="aux" ID="aux"></a> 710 <a NAME="aux" ID="aux"></a>
764 <h2>aux</h2> 711 <h2>aux</h2>
765 <b>aux</b>(<i>node, parent=None, indent=0, chain=None</i>) 712 <b>aux</b>(<i>node, parent=None, indent=0, cur_chain=None</i>)
766 713
767 <div align="right"><a href="#top">Up</a></div> 714 <div align="right"><a href="#top">Up</a></div>
768 <hr /> 715 <hr />
769 <hr /> 716 <hr />
770 <a NAME="aux_1" ID="aux_1"></a> 717 <a NAME="aux_1" ID="aux_1"></a>
771 <h2>aux</h2> 718 <h2>aux</h2>
772 <b>aux</b>(<i>node, parent=None, chain=None</i>) 719 <b>aux</b>(<i>node, parent=None, cur_chain=None</i>)
773 720
774 <div align="right"><a href="#top">Up</a></div> 721 <div align="right"><a href="#top">Up</a></div>
775 <hr /> 722 <hr />
776 <hr /> 723 <hr />
777 <a NAME="conflicting_deps" ID="conflicting_deps"></a> 724 <a NAME="conflicting_deps" ID="conflicting_deps"></a>
778 <h2>conflicting_deps</h2> 725 <h2>conflicting_deps</h2>
779 <b>conflicting_deps</b>(<i>tree</i>) 726 <b>conflicting_deps</b>(<i>tree</i>)
780 727
781 <p> 728 <p>
782 Returns dependencies which are not present or conflict with the 729 Returns dependencies which are not present or conflict with the requirements of other packages.
783 requirements of other packages.
784 </p> 730 </p>
785 <p> 731 <p>
786 e.g. will warn if pkg1 requires pkg2==2.0 and pkg2==1.0 is installed 732 e.g. will warn if pkg1 requires pkg2==2.0 and pkg2==1.0 is installed
787 </p> 733 </p>
788 <p> 734 <p>
789 :param tree: the requirements tree (dict) 735 :param tree: the requirements tree (dict)
790 :returns: dict of DistPackage -> list of unsatisfied/unknown ReqPackage 736 :returns: dict of DistPackage -> list of unsatisfied/unknown ReqPackage
791 :rtype: dict 737 :rtype: dict
792 </p> 738 </p>
793 <p>
794
795 </p>
796 <div align="right"><a href="#top">Up</a></div> 739 <div align="right"><a href="#top">Up</a></div>
797 <hr /> 740 <hr />
798 <hr /> 741 <hr />
799 <a NAME="cyclic_deps" ID="cyclic_deps"></a> 742 <a NAME="cyclic_deps" ID="cyclic_deps"></a>
800 <h2>cyclic_deps</h2> 743 <h2>cyclic_deps</h2>
801 <b>cyclic_deps</b>(<i>tree</i>) 744 <b>cyclic_deps</b>(<i>tree</i>)
802 745
803 <p> 746 <p>
804 Return cyclic dependencies as list of tuples 747 Return cyclic dependencies as list of tuples
805 </p> 748 </p>
806 <p> 749 <p>
807 :param PackageDAG pkgs: package tree/dag 750 :param PackageDAG tree: package tree/dag
808 :returns: list of tuples representing cyclic dependencies 751 :returns: list of tuples representing cyclic dependencies
809 :rtype: list 752 :rtype: list
810 </p> 753 </p>
811 <p>
812
813 </p>
814 <div align="right"><a href="#top">Up</a></div> 754 <div align="right"><a href="#top">Up</a></div>
815 <hr /> 755 <hr />
816 <hr /> 756 <hr />
817 <a NAME="dump_graphviz" ID="dump_graphviz"></a> 757 <a NAME="dump_graphviz" ID="dump_graphviz"></a>
818 <h2>dump_graphviz</h2> 758 <h2>dump_graphviz</h2>
819 <b>dump_graphviz</b>(<i>tree, output_format='dot', is_reverse=False</i>) 759 <b>dump_graphviz</b>(<i>tree, output_format="dot", is_reverse=False</i>)
820 760
821 <p> 761 <p>
822 Output dependency graph as one of the supported GraphViz output formats. 762 Output dependency graph as one of the supported GraphViz output formats.
823 </p> 763 </p>
824 <p> 764 <p>
825 :param dict tree: dependency graph 765 :param dict tree: dependency graph
826 :param string output_format: output format 766 :param string output_format: output format
767 :param bool is_reverse: reverse or not
827 :returns: representation of tree in the specified output format 768 :returns: representation of tree in the specified output format
828 :rtype: str or binary representation depending on the output format 769 :rtype: str or binary representation depending on the output format
829 </p> 770 </p>
830 <p> 771 <p>
831 772
854 <div align="right"><a href="#top">Up</a></div> 795 <div align="right"><a href="#top">Up</a></div>
855 <hr /> 796 <hr />
856 <hr /> 797 <hr />
857 <a NAME="guess_version" ID="guess_version"></a> 798 <a NAME="guess_version" ID="guess_version"></a>
858 <h2>guess_version</h2> 799 <h2>guess_version</h2>
859 <b>guess_version</b>(<i>pkg_key, default='?'</i>) 800 <b>guess_version</b>(<i>pkg_key, default="?"</i>)
860 801
861 <p> 802 <p>
862 Guess the version of a pkg when pip doesn't provide it 803 Guess the version of a pkg when pip doesn't provide it
863 </p> 804 </p>
864 <p> 805 <p>
865 :param str pkg_key: key of the package 806 :param str pkg_key: key of the package
866 :param str default: default version to return if unable to find 807 :param str default: default version to return if unable to find
867 :returns: version 808 :returns: version
868 :rtype: string 809 :rtype: string
869 </p> 810 </p>
870 <p>
871
872 </p>
873 <div align="right"><a href="#top">Up</a></div> 811 <div align="right"><a href="#top">Up</a></div>
874 <hr /> 812 <hr />
875 <hr /> 813 <hr />
876 <a NAME="handle_non_host_target" ID="handle_non_host_target"></a> 814 <a NAME="handle_non_host_target" ID="handle_non_host_target"></a>
877 <h2>handle_non_host_target</h2> 815 <h2>handle_non_host_target</h2>
890 <a NAME="print_graphviz" ID="print_graphviz"></a> 828 <a NAME="print_graphviz" ID="print_graphviz"></a>
891 <h2>print_graphviz</h2> 829 <h2>print_graphviz</h2>
892 <b>print_graphviz</b>(<i>dump_output</i>) 830 <b>print_graphviz</b>(<i>dump_output</i>)
893 831
894 <p> 832 <p>
895 Dump the data generated by GraphViz to stdout. 833 Dump the data generated by GraphViz to stdout.
896 </p> 834 </p>
897 <p> 835 <p>
898 :param dump_output: The output from dump_graphviz 836 :param dump_output: The output from dump_graphviz
899 </p> 837 </p>
900 <div align="right"><a href="#top">Up</a></div> 838 <div align="right"><a href="#top">Up</a></div>
917 <a NAME="render_json" ID="render_json"></a> 855 <a NAME="render_json" ID="render_json"></a>
918 <h2>render_json</h2> 856 <h2>render_json</h2>
919 <b>render_json</b>(<i>tree, indent</i>) 857 <b>render_json</b>(<i>tree, indent</i>)
920 858
921 <p> 859 <p>
922 Converts the tree into a flat json representation. 860 Converts the tree into a flat json representation.
923 </p> 861 </p>
924 <p> 862 <p>
925 The json repr will be a list of hashes, each hash having 2 fields: 863 The json repr will be a list of hashes, each hash having 2 fields:
926 - package 864 - package
927 - dependencies: list of dependencies 865 - dependencies: list of dependencies
930 :param dict tree: dependency tree 868 :param dict tree: dependency tree
931 :param int indent: no. of spaces to indent json 869 :param int indent: no. of spaces to indent json
932 :returns: json representation of the tree 870 :returns: json representation of the tree
933 :rtype: str 871 :rtype: str
934 </p> 872 </p>
935 <p>
936
937 </p>
938 <div align="right"><a href="#top">Up</a></div> 873 <div align="right"><a href="#top">Up</a></div>
939 <hr /> 874 <hr />
940 <hr /> 875 <hr />
941 <a NAME="render_json_tree" ID="render_json_tree"></a> 876 <a NAME="render_json_tree" ID="render_json_tree"></a>
942 <h2>render_json_tree</h2> 877 <h2>render_json_tree</h2>
943 <b>render_json_tree</b>(<i>tree, indent</i>) 878 <b>render_json_tree</b>(<i>tree, indent</i>)
944 879
945 <p> 880 <p>
946 Converts the tree into a nested json representation. 881 Converts the tree into a nested json representation.
947 </p> 882 </p>
948 <p> 883 <p>
949 The json repr will be a list of hashes, each hash having the following fields: 884 The json repr will be a list of hashes, each hash having the following fields:
885 </p>
886 <p>
950 - package_name 887 - package_name
951 - key 888 - key
952 - required_version 889 - required_version
953 - installed_version 890 - installed_version
954 - dependencies: list of dependencies 891 - dependencies: list of dependencies
957 :param dict tree: dependency tree 894 :param dict tree: dependency tree
958 :param int indent: no. of spaces to indent json 895 :param int indent: no. of spaces to indent json
959 :returns: json representation of the tree 896 :returns: json representation of the tree
960 :rtype: str 897 :rtype: str
961 </p> 898 </p>
962 <p>
963
964 </p>
965 <div align="right"><a href="#top">Up</a></div> 899 <div align="right"><a href="#top">Up</a></div>
966 <hr /> 900 <hr />
967 <hr /> 901 <hr />
968 <a NAME="render_text" ID="render_text"></a> 902 <a NAME="render_text" ID="render_text"></a>
969 <h2>render_text</h2> 903 <h2>render_text</h2>
972 <p> 906 <p>
973 Print tree as text on console 907 Print tree as text on console
974 </p> 908 </p>
975 <p> 909 <p>
976 :param dict tree: the package tree 910 :param dict tree: the package tree
977 :param bool list_all: whether to list all the pgks at the root 911 :param bool list_all: whether to list all the pgks at the root level or only those that are the sub-dependencies
978 level or only those that are the 912 :param bool frozen: show the names of the pkgs in the output that's favourable to pip --freeze
979 sub-dependencies
980 :param bool frozen: whether or not show the names of the pkgs in
981 the output that's favourable to pip --freeze
982 :returns: None 913 :returns: None
983 </p> 914 </p>
984 <p> 915 <p>
985 916
986 </p> 917 </p>
990 <a NAME="sorted_tree" ID="sorted_tree"></a> 921 <a NAME="sorted_tree" ID="sorted_tree"></a>
991 <h2>sorted_tree</h2> 922 <h2>sorted_tree</h2>
992 <b>sorted_tree</b>(<i>tree</i>) 923 <b>sorted_tree</b>(<i>tree</i>)
993 924
994 <p> 925 <p>
995 Sorts the dict representation of the tree 926 Sorts the dict representation of the tree. The root packages as well as the intermediate packages are sorted in the
996 </p> 927 alphabetical order of the package names.
997 <p> 928 </p>
998 The root packages as well as the intermediate packages are sorted 929 <p>
999 in the alphabetical order of the package names. 930 :param dict tree: the pkg dependency tree obtained by calling `construct_tree` function
1000 </p>
1001 <p>
1002 :param dict tree: the pkg dependency tree obtained by calling
1003 `construct_tree` function
1004 :returns: sorted tree 931 :returns: sorted tree
1005 :rtype: collections.OrderedDict 932 :rtype: dict
1006 </p>
1007 <p>
1008
1009 </p> 933 </p>
1010 <div align="right"><a href="#top">Up</a></div> 934 <div align="right"><a href="#top">Up</a></div>
1011 <hr /> 935 <hr />
1012 </body></html> 936 </body></html>

eric ide

mercurial