-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[r] Provide reference to libtiledbsoma
source via soft-link
#1372
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../libtiledbsoma/ | ||
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/sh | ||
|
||
if [ ! -d src/libtiledbsoma ]; then | ||
echo "No 'src/libtiledbsoma' directory. Exiting." | ||
exit 1 | ||
fi | ||
|
||
if [ ! -d src/libtiledbsoma/build-lib ]; then | ||
mkdir src/libtiledbsoma/build-lib | ||
fi | ||
|
||
cwd=`pwd` | ||
|
||
cd src/libtiledbsoma/build-lib | ||
|
||
## The placeholder is filled in by check_cmake_and_git.R | ||
@cmake@ \ | ||
-DDOWNLOAD_TILEDB_PREBUILT=ON \ | ||
-DTILEDBSOMA_BUILD_CLI=OFF \ | ||
-DTILEDBSOMA_ENABLE_TESTING=OFF \ | ||
-DOVERRIDE_INSTALL_PREFIX=OFF \ | ||
-DCMAKE_INSTALL_PREFIX=${cwd}/inst/tiledbsoma .. | ||
|
||
make | ||
|
||
make install-libtiledbsoma | ||
|
||
rm -rf src/libtiledbsoma/build-lib |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
|
||
cmake_bin <- Sys.which("cmake") | ||
if (cmake_bin == "" && file.exists("/Applications/CMake.app/Contents/bin/cmake")) | ||
cmake_bin <- "/Applications/CMake.app/Contents/bin/cmake" | ||
|
||
if (cmake_bin == "") { | ||
stop("No 'cmake' binary found", call. = FALSE) | ||
} | ||
|
||
git_bin <- Sys.which("git") | ||
if (git_bin == "") { | ||
stop("No 'git' binary found", call. = FALSE) | ||
} | ||
|
||
lines <- readLines("tools/build_libtiledbsoma.sh.in") | ||
lines <- gsub("@cmake@", cmake_bin, lines) | ||
writeLines(lines, "tools/build_libtiledbsoma.sh") | ||
Sys.chmod("tools/build_libtiledbsoma.sh", mode="0755") |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,31 @@ | ||||||||||||||||||||||||||
#!/usr/bin/env Rscript | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
## version pinning info | ||||||||||||||||||||||||||
tiledb_core_version <- "2.15.2" | ||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. to minimize keystroking on future dependency-upgrade PRs, @gspowley wrote a very nice it looks like that script might not update this current script as-is -- ? updating that script to handle this file might be done on this PR, or on a follow-up PR There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wondered about that too but I thought the above was better because we only to change once for version and sha1 rather than three times (with largely redundant long URLs): TileDB-SOMA/apis/r/tools/get_tarballs.R Lines 8 to 19 in 326d5ea
Easy enough to revert if that is what we prefer. In tiledb-r I actually update two-line text 'key: value' text file that is then read (via a DCF reader R has in base so no need to worry about jaml or json...): |
||||||||||||||||||||||||||
tiledb_core_sha1 <- "90f30eb" | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
if ( ! dir.exists("inst/") ) { | ||||||||||||||||||||||||||
stop("No 'inst/' directory. Exiting.", call. = FALSE) | ||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
makeUrl <- function(arch, ver=tiledb_core_version, sha1=tiledb_core_sha1) { | ||||||||||||||||||||||||||
sprintf("https://github.com/TileDB-Inc/TileDB/releases/download/%s/tiledb-%s-%s-%s.tar.gz", ver, arch, ver, sha1) | ||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
isX86 <- Sys.info()["machine"] == "x86_64" | ||||||||||||||||||||||||||
isMac <- Sys.info()["sysname"] == "Darwin" | ||||||||||||||||||||||||||
isLinux <- Sys.info()["sysname"] == "Linux" | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
if (isMac && isX86) { | ||||||||||||||||||||||||||
url <- makeUrl("macos-x86_64") | ||||||||||||||||||||||||||
} else if (isMac && !isX86) { | ||||||||||||||||||||||||||
url <- makeUrl("macos-arm64") | ||||||||||||||||||||||||||
} else if (isLinux) { | ||||||||||||||||||||||||||
url <- makeUrl("linux-x86_64") | ||||||||||||||||||||||||||
} else { | ||||||||||||||||||||||||||
stop("Unsupported platform for downloading artifacts. Please have TileDB Core installed locally.") | ||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
tarball <- "tiledb.tar.gz" | ||||||||||||||||||||||||||
if (!file.exists(tarball)) download.file(url, tarball, quiet=TRUE) | ||||||||||||||||||||||||||
if (!dir.exists("inst/tiledb")) untar(tarball, exdir="inst/tiledb") |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨