Skip to content

Support building mypycified mypy with PEP517 interface #13445

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Sep 17, 2022
Merged
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
requires = [
"setuptools >= 40.6.2",
"wheel >= 0.30.0",
"typing_extensions>=3.10",
"mypy_extensions>=0.4.3",
"typed_ast>=1.4.0,<2; python_version<'3.8'",
"tomli>=1.1.0; python_version<'3.11'",
"types-setuptools",
"types-typed-ast>=1.5.0,<1.6.0",
]
build-backend = "setuptools.build_meta"

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ def run(self):

USE_MYPYC = False
# To compile with mypyc, a mypyc checkout must be present on the PYTHONPATH
if len(sys.argv) > 1 and sys.argv[1] == "--use-mypyc":
sys.argv.pop(1)
if len(sys.argv) > 1 and "--use-mypyc" in sys.argv:
sys.argv.remove("--use-mypyc")
USE_MYPYC = True
if os.getenv("MYPY_USE_MYPYC", None) == "1":
USE_MYPYC = True
Expand Down