Skip to content

Commit 21587f0

Browse files
authored
Move long_description metadata to pyproject.toml (#18172)
Fixes #18168
1 parent e2a47e2 commit 21587f0

File tree

2 files changed

+13
-16
lines changed

2 files changed

+13
-16
lines changed

pyproject.toml

+12-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,17 @@ build-backend = "setuptools.build_meta"
1717
[project]
1818
name = "mypy"
1919
description = "Optional static typing for Python"
20+
readme = {text = """
21+
Mypy -- Optional Static Typing for Python
22+
=========================================
23+
24+
Add type annotations to your Python programs, and use mypy to type
25+
check them. Mypy is essentially a Python linter on steroids, and it
26+
can catch many programming errors by analyzing your program, without
27+
actually having to run it. Mypy has a powerful type system with
28+
features such as type inference, gradual typing, generics and union
29+
types.
30+
""", content-type = "text/x-rst"}
2031
authors = [{name = "Jukka Lehtosalo", email = "[email protected]"}]
2132
license = {text = "MIT"}
2233
classifiers = [
@@ -41,7 +52,7 @@ dependencies = [
4152
"mypy_extensions>=1.0.0",
4253
"tomli>=1.1.0; python_version<'3.11'",
4354
]
44-
dynamic = ["version", "readme"]
55+
dynamic = ["version"]
4556

4657
[project.optional-dependencies]
4758
dmypy = ["psutil>=4.0"]

setup.py

+1-15
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,6 @@
2626
if TYPE_CHECKING:
2727
from typing_extensions import TypeGuard
2828

29-
long_description = """
30-
Mypy -- Optional Static Typing for Python
31-
=========================================
32-
33-
Add type annotations to your Python programs, and use mypy to type
34-
check them. Mypy is essentially a Python linter on steroids, and it
35-
can catch many programming errors by analyzing your program, without
36-
actually having to run it. Mypy has a powerful type system with
37-
features such as type inference, gradual typing, generics and union
38-
types.
39-
""".lstrip()
40-
4129

4230
def is_list_of_setuptools_extension(items: list[Any]) -> TypeGuard[list[Extension]]:
4331
return all(isinstance(item, Extension) for item in items)
@@ -171,6 +159,4 @@ def run(self):
171159
ext_modules = []
172160

173161

174-
setup(
175-
version=version, long_description=long_description, ext_modules=ext_modules, cmdclass=cmdclass
176-
)
162+
setup(version=version, ext_modules=ext_modules, cmdclass=cmdclass)

0 commit comments

Comments
 (0)