From 4b9625ac0697a205b9714b60403ae2befa7fe781 Mon Sep 17 00:00:00 2001 From: "Michael Hirsch, Ph.D" Date: Sun, 23 Jun 2019 12:40:35 -0400 Subject: ENH: metadata PEP390 setup.cfg https for Meson docs url Co-Authored-By: Elliott Sales de Andrade --- .flake8 | 33 +++++++++++++++++++++++++++++++ mypy.ini | 4 ++++ setup.cfg | 68 ++++++++++++++++++++++++++++++++------------------------------- setup.py | 29 +++------------------------ 4 files changed, 75 insertions(+), 59 deletions(-) create mode 100644 .flake8 create mode 100644 mypy.ini diff --git a/.flake8 b/.flake8 new file mode 100644 index 000000000..d81878675 --- /dev/null +++ b/.flake8 @@ -0,0 +1,33 @@ +[flake8] +ignore = + # E241: multiple spaces after ':' + E241, + # E251: unexpected spaces around keyword / parameter equals + E251, + # E261: at least two spaces before inline comment + E261, + # E265: block comment should start with '# ' + E265, + # E501: line too long + E501, + # E302: expected 2 blank lines, found 1 + E302, + # E305: expected 2 blank lines after class or function definition, found 1 + E305, + # E401: multiple imports on one line + E401, + # E266: too many leading '#' for block comment + E266, + # E402: module level import not at top of file + E402, + # E731: do not assign a lambda expression, use a def (too many false positives) + E731 + # E741: ambiguous variable name 'l' + E741 + # E722: do not use bare except' + E722 + # W504: line break after binary operator + W504 + # A003: builtin class attribute + A003 +max-line-length = 120 diff --git a/mypy.ini b/mypy.ini new file mode 100644 index 000000000..aacfb3f8d --- /dev/null +++ b/mypy.ini @@ -0,0 +1,4 @@ +[mypy] +strict_optional = False +show_error_context = False +show_column_numbers = True \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index d81878675..3c0418550 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,33 +1,35 @@ -[flake8] -ignore = - # E241: multiple spaces after ':' - E241, - # E251: unexpected spaces around keyword / parameter equals - E251, - # E261: at least two spaces before inline comment - E261, - # E265: block comment should start with '# ' - E265, - # E501: line too long - E501, - # E302: expected 2 blank lines, found 1 - E302, - # E305: expected 2 blank lines after class or function definition, found 1 - E305, - # E401: multiple imports on one line - E401, - # E266: too many leading '#' for block comment - E266, - # E402: module level import not at top of file - E402, - # E731: do not assign a lambda expression, use a def (too many false positives) - E731 - # E741: ambiguous variable name 'l' - E741 - # E722: do not use bare except' - E722 - # W504: line break after binary operator - W504 - # A003: builtin class attribute - A003 -max-line-length = 120 +[metadata] +description = A high performance build system +author = Jussi Pakkanen +author_email = jpakkane@gmail.com +url = https://mesonbuild.com +keywords = + meson + mesonbuild + build system + cmake +license = Apache License, Version 2.0 +license_file = COPYING +classifiers = + Development Status :: 5 - Production/Stable + Environment :: Console + Intended Audience :: Developers + License :: OSI Approved :: Apache Software License + Natural Language :: English + Operating System :: MacOS :: MacOS X + Operating System :: Microsoft :: Windows + Operating System :: POSIX :: BSD + Operating System :: POSIX :: Linux + Programming Language :: Python :: 3 :: Only + Programming Language :: Python :: 3.5 + Programming Language :: Python :: 3.6 + Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 + Topic :: Software Development :: Build Tools +long_description = Meson is a cross-platform build system designed to be both as fast and as user friendly as possible. It supports many languages and compilers, including GCC, Clang, PGI, Intel, and Visual Studio. Its build definitions are written in a simple non-Turing complete DSL. + +[options] +python_requires = >= 3.5 +setup_requires = + setuptools >= 30.3.0 + pip >= 10 diff --git a/setup.py b/setup.py index 0a2efb190..442e02a17 100644 --- a/setup.py +++ b/setup.py @@ -17,9 +17,8 @@ import sys if sys.version_info < (3, 5, 0): - print('Tried to install with an unsupported version of Python. ' - 'Meson requires Python 3.5.0 or greater') - sys.exit(1) + raise SystemExit('ERROR: Tried to install Meson with an unsupported Python version: \n{}' + '\nMeson requires Python 3.5.0 or greater'.format(sys.version)) from mesonbuild.coredata import version from setuptools import setup @@ -49,29 +48,7 @@ if sys.platform != 'win32': if __name__ == '__main__': setup(name='meson', version=version, - description='A high performance build system', - author='Jussi Pakkanen', - author_email='jpakkane@gmail.com', - url='http://mesonbuild.com', - license=' Apache License, Version 2.0', - python_requires='>=3.5', packages=packages, package_data=package_data, entry_points=entries, - data_files=data_files, - classifiers=['Development Status :: 5 - Production/Stable', - 'Environment :: Console', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: Apache Software License', - 'Natural Language :: English', - 'Operating System :: MacOS :: MacOS X', - 'Operating System :: Microsoft :: Windows', - 'Operating System :: POSIX :: BSD', - 'Operating System :: POSIX :: Linux', - 'Programming Language :: Python :: 3 :: Only', - 'Topic :: Software Development :: Build Tools', - ], - long_description='''Meson is a cross-platform build system designed to be both as - fast and as user friendly as possible. It supports many languages and compilers, including - GCC, Clang and Visual Studio. Its build definitions are written in a simple non-turing - complete DSL.''') + data_files=data_files,) -- cgit v1.2.3