diff options
Diffstat (limited to 'python/setup.py')
-rwxr-xr-x | python/setup.py | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/python/setup.py b/python/setup.py index a9df075e..9a02a246 100755 --- a/python/setup.py +++ b/python/setup.py @@ -44,6 +44,7 @@ def GetVersion(): with open(os.path.join('google', 'protobuf', '__init__.py')) as version_file: exec(version_file.read(), globals()) + global __version__ return __version__ @@ -148,10 +149,9 @@ class build_py(_build_py): class test_conformance(_build_py): target = 'test_python' def run(self): - if sys.version_info >= (2, 7): - # Python 2.6 dodges these extra failures. - os.environ["CONFORMANCE_PYTHON_EXTRA_FAILURES"] = ( - "--failure_list failure_list_python-post26.txt") + # Python 2.6 dodges these extra failures. + os.environ["CONFORMANCE_PYTHON_EXTRA_FAILURES"] = ( + "--failure_list failure_list_python-post26.txt") cmd = 'cd ../conformance && make %s' % (test_conformance.target) status = subprocess.check_call(cmd, shell=True) @@ -185,6 +185,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 +206,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 +239,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', |