Skip to content

Commit

Permalink
Quote packages so shells don't get unhappy (#561)
Browse files Browse the repository at this point in the history
Co-authored-by: Bradley Dice <[email protected]>
  • Loading branch information
betatim and bdice authored Nov 15, 2024
1 parent 47cc727 commit 7763ec8
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions _includes/selector.html
Original file line number Diff line number Diff line change
Expand Up @@ -556,14 +556,14 @@
else {
index_url = `--${this.highlightFlag("extra-index-url")}=https://pypi.anaconda.org/rapidsai-wheels-nightly/simple`;
var version = this.removeLeadingZeros("{{ site.data.releases.nightly.version }}")
cuda_suffix = cuda_suffix + `>=${version}.0a0,<=${version}"`;
cuda_suffix = cuda_suffix + `>=${version}.0a0,<=${version}`;
var libraryToPkg = (pkg) => {
pkg = pkg.toLowerCase();
if (pkg === "cuspatial/cuproj") return ["\"cuspatial" + cuda_suffix, "\"cuproj" + cuda_suffix];
if (pkg === "raft") return ["\"pylibraft" + cuda_suffix, "\"raft-dask" + cuda_suffix];
if (pkg === "cuvs") return ["\"cuvs" + cuda_suffix, "\"pylibraft" + cuda_suffix];
if (pkg === "cugraph/nx-cugraph") return ["\"cugraph" + cuda_suffix, "\"nx-cugraph" + cuda_suffix];
return ["\"" + pkg + cuda_suffix];
if (pkg === "cuspatial/cuproj") return ["cuspatial" + cuda_suffix, "cuproj" + cuda_suffix];
if (pkg === "raft") return ["pylibraft" + cuda_suffix, "raft-dask" + cuda_suffix];
if (pkg === "cuvs") return ["cuvs" + cuda_suffix, "pylibraft" + cuda_suffix];
if (pkg === "cugraph/nx-cugraph") return ["cugraph" + cuda_suffix, "nx-cugraph" + cuda_suffix];
return [pkg + cuda_suffix];
}
}

Expand All @@ -583,9 +583,12 @@

// pkgs.length == 2 because it includes the "Choose Specific Packages" option
if (this.active_release === "Nightly" && !(pkgs.length === 2 && pkgs[0] === "cucim")) {
pkgs.push(["\"dask-cuda" + cuda_suffix.slice(5)])
pkgs.push(["dask-cuda" + cuda_suffix.slice(5)])
}

// Make sure all packages (and version selectors) are quoted
pkgs = pkgs.flatMap(pkg => '"' + pkg + '"');

// For every n packages add a new line with a "\" character
// We need i += n + 1 since the splice adds a new element to the array
if (this.active_release === "Stable") {
Expand Down

0 comments on commit 7763ec8

Please sign in to comment.