Details
Description
I was trying Shiboken with examples in https://doc.qt.io/qtforpython-6/examples/example_samplebinding_samplebinding.html. After the module was compiled, I tried to create stubs with
shiboken6-genpyi ./Universe.so
which then complains
Traceback (most recent call last): File "<string>", line 1, in <module> File "shibokensupport/signature/lib/pyi_generator.py", line 364, in main NameError: name 'os' is not defined
Inspired by https://bugreports.qt.io/browse/PYSIDE-1994, I then tried
export SBK_EMBED=0 shiboken6-genpyi ./Universe.so
The error became:
Traceback (most recent call last): File "<string>", line 1, in <module> File "/media/project/shibokentest/.venv/lib/python3.10/site-packages/shiboken6/files.dir/shibokensupport/signature/lib/pyi_generator.py", line 364, in main qtest_env = os.environ.get("QTEST_ENVIRONMENT", "") NameError: name 'os' is not defined
After browsing that script and [https://github.com/pyside/pyside-setup/blob/6.8.2/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/lib/pyi_generator.py] I found 'os' is indeed not imported.
Attachments
Issue Links
- relates to
-
PYSIDE-1994 shiboken6-genpyi has several import errors
-
- Closed
-