Merge pull request #38904 from Leslie-Fang:lesliefang/fix_tflite_pybind_build_error

PiperOrigin-RevId: 315492031
Change-Id: Ief19d4fea49987b99984ee7b75d71f68a75f2871
This commit is contained in:
TensorFlower Gardener 2020-06-09 09:03:41 -07:00
commit a78be1a36b
2 changed files with 5 additions and 2 deletions

View File

@ -9,6 +9,7 @@ To build a binary wheel run this script:
```sh
sudo apt install swig libjpeg-dev zlib1g-dev python3-dev python3-numpy
pip install numpy pybind11
sh tensorflow/lite/tools/make/download_dependencies.sh
sh tensorflow/lite/tools/pip_package/build_pip_package.sh
```

View File

@ -33,6 +33,7 @@ import sysconfig
from distutils.command.build_ext import build_ext
import numpy
import pybind11
from setuptools import Extension
from setuptools import find_packages
@ -180,8 +181,9 @@ ext = Extension(
'pip_package'),
numpy.get_include(),
os.path.join(DOWNLOADS_DIR, 'flatbuffers', 'include'),
os.path.join(DOWNLOADS_DIR, 'absl')
] + get_pybind_include(),
os.path.join(DOWNLOADS_DIR, 'absl'),
pybind11.get_include()
],
libraries=[LIB_TFLITE],
library_dirs=[LIB_TFLITE_DIR])