Remove references to setuptools
With the advent of importlib, entry points are no long a setuptools-only thing. Update the docs to reflect that. Change-Id: I099f397ddb4d71879597cfe67ef2a1eff4a8d1af Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This commit is contained in:
parent
d405a6292a
commit
f3587efee8
@ -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/
|
||||
|
@ -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
|
||||
|
||||
|
@ -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:
|
||||
|
@ -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_::
|
||||
that. The easiest way to install it is using pip_. For example::
|
||||
|
||||
$ pip install cliff
|
||||
|
||||
or::
|
||||
|
||||
$ 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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user