|
| 1 | +#!/usr/bin/python |
| 2 | +# coding=utf-8 |
| 3 | +""" |
| 4 | +Setuptools setup file, used to install or test 'cmd2' |
| 5 | +""" |
| 6 | +import codecs |
| 7 | + |
| 8 | +from setuptools import ( |
| 9 | + setup, |
| 10 | +) |
| 11 | + |
| 12 | +DESCRIPTION = "cmd2 - quickly build feature-rich and user-friendly interactive command line applications in Python" |
| 13 | + |
| 14 | +with codecs.open('README.md', encoding='utf8') as f: |
| 15 | + LONG_DESCRIPTION = f.read() |
| 16 | + |
| 17 | +CLASSIFIERS = list( |
| 18 | + filter( |
| 19 | + None, |
| 20 | + map( |
| 21 | + str.strip, |
| 22 | + """ |
| 23 | +Development Status :: 5 - Production/Stable |
| 24 | +Environment :: Console |
| 25 | +Operating System :: OS Independent |
| 26 | +Intended Audience :: Developers |
| 27 | +Intended Audience :: System Administrators |
| 28 | +License :: OSI Approved :: MIT License |
| 29 | +Programming Language :: Python |
| 30 | +Programming Language :: Python :: 3 |
| 31 | +Programming Language :: Python :: 3.8 |
| 32 | +Programming Language :: Python :: 3.9 |
| 33 | +Programming Language :: Python :: 3.10 |
| 34 | +Programming Language :: Python :: 3.11 |
| 35 | +Programming Language :: Python :: 3.12 |
| 36 | +Programming Language :: Python :: Implementation :: CPython |
| 37 | +Topic :: Software Development :: Libraries :: Python Modules |
| 38 | +""".splitlines(), |
| 39 | + ), |
| 40 | + ) |
| 41 | +) # noqa: E128 |
| 42 | + |
| 43 | +SETUP_REQUIRES = ['setuptools >= 34.4', 'setuptools_scm >= 3.0'] |
| 44 | + |
| 45 | +INSTALL_REQUIRES = [ |
| 46 | + 'pyperclip >= 1.6', |
| 47 | + 'wcwidth >= 0.1.7', |
| 48 | +] |
| 49 | + |
| 50 | +EXTRAS_REQUIRE = { |
| 51 | + # Windows also requires pyreadline3 to ensure tab completion works |
| 52 | + ":sys_platform=='win32'": ['pyreadline3'], |
| 53 | + # Extra dependencies for running unit tests |
| 54 | + 'test': [ |
| 55 | + "gnureadline; sys_platform=='darwin'", # include gnureadline on macOS to ensure it is available in nox env |
| 56 | + 'codecov', |
| 57 | + 'coverage', |
| 58 | + 'pytest>=4.6', |
| 59 | + 'pytest-cov', |
| 60 | + 'pytest-mock', |
| 61 | + ], |
| 62 | + # development only dependencies: install with 'pip install -e .[dev]' |
| 63 | + 'dev': [ |
| 64 | + 'codecov', |
| 65 | + 'doc8', |
| 66 | + 'flake8', |
| 67 | + 'black', |
| 68 | + 'isort', |
| 69 | + 'invoke', |
| 70 | + 'mypy', |
| 71 | + 'nox', |
| 72 | + "pytest>=4.6", |
| 73 | + 'pytest-cov', |
| 74 | + 'pytest-mock', |
| 75 | + 'sphinx', |
| 76 | + 'sphinx-rtd-theme', |
| 77 | + 'sphinx-autobuild', |
| 78 | + 'twine>=1.11', |
| 79 | + ], |
| 80 | + 'validate': [ |
| 81 | + 'flake8', |
| 82 | + 'mypy', |
| 83 | + 'types-setuptools', |
| 84 | + ], |
| 85 | +} |
| 86 | + |
| 87 | +PACKAGE_DATA = { |
| 88 | + 'cmd2': ['py.typed'], |
| 89 | +} |
| 90 | + |
| 91 | +setup( |
| 92 | + name="cmd2", |
| 93 | + use_scm_version={'git_describe_command': 'git describe --dirty --tags --long --exclude plugin-*'}, |
| 94 | + description=DESCRIPTION, |
| 95 | + long_description=LONG_DESCRIPTION, |
| 96 | + long_description_content_type='text/markdown', |
| 97 | + classifiers=CLASSIFIERS, |
| 98 | + author='Catherine Devlin', |
| 99 | + author_email='catherine.devlin@gmail.com', |
| 100 | + url='https://github.com/python-cmd2/cmd2', |
| 101 | + license='MIT', |
| 102 | + platforms=['any'], |
| 103 | + package_data=PACKAGE_DATA, |
| 104 | + packages=['cmd2'], |
| 105 | + keywords='command prompt console cmd', |
| 106 | + python_requires='>=3.8', |
| 107 | + setup_requires=SETUP_REQUIRES, |
| 108 | + install_requires=INSTALL_REQUIRES, |
| 109 | + extras_require=EXTRAS_REQUIRE, |
| 110 | +) |
0 commit comments