From 4171cdafc93166ca216d801ab391b15ec6df793d Mon Sep 17 00:00:00 2001 From: Satoru SATOH Date: Tue, 1 Sep 2020 23:51:25 +0900 Subject: [PATCH] Move setuptools' packaging configuration from setup.py to setup.cfg Move setuptools' packaging configuration from setup.py to setup.cfg to simplify setup.py and make its packaging more dedeclarative. Signed-off-by: Satoru SATOH --- setup.cfg | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ setup.py | 29 +---------------------------- 2 files changed, 52 insertions(+), 28 deletions(-) diff --git a/setup.cfg b/setup.cfg index 317e863..59c1edf 100644 --- a/setup.cfg +++ b/setup.cfg @@ -11,3 +11,54 @@ all-files = 1 source-dir = docs build-dir = docs/_build warning-is-error = 1 + +[metadata] +keywords = + yaml + lint + linter + syntax + checker + +url = https://github.com/adrienverge/yamllint +classifiers = + Development Status :: 5 - Production/Stable + Environment :: Console + Intended Audience :: Developers + License :: OSI Approved :: GNU General Public License v3 (GPLv3) + Programming Language :: Python :: 2 + Programming Language :: Python :: 2.7 + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.4 + Programming Language :: Python :: 3.5 + Programming Language :: Python :: 3.6 + Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 + Topic :: Software Development + Topic :: Software Development :: Debuggers + Topic :: Software Development :: Quality Assurance + Topic :: Software Development :: Testing + +[options] +packages = find: + +python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.* + +include_package_data = True +install_requires = + pathspec >= 0.5.3 + pyyaml + +test_suite = tests + +[options.packages.find] +exclude = + tests + tests.* + +[options.package_data] +yamllint = conf/*.yaml + +[options.entry_points] +console_scripts = + yamllint = yamllint.cli:run diff --git a/setup.py b/setup.py index 7285794..4318035 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from setuptools import find_packages, setup +from setuptools import setup from yamllint import (__author__, __license__, APP_NAME, APP_VERSION, APP_DESCRIPTION) @@ -27,31 +27,4 @@ setup( description=APP_DESCRIPTION.split('\n')[0], long_description=APP_DESCRIPTION, license=__license__, - keywords=['yaml', 'lint', 'linter', 'syntax', 'checker'], - url='https://github.com/adrienverge/yamllint', - python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*', - classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Environment :: Console', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Topic :: Software Development', - 'Topic :: Software Development :: Debuggers', - 'Topic :: Software Development :: Quality Assurance', - 'Topic :: Software Development :: Testing', - ], - - packages=find_packages(exclude=['tests', 'tests.*']), - entry_points={'console_scripts': ['yamllint=yamllint.cli:run']}, - package_data={'yamllint': ['conf/*.yaml']}, - install_requires=['pathspec >=0.5.3', 'pyyaml'], - test_suite='tests', )