trying to work around tensorflow limitations
This commit is contained in:
@@ -42,17 +42,15 @@ class CMakeBuild(build_ext):
|
||||
python_lib_dirs = distutils.sysconfig.get_config_var('LIBDIR')
|
||||
# tensorflow directories
|
||||
import tensorflow as tf
|
||||
tf_include_dirs = tf.sysconfig.get_include()
|
||||
tf_lib_dirs = tf.sysconfig.get_lib()
|
||||
tf_abi = tf.__cxx11_abi_flag__ if "__cxx11_abi_flag__" in tf.__dict__ else 0
|
||||
tf_libs = 'tensorflow_framework'
|
||||
|
||||
tf_include_dirs = tf.sysconfig.get_include()
|
||||
tf_libs = tf.sysconfig.get_link_flags()[1].replace('-l', '')
|
||||
cmake_args = ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir,
|
||||
'-DBUILD_TESTS=OFF',
|
||||
'-DBUILD_PYTHON_MODULE=ON',
|
||||
'-DPYTHON_INCLUDE_DIRS=' + python_include_dirs,
|
||||
'-DTF_INCLUDE_DIRS=' + tf_include_dirs,
|
||||
'-DTF_LIB_DIRS=' + tf_lib_dirs,
|
||||
'-DTF_LIB_DIRS=' + tf.sysconfig.get_lib(),
|
||||
'-DTF_LIBS=' + tf_libs,
|
||||
'-DTF_ABI=' + str(tf_abi)]
|
||||
|
||||
|
Reference in New Issue
Block a user