Skip to content

Commit

Permalink
Try installing to prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
alugowski committed Jun 2, 2024
1 parent f42f731 commit cf75a88
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,9 @@ jobs:

# macOS libomp requires special configs. BREW_LIBOMP=1 asks suitesparse.sh to include them.
# SUITESPARSE_MACOS_ARCH asks to build a particular architecture. Either x86 or arm64.
CIBW_ENVIRONMENT_MACOS: BREW_LIBOMP="1" SUITESPARSE_MACOS_ARCH=${{ matrix.cibw_archs }}
CIBW_ENVIRONMENT_MACOS: BREW_LIBOMP="1" SUITESPARSE_MACOS_ARCH=${{ matrix.cibw_archs }} GRAPHBLAS_PREFIX="/tmp/graphblas"

CIBW_ENVIRONMENT_LINUX: GRAPHBLAS_PREFIX="/tmp/graphblas"

# Uncomment to only build CPython wheels
# CIBW_BUILD: "cp*"
Expand Down
3 changes: 3 additions & 0 deletions build_graphblas_cffi.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ def tree(dir_path: Path, prefix: str=''):
# Expected subdirectories: include/ (contains GraphBLAS.h), lib/, and bin/ (on Windows only)
# Otherwise fallback to default system folders.
graphblas_root = os.environ.get("GraphBLAS_ROOT", None)
if not graphblas_root:
graphblas_root = os.environ.get("GRAPHBLAS_PREFIX", None)

if not graphblas_root:
# Windows wheels.yml configures suitesparse.sh to install GraphBLAS to "C:\\GraphBLAS".
graphblas_root = "C:\\GraphBLAS" if is_win else sys.prefix
Expand Down
3 changes: 2 additions & 1 deletion suitesparse.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ fi
# Level 2, "run", means that pre-JIT kernels may be used, which does not require a compiler at runtime.
cmake .. -DJITINIT=2 -DCMAKE_BUILD_TYPE=Release -G 'Unix Makefiles' "${cmake_params[@]}"
make -j$NPROC
make install
#make install
cmake --install build --prefix ${GRAPHBLAS_PREFIX}

if [ -n "${CMAKE_GNUtoMS}" ]; then
if [ -z "${GRAPHBLAS_PREFIX}" ]; then
Expand Down

0 comments on commit cf75a88

Please sign in to comment.