Skip to content

Conversation

@GabMus
Copy link

@GabMus GabMus commented Mar 11, 2023

No description provided.

@mig5
Copy link

mig5 commented May 29, 2023

Thank you for this! I applied this as a patch and it has solved the problem for me when running flatpak-poetry-generator.py against my poetry.lock after I upgraded poetry to version 1.5.0.

Copy link
Contributor

@ENDrain ENDrain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Maybe could also add a line in README.md listing metadata formats supported, but not sure if that's necessary. @mig5, since this worked for you could you also please add an approving review?

@GabMus
Copy link
Author

GabMus commented Sep 23, 2023

I really think we should merge this

@d4nj1
Copy link

d4nj1 commented Jan 17, 2024

@hfiguiere
Copy link
Collaborator

Can you rebase this? We could get it merged eventually.

@uninstall-your-browser
Copy link

uninstall-your-browser commented Jun 2, 2024

--production does not seem to work, it still tries (and fails) to retrieve dev dependencies (unless I'm somehow generating my lock file wrong?). Though it should probably be changed to --without <group-name>, since poetry has deprecated --no-dev.

@hfiguiere
Copy link
Collaborator

@GabMus unless this gets rebased, this can't be merged.

@hfiguiere hfiguiere added the Need Rebase The PR need rebase before merging label Nov 9, 2024
@GabMus
Copy link
Author

GabMus commented Nov 11, 2024

rebased, note that this PR is ancient and I don't even use flatpak-builder-tools anymore, so make sure this works as expected before merging

@bbhtt bbhtt removed the Need Rebase The PR need rebase before merging label May 1, 2025
@bbhtt
Copy link
Collaborator

bbhtt commented May 3, 2025

I'll try to review and merge this in the next weeks. It would have been nice if the lock file format was documented but according to https://github.com/orgs/python-poetry/discussions/6763 it's not.

In the meantime, flatpak-pip-generator now supports parsing pyproject.toml and Poetry v2 supports PEP 621 metadata. So flatpak-pip-generator can be used directly instead of operating on the lock file.

@bbhtt
Copy link
Collaborator

bbhtt commented May 4, 2025

Would also be nice if the --yaml output format could be added similar to

This should be a separate issue. You just include the generated manifest. Having multiple formats is not a top priority.

--production does not seem to work, it still tries (and fails) to retrieve dev dependencies

--production should work now for v2 metadata.

Though it should probably be changed to --without <group-name>, since poetry has deprecated --no-dev.

Indeed, generic group support can be done later. This can be a separate issue. For now --production excludes things that have only dev in their groups.

Gabriele Musco and others added 3 commits May 4, 2025 08:05
accomodate for missing category in package

Fixes flatpak#371
This should later be expanded to support any group akin to
poetry's --with and --without GROUP args
@bbhtt
Copy link
Collaborator

bbhtt commented May 4, 2025

Tested this on a v1 and v2 lock files with the --production combination. Seems to work.

poetryv2.txt
poetryv1.txt

@bbhtt bbhtt merged commit 04356bc into flatpak:master May 4, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants