eric7.PipInterface.piplicenses
pip-licenses
MIT License
Copyright (c) 2018 raimon
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Global Attributes
DEFAULT_OUTPUT_FIELDS |
FIELDS_TO_METADATA_KEYS |
FIELD_NAMES |
LICENSE_UNKNOWN |
MAP_DEST_TO_ENUM |
METADATA_KEYS |
PATTERN_DELIMITER |
SUMMARY_FIELD_NAMES |
SUMMARY_OUTPUT_FIELDS |
SYSTEM_PACKAGES |
__author__ |
__license__ |
__pkgname__ |
__summary__ |
__url__ |
__version__ |
importlib_metadata |
Classes
Functions
CompatibleArgumentParser
Derived from
argparse.ArgumentParser
Class Attributes
Class Methods
Methods
Static Methods
CompatibleArgumentParser._verify_args
_verify_args(args: CustomNamespace)
CompatibleArgumentParser.parse_args
parse_args(args: None | Sequence[str] = None, namespace: None | CustomNamespace = None, )
CustomHelpFormatter
Derived from
argparse.HelpFormatter
Class Attributes
Class Methods
Methods
Static Methods
CustomHelpFormatter (Constructor)
CustomHelpFormatter(prog: str, indent_increment: int = 2, max_help_position: int = 24, width: Optional[int] = None, )
CustomHelpFormatter._expand_help
_expand_help(action: argparse.Action)
CustomHelpFormatter._format_action
_format_action(action: argparse.Action)
CustomHelpFormatter._split_lines
_split_lines(text: str, width: int)
CustomNamespace
Derived from
argparse.Namespace
Class Attributes
allow_only |
fail_on |
filter_code_page |
filter_strings |
from_ |
ignore_packages |
no_license_path |
order |
output_file |
packages |
summary |
with_authors |
with_description |
with_license_file |
with_notice_file |
with_system |
with_urls |
Class Methods
Methods
Static Methods
FromArg
Derived from
NoValueEnum
Class Attributes
ALL |
CLASSIFIER |
META |
MIXED |
Class Methods
Methods
Static Methods
NoValueEnum
Derived from
Enum
Class Attributes
Class Methods
Methods
Static Methods
NoValueEnum.__repr__
__repr__()
OrderArg
Derived from
NoValueEnum
Class Attributes
AUTHOR |
COUNT |
LICENSE |
MAINTAINER |
NAME |
URL |
Class Methods
Methods
Static Methods
SelectAction
Derived from
argparse.Action
Class Attributes
Class Methods
Methods
Static Methods
SelectAction.__call__
__call__(parser: argparse.ArgumentParser, namespace: argparse.Namespace, values: str, option_string: Optional[str] = None, )
case_insensitive_set_diff
case_insensitive_set_diff(set_a, set_b)
Same as set.difference() but case-insensitive
case_insensitive_set_intersect
case_insensitive_set_intersect(set_a, set_b)
Same as set.intersection() but case-insensitive
choices_from_enum
choices_from_enum(enum_cls: Type[NoValueEnum])
create_licenses_list
create_licenses_list(args: "CustomNamespace", output_fields=DEFAULT_OUTPUT_FIELDS)
create_output_string
create_output_string(args: "CustomNamespace")
create_parser
create_parser()
create_summary_list
create_summary_list(args: "CustomNamespace")
enum_key_to_value
enum_key_to_value(enum_key: Enum)
extract_homepage
extract_homepage(metadata: Message)
Extracts the homepage attribute from the package metadata.
Not all python packages have defined a home-page attribute.
As a fallback, the `Project-URL` metadata can be used.
The python core metadata supports multiple (free text) values for
the `Project-URL` field that are comma separated.
Args:
metadata: The package metadata to extract the homepage from.
Returns:
The home page if applicable, None otherwise.
filter_string
filter_string(item: str)
find_license_from_classifier
find_license_from_classifier(classifiers: list[str])
get_output_fields
get_output_fields(args: CustomNamespace)
get_packages
get_packages(args: CustomNamespace, )
get_pkg_included_file
get_pkg_included_file(pkg, file_names_rgx: str)
Attempt to find the package's included file on disk and return the
tuple (included_file_path, included_file_contents).
get_pkg_info
get_pkg_info(pkg)
get_python_sys_path
get_python_sys_path(executable: str)
main
main()
normalize_pkg_name
normalize_pkg_name(pkg_name: str)
Return normalized name according to PEP specification
See here: https://peps.python.org/pep-0503/#normalized-names
Args:
pkg_name: Package name it is extracted from the package metadata
or specified in the CLI
Returns:
normalized packege name
select_license_by_source
select_license_by_source(from_source: FromArg, license_classifier: list[str], license_meta: str)
value_to_enum_key
value_to_enum_key(value: str)