You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
❯ pip show packageurl-python
Name: packageurl-python
Version: 0.14.0
Summary: A purl aka. Package URL parser and builder
Home-page: https://github.com/package-url/packageurl-python
Author: the purl authors
Author-email:
License: MIT
Location: /home/jloehel/python/venv3.9/lib/python3.9/site-packages
Requires:
Required-by:
❯ python
Python 3.9.18 (main, Sep 06 2023, 07:49:32) [GCC] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from packageurl.contrib import url2purl
>>> url2purl.get_purl("https://github.com/apache/logging-log4net/archive/refs/tags/rc/2.0.8-RC1.zip")
PackageURL(type='github', namespace='apache', name='logging-log4net', version='2.0.8-RC1', qualifiers={}, subpath=None)
>>> url2purl.get_purl("https://github.com/apache/logging-log4net/tree/rel/2.0.8")
PackageURL(type='github', namespace='apache', name='logging-log4net', version='rel', qualifiers={}, subpath='2.0.8')
>>>
For the first URI the version is correct but the prefix gets lost. How can I re-construct a working URI from it? The second URI does not work. The version_prefix is the version and the version is the subpath.
Note: https://github.com/apache/logging-log4net/tree/rel/2.0.8 is really tricky and I think not possible to realize just with regular expressions. It would be necessary to know about the existing refs.
The text was updated successfully, but these errors were encountered:
jloehel
changed the title
Github tags/release with a / in the prefix
Github tags/releases with a / in the prefix
Mar 1, 2024
Examples:
Parsing those will result in:
For the first URI the version is correct but the prefix gets lost. How can I re-construct a working URI from it? The second URI does not work. The version_prefix is the version and the version is the subpath.
Expected result:
Note:
https://github.com/apache/logging-log4net/tree/rel/2.0.8
is really tricky and I think not possible to realize just with regular expressions. It would be necessary to know about the existing refs.The text was updated successfully, but these errors were encountered: