File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11Changelog
22=========
33
4+ 0.13.4 (2024-01-08)
5+ -------------------
6+
7+ - Improve support for SourceForge URLs in `url2purl `.
8+ https://github.com/package-url/packageurl-python/issues/139
9+
4100.13.3 (2024-01-04)
511-------------------
612
Original file line number Diff line number Diff line change 11[metadata]
22name = packageurl-python
3- version = 0.13.3
3+ version = 0.13.4
44license = MIT
55description = A purl aka. Package URL parser and builder
66long_description = file:README.rst
Original file line number Diff line number Diff line change @@ -361,6 +361,18 @@ def build_pypi_purl(uri):
361361register_pattern ("sourceforge" , sourceforge_download_pattern )
362362
363363
364+ # https://sourceforge.net/projects/spacesniffer/files/spacesniffer_1_3_0_2.zip/download
365+ sourceforge_download_pattern_bis = (
366+ r"^https?://.*sourceforge.net/projects/"
367+ r"(?P<name>.+)/"
368+ r"files/"
369+ r"(?i:(?P=name))_*(?P<version>[0-9_]+).*"
370+ r"(/download)$" # ending with "/download"
371+ )
372+
373+ register_pattern ("sourceforge" , sourceforge_download_pattern_bis )
374+
375+
364376@purl_router .route ("https?://.*sourceforge.net/project/.*" )
365377def build_sourceforge_purl (uri ):
366378 # We use a more general route pattern instead of using `sourceforge_pattern`
Original file line number Diff line number Diff line change 175175 "https://sourceforge.net/projects/turbovnc/files/3.1/turbovnc-3.1.tar.gz/download" : " pkg:sourceforge/turbovnc@3.1" ,
176176 "https://sourceforge.net/projects/ventoy/files/v1.0.96/Ventoy%201.0.96%20release%20source%20code.tar.gz/download" : " pkg:sourceforge/ventoy@1.0.96" ,
177177 "https://sourceforge.net/projects/geoserver/files/GeoServer/2.23.4/geoserver-2.23.4-war.zip/download" : " pkg:sourceforge/geoserver@2.23.4" ,
178+ "https://sourceforge.net/projects/spacesniffer/files/spacesniffer_1_3_0_2.zip/download" : " pkg:sourceforge/spacesniffer@1_3_0_2" ,
178179 "https://crates.io/api/v1/crates/rand/0.7.2/download" : " pkg:cargo/rand@0.7.2" ,
179180 "https://crates.io/api/v1/crates/clap/2.33.0/download" : " pkg:cargo/clap@2.33.0" ,
180181 "https://crates.io/api/v1/crates/structopt/0.3.11/download" : " pkg:cargo/structopt@0.3.11" ,
You can’t perform that action at this time.
0 commit comments