aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-08-19 00:44:28 -0400
committerB. Watson <urchlay@slackware.uk>2026-08-19 00:44:28 -0400
commitc198fc05e6d8a75ce9ff3986065243425c6a1297 (patch)
tree69df6aa7ed9e8c6728e29e72d6d9d69b7de013da
parent9bd7ede6b70590c70d15c4dd3b3e59b5d7da2816 (diff)
downloadsbo-maintainer-tools-c198fc05e6d8a75ce9ff3986065243425c6a1297.tar.gz
sbolint: catch pypi.org URLs with hash, too.HEADmaster
-rwxr-xr-xsbolint6
1 files changed, 5 insertions, 1 deletions
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");