From c198fc05e6d8a75ce9ff3986065243425c6a1297 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Wed, 19 Aug 2026 00:44:28 -0400 Subject: sbolint: catch pypi.org URLs with hash, too. --- sbolint | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sbolint b/sbolint index a46ad3d..d0d9e6e 100755 --- a/sbolint +++ b/sbolint @@ -1417,8 +1417,9 @@ sub check_pypi_url { my $initial; my $newurl; my $srcnam; + my $host; - return unless $url =~ m{^(https?)://files.pythonhosted.org}; + return unless $url =~ m{^(https?)://(files\.pythonhosted\.org|pypi\.python\.org)/}; if($1 ne 'https') { log_error("$file: pypi URL must be https://"); @@ -1432,6 +1433,9 @@ sub check_pypi_url { # FIXME: assumes no - in the version number. So far that's true... ($srcnam = $filename) =~ s,-\d[^-]*\.tar\.gz$,,; + # 20260819 bkw: the pypi.python.org URLs just redirect to the equivalent + # files.pythonhosted.org URL, so make hosted the default to avoid an extra + # HTTPS transaction. $newurl = "https://files.pythonhosted.org/packages/source/$initial/$srcnam/$filename"; if($url ne $newurl) { log_warning("$file: canonical pypi URL should be $newurl"); -- cgit v1.2.3