[python] renamed src/tensorflow.cc -> src/bindings.cc

This commit is contained in:
Philippe Tillet
2019-09-05 09:39:58 -04:00
parent b2629da1fe
commit 58544d0523
3 changed files with 4 additions and 4 deletions

View File

@@ -33,12 +33,13 @@ endif()
if(BUILD_PYTHON_MODULE)
message(STATUS "Adding Python module")
# PyBind11 wrapper source file
file(GLOB_RECURSE PYTHON_SRC python/src/tensorflow.cc)
file(GLOB_RECURSE PYTHON_SRC python/src/bindings.cc)
include_directories(python/src/ ${PYTHON_INCLUDE_DIRS})
if(TF_LIBS)
# extra tensorflow ops (e.g., alloc_empty)
# update directories
link_directories(${TF_LIB_DIRS})
include_directories(python/src/ ${PYTHON_INCLUDE_DIRS} ${TF_INCLUDE_DIRS})
include_directories(${TF_INCLUDE_DIRS})
# get sources
file(GLOB_RECURSE EXTRA_TF_OPS_SRC python/src/tensorflow/*.cc)
add_library(extra_tf_ops SHARED ${EXTRA_TF_OPS_SRC})

View File

@@ -37,10 +37,9 @@ class CMakeBuild(build_ext):
def build_extension(self, ext):
self.debug = True
extdir = os.path.abspath(os.path.dirname(self.get_ext_fullpath(ext.name)))
# python directors
# python directories
python_include_dirs = distutils.sysconfig.get_python_inc()
python_lib_dirs = distutils.sysconfig.get_config_var('LIBDIR')
# tensorflow directories
cmake_args = ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir,
'-DBUILD_TESTS=OFF',
'-DBUILD_PYTHON_MODULE=ON',