-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Composer in purl2url #144
Conversation
@camillem That's great! Could you add the url2purl side as well? |
Yep, I'll do that. |
src/packageurl/contrib/purl2url.py
Outdated
""" | ||
purl_data = PackageURL.from_string(purl) | ||
|
||
name = (purl_data.name or "").replace("_", "-") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm that sure that an empty name is ever possible, see https://github.com/camillem/packageurl-python/blob/e0d180d1ce23f289230a970c2d1e560456300bb8/src/packageurl/__init__.py#L542
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. I just directly copy/pasted it from https://github.com/camillem/packageurl-python/blob/e0d180d1ce23f289230a970c2d1e560456300bb8/src/packageurl/contrib/purl2url.py#L219
I should also check if the replace("_", "-")
makes sense in this context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I simplified this part, as the replace("_", "-")
seemed to be linked to an old pypi.org oddity.
Signed-off-by: Camille Moulin <[email protected]>
Signed-off-by: tdruez <[email protected]>
Thanks @camillem for your contribution 🚀 |
Hi,
I have tried to add support for Composer to purl2url.
It might be relevant to #143
Cheers,
Camille