diff --git a/MANIFEST.in b/MANIFEST.in index 799a3f0bb2..9561fb1061 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,9 +1 @@ -prune .github -prune doc -prune tests -exclude .* -exclude ChangeLog -exclude pylintrc -exclude README.rst -exclude requirements_*.txt -exclude tox.ini +include README.rst diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000000..ae1d97446c --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,55 @@ +[build-system] +requires = ["setuptools~=62.6", "wheel~=0.37.1"] +build-backend = "setuptools.build_meta" + +[project] +name = "astroid" +license = {text = "LGPL-2.1-or-later"} +description = "An abstract syntax tree for Python with inference support." +readme = "README.rst" +authors = [ + {name = "Python Code Quality Authority", email = "code-quality@python.org"} +] +keywords = ["static code analysis", "python", "abstract syntax tree"] +classifiers = [ + "Development Status :: 6 - Mature", + "Environment :: Console", + "Intended Audience :: Developers", + "License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: Software Development :: Quality Assurance", + "Topic :: Software Development :: Testing", +] +requires-python = ">=3.7.2" +dependencies = [ + "lazy_object_proxy>=1.4.0", + "wrapt>=1.11,<2", + "typed-ast>=1.4.0,<2.0;implementation_name=='cpython' and python_version<'3.8'", + "typing-extensions>=3.10;python_version<'3.10'", +] +dynamic = ["version"] + +[project.urls] +"Docs" = "https://pylint.pycqa.org/projects/astroid/en/latest/" +"Source Code" = "https://github.com/PyCQA/astroid" +"Bug tracker" = "https://github.com/PyCQA/astroid/issues" +"Discord server" = "https://discord.gg/Egy6P8AMB5" + +[tool.setuptools] +license-files = ["LICENSE", "CONTRIBUTORS.txt"] # Keep in sync with setup.cfg + +[tool.setuptools.packages.find] +include = ["astroid*"] + +[tool.setuptools.dynamic] +version = {attr = "astroid.__pkginfo__.__version__"} diff --git a/setup.cfg b/setup.cfg index b1943a12ae..eeb978244c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,51 +1,12 @@ +# Setuptools v62.6 doesn't support editable installs with just 'pyproject.toml' (PEP 660). +# Keep this file until it does! + [metadata] -name = astroid -description = An abstract syntax tree for Python with inference support. -version = attr: astroid.__pkginfo__.__version__ -long_description = file: README.rst -long_description_content_type = text/x-rst -url = https://github.com/PyCQA/astroid -author = Python Code Quality Authority -author_email = code-quality@python.org -license = LGPL-2.1-or-later +# wheel doesn't yet read license_files from pyproject.toml - tools.setuptools +# Keep it here until it does! license_files = LICENSE CONTRIBUTORS.txt -classifiers = - Development Status :: 6 - Mature - Environment :: Console - Intended Audience :: Developers - License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2) - Operating System :: OS Independent - Programming Language :: Python - Programming Language :: Python :: 3 - Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: Implementation :: CPython - Programming Language :: Python :: Implementation :: PyPy - Topic :: Software Development :: Libraries :: Python Modules - Topic :: Software Development :: Quality Assurance - Topic :: Software Development :: Testing -keywords = static code analysis,python,abstract syntax tree -project_urls = - Bug tracker = https://github.com/PyCQA/astroid/issues - Discord server = https://discord.gg/Egy6P8AMB5 - -[options] -packages = find: -install_requires = - lazy_object_proxy>=1.4.0 - wrapt>=1.11,<2 - typed-ast>=1.4.0,<2.0;implementation_name=="cpython" and python_version<"3.8" - typing-extensions>=3.10;python_version<"3.10" -python_requires = >=3.7.2 - -[options.packages.find] -include = - astroid* [aliases] test = pytest @@ -63,6 +24,11 @@ known_first_party = astroid include_trailing_comma = True skip_glob = tests/testdata +[flake8] +# Required for flake8-typing-imports (v1.12.0) +# The plugin doesn't yet read the value from pyproject.toml +min_python_version = 3.7.2 + [mypy] scripts_are_modules = True no_implicit_optional = True diff --git a/setup.py b/setup.py index 606849326a..46bbfefdbc 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,2 @@ -from setuptools import setup - -setup() +# Keep until dependabot issue is resolved +# https://github.com/dependabot/dependabot-core/issues/4483