2021-06-16 08:04:59 +02:00
|
|
|
# Copyright: Ankitects Pty Ltd and contributors
|
|
|
|
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
|
|
|
|
|
|
import os
|
2022-01-15 07:04:04 +01:00
|
|
|
import sys
|
|
|
|
from mypy import pyinfo
|
2021-06-16 08:04:59 +02:00
|
|
|
|
2022-09-24 01:46:43 +02:00
|
|
|
# taken from pyinfo
|
|
|
|
if __name__ == "__main__":
|
|
|
|
old_sys_path = sys.path
|
|
|
|
sys.path = sys.path[1:]
|
|
|
|
import types # noqa
|
|
|
|
|
|
|
|
sys.path = old_sys_path
|
|
|
|
|
|
|
|
|
|
|
|
def getsearchdirs():
|
|
|
|
dirs = pyinfo.getsearchdirs()
|
|
|
|
dirs.append(os.getenv("EXTRA_SITE_PACKAGES"))
|
|
|
|
return dirs
|
|
|
|
|
|
|
|
|
|
|
|
if sys.argv[-1] == "getsearchdirs":
|
|
|
|
print(repr(getsearchdirs()))
|
|
|
|
else:
|
|
|
|
sys.exit(1)
|