blob: e1b4b68947af45e5b7d6c1ab987e1e29c55ebbf3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#!/usr/bin/env python
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
from __future__ import annotations
import sys
import os
import subprocess
from pathlib import Path
def main():
# The tools listed as entrypoints in setup.py are copied to 'scripts/..'
cmd = Path("..") / Path(sys.argv[0]).name
command = [os.fspath(Path(__file__).parent.resolve() / cmd)]
command.extend(sys.argv[1:])
sys.exit(subprocess.call(command))
def genpyi():
# After we changed the shibokensupport module to be totally virtual,
# it is no longer possible to call the pyi generator from the file system.
command = [sys.executable, "-c",
"import shiboken6;"
"from shibokensupport.signature.lib.pyi_generator import main;"
"main()"] + sys.argv[1:]
sys.exit(subprocess.call(command))
if __name__ == "__main__":
main()
|