Nuitka: importlib.resources.files do not work with Python 3.10 and standalone
-
Nuitka version, full Python version, flavor, OS, etc. as output by this command (it does more than you think, and we are adding more all the time):
python -m nuitka --version
0.8rc3
Commercial: None
Python: 3.10.2 (main, Jan 16 2022, 17:11:27) [GCC 11.2.0]
Flavor: Debian Python
Executable: /tmp/venv/bin/python
OS: Linux
Arch: x86_64
Distribution: Debian (based on None) None
- How did you install Nuitka and Python
git clone of the develop branch and install via pip into an venv.
- Also supply a Short, Self Contained, Correct, Example
Building the following foo.py via python -m nuitka --standalone foo.py
from importlib.resources import files
import nuitka
print(files('nuitka'))
Running /tmp/foo.dist/foo produces the following output:
<importlib._adapters.DegenerateFiles.Path object at 0x7f8005ff2980>
but I was expecting
/tmp/foo.dist/nuitka
which it does if the same code is compiled with Python 3.9.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (12 by maintainers)
Ah, yes
sid, I didn’t have any of that yet. I think, using/sidwill allow me to detect that. The “based on” output, is another thing, looks silly for Debian proper. Thanks. Thefileswill be added once I finally get tests withopen_resourceusage to pass. Once I have something to point you to, I would appreciate if you can see it saying “Sid” for version as well.