Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions mypy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import argparse
import os
import platform
import subprocess
import sys
import time
Expand Down Expand Up @@ -40,6 +41,13 @@
if TYPE_CHECKING:
from _typeshed import SupportsWrite

if platform.python_implementation() == "PyPy":
sys.stderr.write(
"ERROR: Running mypy on PyPy is not supported yet.\n"
"To type-check a PyPy library please use an equivalent CPython version,\n"
"see https://github.com/mypyc/librt/issues/16 for possible workarounds.\n"
)
sys.exit(2)

orig_stat: Final = os.stat
MEM_PROFILE: Final = False # If True, dump memory profile
Expand Down
9 changes: 0 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,13 @@
import glob
import os
import os.path
import platform
import sys
from typing import TYPE_CHECKING, Any

if sys.version_info < (3, 10, 0): # noqa: UP036, RUF100
sys.stderr.write("ERROR: You need Python 3.10 or later to use mypy.\n")
exit(1)

if platform.python_implementation() == "PyPy":
sys.stderr.write(
"ERROR: Running mypy on PyPy is not supported yet.\n"
"To type-check a PyPy library please use an equivalent CPython version,\n"
"see https://github.com/mypyc/librt/issues/16 for possible workarounds.\n"
)
exit(1)

# we'll import stuff from the source tree, let's ensure is on the sys path
sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)))

Expand Down