mirror of
https://github.com/ankitects/anki.git
synced 2025-11-06 20:57:13 -05:00
instead of just libpython's path we now get and cache the nodot version and venv bin path
13 lines
423 B
Python
13 lines
423 B
Python
# Copyright: Ankitects Pty Ltd and contributors
|
|
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
|
|
import json
|
|
import os
|
|
import sys
|
|
import sysconfig
|
|
|
|
cfg = sysconfig.get_config_var
|
|
base = cfg("installed_base") or cfg("installed_platbase")
|
|
lib = cfg("LDLIBRARY") or cfg("INSTSONAME")
|
|
version = cfg("py_version_nodot")
|
|
print(json.dumps([version, os.path.join(base, "lib", lib), sys.executable]))
|