fix mac python cpp building (#5786)

diff --git a/python/setup.py b/python/setup.py
index 5f05267..ba74443 100755
--- a/python/setup.py
+++ b/python/setup.py
@@ -188,6 +188,7 @@
 
     if sys.platform == 'darwin':
       extra_compile_args.append("-Wno-shorten-64-to-32");
+      extra_compile_args.append("-Wno-deprecated-register");
 
     # https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes
     # C++ projects must now migrate to libc++ and are recommended to set a