Skip to content

Commit 58bd603

Browse files
committed
Use new project metadata format [PEP 621]
1 parent 057ddb0 commit 58bd603

File tree

4 files changed

+69
-53
lines changed

4 files changed

+69
-53
lines changed

MANIFEST.in

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1 @@
1-
prune .github
2-
prune doc
3-
prune tests
4-
exclude .*
5-
exclude ChangeLog
6-
exclude pylintrc
7-
exclude README.rst
8-
exclude requirements_*.txt
9-
exclude tox.ini
1+
include README.rst

pyproject.toml

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
[build-system]
2+
requires = ["setuptools~=62.6", "wheel~=0.37.1"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "astroid"
7+
license = {text = "LGPL-2.1-or-later"}
8+
description = "An abstract syntax tree for Python with inference support."
9+
readme = "README.rst"
10+
authors = [
11+
{name = "Python Code Quality Authority", email = "[email protected]"}
12+
]
13+
keywords = ["static code analysis", "python", "abstract syntax tree"]
14+
classifiers = [
15+
"Development Status :: 6 - Mature",
16+
"Environment :: Console",
17+
"Intended Audience :: Developers",
18+
"License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)",
19+
"Operating System :: OS Independent",
20+
"Programming Language :: Python",
21+
"Programming Language :: Python :: 3",
22+
"Programming Language :: Python :: 3 :: Only",
23+
"Programming Language :: Python :: 3.7",
24+
"Programming Language :: Python :: 3.8",
25+
"Programming Language :: Python :: 3.9",
26+
"Programming Language :: Python :: 3.10",
27+
"Programming Language :: Python :: Implementation :: CPython",
28+
"Programming Language :: Python :: Implementation :: PyPy",
29+
"Topic :: Software Development :: Libraries :: Python Modules",
30+
"Topic :: Software Development :: Quality Assurance",
31+
"Topic :: Software Development :: Testing",
32+
]
33+
requires-python = ">=3.7.2"
34+
dependencies = [
35+
"lazy_object_proxy>=1.4.0",
36+
"wrapt>=1.11,<2",
37+
"typed-ast>=1.4.0,<2.0;implementation_name=='cpython' and python_version<'3.8'",
38+
"typing-extensions>=3.10;python_version<'3.10'",
39+
]
40+
dynamic = ["version"]
41+
42+
[project.urls]
43+
"Docs" = "https://pylint.pycqa.org/projects/astroid/en/latest/"
44+
"Source Code" = "https://github.com/PyCQA/astroid"
45+
"Bug tracker" = "https://github.com/PyCQA/astroid/issues"
46+
"Discord server" = "https://discord.gg/Egy6P8AMB5"
47+
48+
[tool.setuptools]
49+
license-files = ["LICENSE", "CONTRIBUTORS.txt"] # Keep in sync with setup.cfg
50+
51+
[tool.setuptools.packages.find]
52+
include = ["astroid*"]
53+
54+
[tool.setuptools.dynamic]
55+
version = {attr = "astroid.__pkginfo__.__version__"}

setup.cfg

+10-44
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,12 @@
1+
# Setuptools v62.6 doesn't support editable installs with just 'pyproject.toml' (PEP 660).
2+
# Keep this file until it does!
3+
14
[metadata]
2-
name = astroid
3-
description = An abstract syntax tree for Python with inference support.
4-
version = attr: astroid.__pkginfo__.__version__
5-
long_description = file: README.rst
6-
long_description_content_type = text/x-rst
7-
url = https://github.com/PyCQA/astroid
8-
author = Python Code Quality Authority
9-
author_email = [email protected]
10-
license = LGPL-2.1-or-later
5+
# wheel doesn't yet read license_files from pyproject.toml - tools.setuptools
6+
# Keep it here until it does!
117
license_files =
128
LICENSE
139
CONTRIBUTORS.txt
14-
classifiers =
15-
Development Status :: 6 - Mature
16-
Environment :: Console
17-
Intended Audience :: Developers
18-
License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)
19-
Operating System :: OS Independent
20-
Programming Language :: Python
21-
Programming Language :: Python :: 3
22-
Programming Language :: Python :: 3 :: Only
23-
Programming Language :: Python :: 3.7
24-
Programming Language :: Python :: 3.8
25-
Programming Language :: Python :: 3.9
26-
Programming Language :: Python :: 3.10
27-
Programming Language :: Python :: Implementation :: CPython
28-
Programming Language :: Python :: Implementation :: PyPy
29-
Topic :: Software Development :: Libraries :: Python Modules
30-
Topic :: Software Development :: Quality Assurance
31-
Topic :: Software Development :: Testing
32-
keywords = static code analysis,python,abstract syntax tree
33-
project_urls =
34-
Bug tracker = https://github.com/PyCQA/astroid/issues
35-
Discord server = https://discord.gg/Egy6P8AMB5
36-
37-
[options]
38-
packages = find:
39-
install_requires =
40-
lazy_object_proxy>=1.4.0
41-
wrapt>=1.11,<2
42-
typed-ast>=1.4.0,<2.0;implementation_name=="cpython" and python_version<"3.8"
43-
typing-extensions>=3.10;python_version<"3.10"
44-
python_requires = >=3.7.2
45-
46-
[options.packages.find]
47-
include =
48-
astroid*
4910

5011
[aliases]
5112
test = pytest
@@ -63,6 +24,11 @@ known_first_party = astroid
6324
include_trailing_comma = True
6425
skip_glob = tests/testdata
6526

27+
[flake8]
28+
# Required for flake8-typing-imports (v1.12.0)
29+
# The plugin doesn't yet read the value from pyproject.toml
30+
min_python_version = 3.7.2
31+
6632
[mypy]
6733
scripts_are_modules = True
6834
no_implicit_optional = True

setup.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Keep until dependabot issue is resolved
2+
# https://github.com/dependabot/dependabot-core/issues/4483
3+
14
from setuptools import setup
25

36
setup()

0 commit comments

Comments
 (0)