diff options
-rw-r--r-- | README.rst | 8 | ||||
-rw-r--r-- | cliff/commandmanager.py | 8 | ||||
-rw-r--r-- | demoapp/setup.py | 5 | ||||
-rw-r--r-- | doc/source/install/index.rst | 15 | ||||
-rw-r--r-- | doc/source/user/introduction.rst | 5 |
5 files changed, 15 insertions, 26 deletions
@@ -11,11 +11,11 @@ Team and repository tags cliff -- Command Line Interface Formulation Framework ======================================================= -cliff is a framework for building command line programs. It uses -`setuptools entry points`_ to provide subcommands, output formatters, and -other extensions. +cliff is a framework for building command line programs. +It uses `entry points`_ to provide subcommands, output formatters, and other +extensions. -.. _setuptools entry points: http://setuptools.readthedocs.io/en/latest/pkg_resources.html#convenience-api +.. _entry points: https://packaging.python.org/specifications/entry-points/ * Free software: Apache license * Documentation: https://docs.openstack.org/cliff/latest/ diff --git a/cliff/commandmanager.py b/cliff/commandmanager.py index d49f358..1787fcf 100644 --- a/cliff/commandmanager.py +++ b/cliff/commandmanager.py @@ -50,11 +50,10 @@ class EntryPointWrapper(object): class CommandManager(object): """Discovers commands and handles lookup based on argv data. - :param namespace: String containing the setuptools entrypoint namespace - for the plugins to be loaded. For example, - ``'cliff.formatter.list'``. + :param namespace: String containing the entrypoint namespace for the + plugins to be loaded. For example, ``'cliff.formatter.list'``. :param convert_underscores: Whether cliff should convert underscores to - spaces in entry_point commands. + spaces in entry_point commands. """ def __init__(self, namespace, convert_underscores=True): self.commands = {} @@ -93,7 +92,6 @@ class CommandManager(object): :type old_name: str :param new_name: The new command name. :type new_name: str - """ self._legacy[old_name] = new_name diff --git a/demoapp/setup.py b/demoapp/setup.py index 1cd2ce4..49abc84 100644 --- a/demoapp/setup.py +++ b/demoapp/setup.py @@ -1,12 +1,13 @@ #!/usr/bin/env python +from setuptools import find_packages +from setuptools import setup + PROJECT = 'cliffdemo' # Change docs/sphinx/conf.py too! VERSION = '0.1' -from setuptools import setup, find_packages - try: long_description = open('README.rst', 'rt').read() except IOError: diff --git a/doc/source/install/index.rst b/doc/source/install/index.rst index 30b4532..f7f9e93 100644 --- a/doc/source/install/index.rst +++ b/doc/source/install/index.rst @@ -7,11 +7,6 @@ Python Versions cliff is being developed under Python 3. -Dependencies -============ - -cliff depends on setuptools and its pkg_resources module. - .. _install-basic: Basic Installation @@ -20,13 +15,9 @@ Basic Installation cliff should be installed into the same site-packages area where the application and extensions are installed (either a virtualenv or the global site-packages). You may need administrative privileges to do -that. The easiest way to install it is using pip_:: - - $ pip install cliff - -or:: +that. The easiest way to install it is using pip_. For example:: - $ sudo pip install cliff + $ pip install cliff .. _pip: http://pypi.python.org/pypi/pip @@ -38,5 +29,5 @@ The source is hosted on OpenDev: https://opendev.org/openstack/cliff Reporting Bugs ============== -Please report bugs through the github project: +Please report bugs through the Launchpad project: https://bugs.launchpad.net/python-cliff diff --git a/doc/source/user/introduction.rst b/doc/source/user/introduction.rst index e9a14ff..5db32d6 100644 --- a/doc/source/user/introduction.rst +++ b/doc/source/user/introduction.rst @@ -35,7 +35,7 @@ The CommandManager The :class:`cliff.commandmanager.CommandManager` knows how to load individual command plugins. The default implementation uses -`setuptools entry points`_ but any mechanism for loading commands can +`entry points`_ but any mechanism for loading commands can be used by replacing the default :class:`CommandManager` when instantiating an :class:`App`. @@ -71,6 +71,5 @@ multiple commands before the program exits. Many cliff-based applications will be able to use the default implementation of :class:`InteractiveApp` without subclassing it. -.. _setuptools entry points: https://setuptools.readthedocs.io/en/latest/pkg_resources.html#entry-points - +.. _entry points: https://packaging.python.org/specifications/entry-points/ .. _argparse: http://docs.python.org/library/argparse.html |