aboutsummaryrefslogtreecommitdiff
path: root/python/setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/setup.py')
-rwxr-xr-xpython/setup.py21
1 files changed, 7 insertions, 14 deletions
diff --git a/python/setup.py b/python/setup.py
index 335e9114..c2769d04 100755
--- a/python/setup.py
+++ b/python/setup.py
@@ -11,14 +11,8 @@ import platform
# namespace_packages option for the "google" package.
from setuptools import setup, Extension, find_packages
+from distutils.command.build_py import build_py as _build_py
from distutils.command.clean import clean as _clean
-
-if sys.version_info[0] == 3:
- # Python 3
- from distutils.command.build_py import build_py_2to3 as _build_py
-else:
- # Python 2
- from distutils.command.build_py import build_py as _build_py
from distutils.spawn import find_executable
# Find the Protocol Compiler.
@@ -185,6 +179,11 @@ if __name__ == '__main__':
extra_compile_args.append('-Wno-write-strings')
extra_compile_args.append('-Wno-invalid-offsetof')
extra_compile_args.append('-Wno-sign-compare')
+ extra_compile_args.append('-Wno-unused-variable')
+ extra_compile_args.append('-std=c++11')
+
+ if sys.platform == 'darwin':
+ extra_compile_args.append("-Wno-shorten-64-to-32");
# https://github.com/Theano/Theano/issues/4926
if sys.platform == 'win32':
@@ -201,12 +200,6 @@ if __name__ == '__main__':
if "clang" in os.popen('$CC --version 2> /dev/null').read():
extra_compile_args.append('-Wno-shorten-64-to-32')
- v, _, _ = platform.mac_ver()
- if v:
- extra_compile_args.append('-std=c++11')
- elif os.getenv('KOKORO_BUILD_NUMBER') or os.getenv('KOKORO_BUILD_ID'):
- extra_compile_args.append('-std=c++11')
-
if warnings_as_errors in sys.argv:
extra_compile_args.append('-Werror')
sys.argv.remove(warnings_as_errors)
@@ -240,7 +233,7 @@ if __name__ == '__main__':
name='protobuf',
version=GetVersion(),
description='Protocol Buffers',
- download_url='https://github.com/google/protobuf/releases',
+ download_url='https://github.com/protocolbuffers/protobuf/releases',
long_description="Protocol Buffers are Google's data interchange format",
url='https://developers.google.com/protocol-buffers/',
maintainer='protobuf@googlegroups.com',