Welcome to jaraco.packaging documentation!¶
This module should only import modules from stdlib and setuptools
-
class
jaraco.packaging.depends.
DependencyTree
(dist, **kw)¶ Bases:
setuptools.Command
-
description
= 'Report a tree of resolved dependencies'¶
-
finalize_options
()¶ Set final values for all the options that this command supports. This is always called as late as possible, ie. after any option assignments from the command-line or from other commands have been done. Thus, this is the place to code option dependencies: if ‘foo’ depends on ‘bar’, then it is safe to set ‘foo’ from ‘bar’ as long as ‘foo’ still has the same value it was assigned in ‘initialize_options()’.
This method must be implemented by all command classes.
-
initialize_options
()¶ Set default values for all the options that this command supports. Note that these defaults may be overridden by other commands, by the setup script, by config files, or by the command-line. Thus, this is not the place to code dependencies between options; generally, ‘initialize_options()’ implementations are just a bunch of “self.foo = None” assignments.
This method must be implemented by all command classes.
-
run
()¶ A command’s raison d’etre: carry out the action it exists to perform, controlled by the options initialized in ‘initialize_options()’, customized by other commands, the setup script, the command-line, and config files, and finalized in ‘finalize_options()’. All terminal output and filesystem interaction should be done by ‘run()’.
This method must be implemented by all command classes.
-
user_options
= [('requirement=', 'r', "A setuptools requirement spec (e.g. 'eggmonster' or 'eggmonster==0.1')"), ('python=', 'p', 'Use a remote environment rather than the local one.')]¶
-
-
jaraco.packaging.depends.
check_dependencies
(req, indent=1, history=None)¶ Given a setuptools package requirement (e.g. ‘gryphon==2.42’ or just ‘gryphon’), print a tree of dependencies as they resolve in this environment.
-
jaraco.packaging.depends.
check_dependencies_remote
(args)¶ Invoke this command on a remote Python.
-
jaraco.packaging.depends.
load_dependencies
(req, history=None)¶ Load the dependency tree as a Python object tree, suitable for JSON serialization.
>>> deps = load_dependencies('jaraco.packaging') >>> import json >>> doc = json.dumps(deps)
-
jaraco.packaging.depends.
parse_extras
(req)¶
-
jaraco.packaging.depends.
print_package
(requirement, indent)¶
-
jaraco.packaging.depends.
tree_cmd
()¶
-
class
jaraco.packaging.info.
Show
(dist, **kw)¶ Bases:
setuptools.Command
>>> import sys, functools >>> show_cmd = [sys.executable, "setup.py", "show"] >>> run = functools.partial( ... subprocess.check_output, universal_newlines=True) >>> print(run(show_cmd + ['-a', 'name']), end='') running show jaraco.packaging >>> print(run(show_cmd + ['-a', 'install_requires']), end='') running show ['setuptools']
-
description
= "Report attributes of a distribution's metadata"¶
-
finalize_options
()¶ Set final values for all the options that this command supports. This is always called as late as possible, ie. after any option assignments from the command-line or from other commands have been done. Thus, this is the place to code option dependencies: if ‘foo’ depends on ‘bar’, then it is safe to set ‘foo’ from ‘bar’ as long as ‘foo’ still has the same value it was assigned in ‘initialize_options()’.
This method must be implemented by all command classes.
-
initialize_options
()¶ Set default values for all the options that this command supports. Note that these defaults may be overridden by other commands, by the setup script, by config files, or by the command-line. Thus, this is not the place to code dependencies between options; generally, ‘initialize_options()’ implementations are just a bunch of “self.foo = None” assignments.
This method must be implemented by all command classes.
-
run
()¶ A command’s raison d’etre: carry out the action it exists to perform, controlled by the options initialized in ‘initialize_options()’, customized by other commands, the setup script, the command-line, and config files, and finalized in ‘finalize_options()’. All terminal output and filesystem interaction should be done by ‘run()’.
This method must be implemented by all command classes.
-
user_options
= [('attributes=', 'a', 'space or comma-separated attributes')]¶
-
-
jaraco.packaging.sphinx.
add_package_url
(app, pagename, templatename, context, doctree)¶
-
jaraco.packaging.sphinx.
load_config_from_setup
(app)¶ Replace values in app.config from package metadata
-
jaraco.packaging.sphinx.
setup
(app)¶