Skip to content

Commit 72eaed6

Browse files
committed
[mypyc] Remove the __init__ magic that finds mypy
This means mypy needs to be on the path but paves the way for the merge.
1 parent 733077c commit 72eaed6

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

mypyc/__init__.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1 @@
1-
import sys
2-
import os.path
31

4-
# mypyc depends on a copy of mypy installed as package-data that won't
5-
# live in the normal python path (to avoid potential conflicts with an
6-
# installed mypy). In order to make sure we find it, we perform
7-
# sys.path shenanigans here when mypyc is first imported.
8-
base_path = os.path.dirname(__file__)
9-
mypy_path = os.path.abspath(os.path.join(base_path, 'external', 'mypy'))
10-
sys.path.insert(0, mypy_path)
11-
12-
# Make sure that we can find mypy and that it is the *right* mypy. If
13-
# mypy was imported before mypyc was, our path manipulations might
14-
# have been too late, and this assert will catch the problem.
15-
import mypy
16-
assert mypy.__file__ == os.path.join(mypy_path, 'mypy', '__init__.py'), (
17-
"Found a mypy other than the one packaged with mypyc!")

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy