aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/lib
diff options
context:
space:
mode:
authorGravatar Yong Tang <yong.tang.github@outlook.com>2018-06-30 19:03:26 -0700
committerGravatar Yong Tang <yong.tang.github@outlook.com>2018-08-08 19:38:11 +0000
commit30a7ef5b689acc97685d8a32d99f4d59bebc8d5f (patch)
tree832f91bdbc58a8363e6189595e728f3b42d5f9f5 /tensorflow/python/lib
parent85fb2bf56873638bb65d9cad75d59a0a16087fe3 (diff)
Fix build issue on mac with python-2.7.10 and clang 9.1.0
In PR 19993 the build issues on macOS with python2.7.10 and clang-9.1.0 were fixed. However, later on it looks like the order of `<locale>` and `<Python.h>` has been changed in https://github.com/tensorflow/tensorflow/commit/1e7b0e4ad6d0f57f3241fe0b80a65f2c2a7f11b0 possibly caused by `clang-format -i --style=`. This caused the build break of macOS with python-2.7.10 and clang 9.1.0 again. This fix updates the impacted files, and, adds an empty line in between so that future `clang-format -i --style` will not cuase build breaks. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Diffstat (limited to 'tensorflow/python/lib')
-rw-r--r--tensorflow/python/lib/core/py_util.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/tensorflow/python/lib/core/py_util.cc b/tensorflow/python/lib/core/py_util.cc
index 2ee898ea1d..739cab46b1 100644
--- a/tensorflow/python/lib/core/py_util.cc
+++ b/tensorflow/python/lib/core/py_util.cc
@@ -18,6 +18,8 @@ limitations under the License.
// Place `<locale>` before <Python.h> to avoid build failure in macOS.
#include <locale>
+// The empty line above is on purpose as otherwise clang-format will
+// automatically move <Python.h> before <locale>.
#include <Python.h>
#include "tensorflow/core/lib/core/errors.h"