Skip to content

Commit 0144d8e

Browse files
authored
Merge pull request #650 from python-cmd2/long_description
Use README.md as the PyPI long description
2 parents 8e92f9d + ab668d5 commit 0144d8e

File tree

1 file changed

+5
-40
lines changed

1 file changed

+5
-40
lines changed

setup.py

Lines changed: 5 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -3,49 +3,13 @@
33
"""
44
Setuptools setup file, used to install or test 'cmd2'
55
"""
6+
import codecs
67
from setuptools import setup
78

8-
DESCRIPTION = "cmd2 - a tool for building interactive command line applications in Python"
9-
LONG_DESCRIPTION = """cmd2 is a tool for building interactive command line applications in Python. Its goal is to make
10-
it quick and easy for developers to build feature-rich and user-friendly interactive command line applications. It
11-
provides a simple API which is an extension of Python's built-in cmd module. cmd2 provides a wealth of features on top
12-
of cmd to make your life easier and eliminates much of the boilerplate code which would be necessary when using cmd.
9+
DESCRIPTION = "cmd2 - quickly build feature-rich and user-friendly interactive command line applications in Python"
1310

14-
The latest documentation for cmd2 can be read online here:
15-
https://cmd2.readthedocs.io/
16-
17-
Main features:
18-
19-
- Searchable command history (`history` command and `<Ctrl>+r`) - optionally persistent
20-
- Text file scripting of your application with `load` (`@`) and `_relative_load` (`@@`)
21-
- Python scripting of your application with ``pyscript``
22-
- Run shell commands with ``!``
23-
- Pipe command output to shell commands with `|`
24-
- Redirect command output to file with `>`, `>>`
25-
- Bare `>`, `>>` with no filename send output to paste buffer (clipboard)
26-
- `py` enters interactive Python console (opt-in `ipy` for IPython console)
27-
- Option to display long output using a pager with ``cmd2.Cmd.ppaged()``
28-
- Multi-line commands
29-
- Special-character command shortcuts (beyond cmd's `?` and `!`)
30-
- Command aliasing similar to bash `alias` command
31-
- Macros, which are similar to aliases, but they can contain argument placeholders
32-
- Ability to load commands at startup from an initialization script
33-
- Settable environment parameters
34-
- Parsing commands with arguments using `argparse`, including support for sub-commands
35-
- Unicode character support
36-
- Good tab-completion of commands, sub-commands, file system paths, and shell commands
37-
- Automatic tab-completion of `argparse` flags when using one of the `cmd2` `argparse` decorators
38-
- Support for Python 3.4+ on Windows, macOS, and Linux
39-
- Trivial to provide built-in help for all commands
40-
- Built-in regression testing framework for your applications (transcript-based testing)
41-
- Transcripts for use with built-in regression can be automatically generated from `history -t`
42-
- Alerts that seamlessly print while user enters text at prompt
43-
44-
Usable without modification anywhere cmd is used; simply import cmd2.Cmd in place of cmd.Cmd.
45-
46-
Version 0.9.0+ of cmd2 supports Python 3.4+ only. If you wish to use cmd2 with Python 2.7, then
47-
please install version 0.8.x.
48-
"""
11+
with codecs.open('README.md', encoding='utf8') as f:
12+
LONG_DESCRIPTION = f.read()
4913

5014
CLASSIFIERS = list(filter(None, map(str.strip,
5115
"""
@@ -90,6 +54,7 @@
9054
use_scm_version=True,
9155
description=DESCRIPTION,
9256
long_description=LONG_DESCRIPTION,
57+
long_description_content_type='text/markdown',
9358
classifiers=CLASSIFIERS,
9459
author='Catherine Devlin',
9560
author_email='catherine.devlin@gmail.com',

0 commit comments

Comments
 (0)