From 08e2c161e032173577fd7fadba538b4a3cd01800 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Tue, 19 Jan 2016 14:39:33 -0600 Subject: [PATCH] Look for libraries in some more places (Fixes #98) --- setup.cfg | 2 +- setup.py | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/setup.cfg b/setup.cfg index eca7b43f..b4f38af6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,3 @@ [flake8] -ignore = E126,E127,E128,E123,E226,E241,E242 +ignore = E126,E127,E128,E123,E226,E241,E242,W503 max-line-length=85 diff --git a/setup.py b/setup.py index 1f7aa757..61ae10da 100644 --- a/setup.py +++ b/setup.py @@ -36,6 +36,12 @@ def get_config_schema(): else: cuda_root_default = normpath(join(dirname(nvcc_path), "..")) + default_lib_dirs = [ + "${CUDA_ROOT}/lib", "${CUDA_ROOT}/lib64", + # https://github.com/inducer/pycuda/issues/98 + "${CUDA_ROOT}/lib/stubs", "${CUDA_ROOT}/lib64/stubs", + ] + return ConfigSchema(make_boost_base_options() + [ Switch("USE_SHIPPED_BOOST", True, "Use included Boost library"), @@ -52,17 +58,13 @@ def get_config_schema(): Switch("CUDA_ENABLE_GL", False, "Enable CUDA GL interoperability"), Switch("CUDA_ENABLE_CURAND", True, "Enable CURAND library"), - LibraryDir("CUDADRV", [ - "${CUDA_ROOT}/lib", "${CUDA_ROOT}/lib64", - # https://github.com/inducer/pycuda/issues/98 - "${CUDA_ROOT}/lib/stubs", "${CUDA_ROOT}/lib64/stubs", - ]), + LibraryDir("CUDADRV", default_lib_dirs), Libraries("CUDADRV", ["cuda"]), - LibraryDir("CUDART", ["${CUDA_ROOT}/lib", "${CUDA_ROOT}/lib64"]), + LibraryDir("CUDART", default_lib_dirs), Libraries("CUDART", ["cudart"]), - LibraryDir("CURAND", ["${CUDA_ROOT}/lib", "${CUDA_ROOT}/lib64"]), + LibraryDir("CURAND", default_lib_dirs), Libraries("CURAND", ["curand"]), StringListOption("CXXFLAGS", [],