From dd25ac76784f47659b3793e6ffa9e506948a228c Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 2 Feb 2019 11:18:39 +0100 Subject: [PATCH] webbuild minor fixes/changes --- mirrors.php | 2 +- scripts/webbuild/webbuild.js | 4 +++- webbuild.js.inc | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/mirrors.php b/mirrors.php index 56f7c68..086ef0f 100755 --- a/mirrors.php +++ b/mirrors.php @@ -16,4 +16,4 @@ if (!$repo || !$arch) { foreach ($basedirs as $basedir) { echo $basedir . $repo . "/RPMS." . $arch . "/" . "\n"; } -?> \ No newline at end of file +?> diff --git a/scripts/webbuild/webbuild.js b/scripts/webbuild/webbuild.js index 9e23300..38f2e60 100644 --- a/scripts/webbuild/webbuild.js +++ b/scripts/webbuild/webbuild.js @@ -78,6 +78,8 @@ function suggestSpecName(url) { specname="perl-"+specname; } else if (url.search("haskell.org") >= 0) { specname="ghc-"+specname; + } else if (url.search("pypi") >= 0) { + specname="python-"+specname.replace('.','-'); } else if (extension == "gem") { specname="ruby-"+specname; } else { @@ -115,7 +117,7 @@ function suggestSpecName(url) { if (document.getElementById("speccreatetype").options[j].value == "perl") document.getElementById("speccreatetype").options[j].selected=true; }; - } else if ((specname.search("python-") >= 0) || (specname.substring(0,2) == "py")) { + } else if ((specname.search("python-") >= 0) || (specname.substring(0,2) == "py") || (url.search("pypi") >= 0)) { for (var j=0;j