flatpak-builder-tools
flatpak-builder-tools copied to clipboard
poetry: flatpak-poetry-generator.py doesn't seem to work with new poetry.lock files
flatpak-builder version
1.2.3
Linux distribution and version
Ubuntu 23.04
Affected flatpak-builder tool
cargo/flatpak-cargo-generator.py
flatpak-builder tool cli args
No response
Source repository URL
No response
Flatpak-builder manifest URL
No response
Description
It seems that flatpak-poetry-generator.py
doesn't work with poetry.lock
files generated by Poetry 1.5.1. Here's the error I get:
$ ./flatpak-poetry-generator.py ../../onionshare/cli/poetry.lock
Scanning "../../onionshare/cli/poetry.lock"
Traceback (most recent call last):
File "/home/user/code/flatpak-builder-tools/poetry/./flatpak-poetry-generator.py", line 166, in <module>
main()
File "/home/user/code/flatpak-builder-tools/poetry/./flatpak-poetry-generator.py", line 139, in main
dep_names = get_dep_names(parsed_lockfile, include_devel=include_devel)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/code/flatpak-builder-tools/poetry/./flatpak-poetry-generator.py", line 112, in get_dep_names
package["category"] == "dev"
~~~~~~~^^^^^^^^^^^^
KeyError: 'category'
I tried fixing the missing category
key problems, but then kept running into additional errors. I think that the problem is the format of poetry.lock
has maybe changed in newer versions of Poetry.
I've attached the poetry.lock
file.