Skip to content

Commit

Permalink
Move long_description metadata to pyproject.toml (#18172)
Browse files Browse the repository at this point in the history
Fixes #18168
  • Loading branch information
cdce8p authored Nov 19, 2024
1 parent e2a47e2 commit 21587f0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
13 changes: 12 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@ build-backend = "setuptools.build_meta"
[project]
name = "mypy"
description = "Optional static typing for Python"
readme = {text = """
Mypy -- Optional Static Typing for Python
=========================================
Add type annotations to your Python programs, and use mypy to type
check them. Mypy is essentially a Python linter on steroids, and it
can catch many programming errors by analyzing your program, without
actually having to run it. Mypy has a powerful type system with
features such as type inference, gradual typing, generics and union
types.
""", content-type = "text/x-rst"}
authors = [{name = "Jukka Lehtosalo", email = "[email protected]"}]
license = {text = "MIT"}
classifiers = [
Expand All @@ -41,7 +52,7 @@ dependencies = [
"mypy_extensions>=1.0.0",
"tomli>=1.1.0; python_version<'3.11'",
]
dynamic = ["version", "readme"]
dynamic = ["version"]

[project.optional-dependencies]
dmypy = ["psutil>=4.0"]
Expand Down
16 changes: 1 addition & 15 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,6 @@
if TYPE_CHECKING:
from typing_extensions import TypeGuard

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


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


setup(
version=version, long_description=long_description, ext_modules=ext_modules, cmdclass=cmdclass
)
setup(version=version, ext_modules=ext_modules, cmdclass=cmdclass)

0 comments on commit 21587f0

Please sign in to comment.