1315a3a3bb
- The way mypy gathers site packages has changed slightly, so we had to update extendsitepkgs.py to work with it. - Not sure if there's a way to avoid the ignore in operations/__init__.py. mypy is still ensuring a provided argument has a .changes attribute, so thankfully we don't seem to have lost much here.
14 lines
394 B
Python
14 lines
394 B
Python
# Copyright: Ankitects Pty Ltd and contributors
|
|
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
|
|
import os
|
|
import sys
|
|
from mypy import pyinfo
|
|
|
|
if sys.argv[-1] == "getsitepackages":
|
|
pkgs = pyinfo.getsitepackages()
|
|
pkgs.append(os.getenv("EXTRA_SITE_PACKAGES"))
|
|
print(repr(pkgs))
|
|
elif sys.argv[-1] == "getprefixes":
|
|
print(repr(pyinfo.getprefixes()))
|