6.2. setuplib.setuplib

For current help refer tot the online help:

python setup.py list_entry_points --help

Alternative implementations are:

ipython setup.py list_entry_points --help
jython  setup.py list_entry_points --help  # requires special install of setuptools, refer to the manuals
pypy    setup.py list_entry_points --help

ipw.exe setup.py list_entry_points --help  # IronPython on Windows

With current output:

Options for 'list_entry_points' command:
  --debug (-d)           Raises degree of debug traces of current context.
                         Supports repetition. Each raises the debug verbosity
                         level of the context by one.
  --exit (-e)            Exit after command 'list_entry_points' immediately, ignore
                         following. Default := off.
  --filter               Define a filter, for details refer to the manual. See
                         '--filter=help. Default: ''
  --format (-f)          Define display format. See '--format=help. Default:
                         'name,module_name,dist.egg_info:::fname'
  --group (-g)           Set group for scan, '--group=none' scans all. See
                         'PyPA.io'.Default: 'distutils.commands'
  --ignore-missing (-i)  Ignore errors due to missing components, and
                         continue.  For example in case of missing an
                         optional. Default: False.
  --layout               Define display layout. See '--format=help'. Default:
                         table
  --long (-l)            List long format, similar to shell command 'ls -l'.
                         Default: off
  --quiet (-q)           Suppress display including warnings. Display error
                         messages only.Default: off
  --search-path (-P)     Set the search path for requested resources. Default:
                         'sys.path'
  --sort                 Sort a specified field number. Default: 0
  --verbose (-v)         Raises verbosity of current context. Supports
                         repetition. Each raises the command verbosity level
                         of the context by one. The value is defined by the
                         global option defined in 'Distribution'. Refer to the
                         manuals for the special behaviour when used as either
                         a global option(start 'verbose=1'), or as a command
                         context option(start 'verbose=0'). Default:=1.

6.2.1. Module

Setuplib subcommand ‘ENUMERATE’. Enumerate available commands based on ‘pkt_resources’. Supports parameters and filters.

6.2.2. SetupListEntryPointsX

class setuplib.setuplib.SetupListEntryPointsX(dist)[source]

List available entry points.

6.2.2.1. finalize_options

SetupListEntryPointsX.finalize_options()[source]

Initializae the API of ‘lis’.

6.2.2.2. initialize_options

SetupListEntryPointsX.initialize_options()[source]

Define the API entrypoints and data of the command ‘list’.

REMARK: verbose and debug are encapsulated/hidden by distutils.

6.2.2.3. run

SetupListEntryPointsX.run()[source]

Creates documents. Calls the defined and activated wrapper scripts.

6.2.3. MyDistributionData

class setuplib.setuplib.MyDistributionData(distribution, task)[source]

6.2.3.1. __init__

MyDistributionData.__init__(distribution, task)[source]

Initialize self. See help(type(self)) for accurate signature.

6.2.3.2. enumerate

MyDistributionData.enumerate(task)[source]

Calls pkg_resources and caches the results. The cached data is queried later for details required by the extended list and display commands.

The caching happens here only, which comprises the flat data cache of all entry points and the additional categorized cache of selective sets for later selection filters.

The centralized preparation of the data for later filtering eases the data handling significantly by moderate use of additional resources.

Parameters

self – The current instance of this class.

Returns

Results in the member variable:

self.ep_cache

The content is a dict containing the iterated entry points with the <ep>.name as key.

Raises

pass-through

6.2.3.3. print

MyDistributionData.print()[source]

Prints the requested data.

The printout is again processed in two levels. - print:

Prepares the record data for the appropriate format.

Calls the inteface:

self.print_<format>(outlist, index, task)

outlist := The list of resulting keys within the *self.ep_cache*.

index := The sprocessed/sorted list of *(<key>, #index)* mapping
         of utlist to *self.ep_cache*.

task := The parameters of the current task.

For example:

self.print_table(outlist, index, task)
  • print_<format>:

    Prints out the records of the selcted output format.

Uses object data from self.

6.2.4. Exceptions

exception setuplib.setuplib.SetuplibCommandsxError[source]

Error on setuplib calls.