Merge pull request #38904 from Leslie-Fang:lesliefang/fix_tflite_pybind_build_error
PiperOrigin-RevId: 315492031 Change-Id: Ief19d4fea49987b99984ee7b75d71f68a75f2871
This commit is contained in:
commit
a78be1a36b
|
@ -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
|
||||
```
|
||||
|
|
|
@ -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])
|
||||
|
||||
|
|
Loading…
Reference in New Issue