Use pure python3

There is no sense in complicating things, borrow idea to use python3 only from alzim2/chromium-browser-stable
This commit is contained in:
Mikhail Novosyolov 2021-09-06 17:45:47 +03:00
parent 5fcc387303
commit 54e37fbaa7
2 changed files with 0 additions and 89 deletions

View file

@ -121,9 +121,6 @@ Patch639: wayland-strndup.patch
# Fix building with current glib2.0
# Hunks from https://build.opensuse.org/package/view_file/openSUSE:Factory/chromium/chromium-gcc11.patch
Patch643: glib2.0.patch
# Fix mess of python2 and python3
# https://github.com/saiarcot895/chromium-ubuntu-build/blob/master/debian/patches/rename-python-to-python2.patch
Patch646: rename-python-to-python2.patch
Patch647: ALT-allow-to-override-clang-through-env-variables.patch
# XXX This patch is not enough to fully fix debuginfo and debugsource subpackages
Patch648: fix-debugsource.patch

View file

@ -1,86 +0,0 @@
Index: dev/tools/gn/bootstrap/bootstrap.py
===================================================================
--- dev.orig/tools/gn/bootstrap/bootstrap.py
+++ dev/tools/gn/bootstrap/bootstrap.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
Index: dev/tools/generate_stubs/generate_stubs.py
===================================================================
--- dev.orig/tools/generate_stubs/generate_stubs.py
+++ dev/tools/generate_stubs/generate_stubs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
Index: dev/tools/gn/build/gen.py
===================================================================
--- dev.orig/tools/gn/build/gen.py
+++ dev/tools/gn/build/gen.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
Index: dev/tools/gn/src/gn/setup.cc
===================================================================
--- dev.orig/tools/gn/src/gn/setup.cc
+++ dev/tools/gn/src/gn/setup.cc
@@ -795,7 +795,7 @@ bool Setup::FillPythonPath(const base::C
}
build_settings_.set_python_path(python_path);
#else
- build_settings_.set_python_path(base::FilePath("python"));
+ build_settings_.set_python_path(base::FilePath("python2"));
#endif
}
return true;
Index: dev/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py
===================================================================
--- dev.orig/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py
+++ dev/third_party/catapult/common/py_vulcanize/py_vulcanize/generate.py
@@ -83,7 +83,7 @@ def _MinifyJS(input_js):
with tempfile.NamedTemporaryFile() as _:
args = [
- sys.executable,
+ 'python3',
rjsmin_path
]
p = subprocess.Popen(args,
Index: dev/ui/gfx/x/gen_xproto.py
===================================================================
--- dev.orig/ui/gfx/x/gen_xproto.py
+++ dev/ui/gfx/x/gen_xproto.py
@@ -1087,7 +1087,7 @@ class GenXproto(FileWriter):
self.resolve_element(t.elt, fields)
- for field in fields.values():
+ for field in list(fields.values()):
if field.field_name == 'sequence':
field.visible = True
field.parent = (t, name)
@@ -1629,8 +1630,14 @@ def main():
args = parser.parse_args()
sys.path.insert(1, args.xcbproto_dir)
- import xcbgen.xtypes
- import xcbgen.state
+ try:
+ import xcbgen.xtypes
+ import xcbgen.state
+ except:
+ if sys.version_info < (3, 0):
+ import subprocess
+ subprocess.check_call(["python3"] + sys.argv)
+ return 0
all_types = {}
proto_src_dir = os.path.join(args.xcbproto_dir, 'src')