caffe: fix python build

This commit is contained in:
avitex 2019-06-17 19:42:04 +10:00 committed by Frederik Rietdijk
parent 5f597d4b4c
commit 955ed925e5
2 changed files with 2 additions and 2 deletions

View file

@ -53,7 +53,7 @@ stdenv.mkDerivation rec {
cmakeFlags =
# It's important that caffe is passed the major and minor version only because that's what
# boost_python expects
[ (if pythonSupport then "-Dpython_version=3${python.pythonVersion}" else "-DBUILD_python=OFF")
[ (if pythonSupport then "-Dpython_version=${python.pythonVersion}" else "-DBUILD_python=OFF")
"-DBLAS=open"
] ++ (if cudaSupport then [
"-DCUDA_ARCH_NAME=All"

View file

@ -64,7 +64,7 @@ index 4a5bac47..be026d43 100644
- if(PYTHONLIBS_FOUND AND NUMPY_FOUND AND Boost_PYTHON_FOUND)
+ find_package(NumPy 1.7.1)
+ find_package(Boost 1.46 REQUIRED COMPONENTS python@major@@minor@)
+ if(PYTHONLIBS_FOUND AND NUMPY_FOUND AND BOOST_PYTHON@major@@minor@_FOUND)
+ if(PYTHONLIBS_FOUND AND NUMPY_FOUND AND Boost_PYTHON@major@@minor@_FOUND)
set(HAVE_PYTHON TRUE)
if(BUILD_python_layer)
list(APPEND Caffe_DEFINITIONS PRIVATE -DWITH_PYTHON_LAYER)