Commit 8a931ec8 authored by Leo's avatar Leo
Browse files

testing/gyp: use python3

parent f62f9a1c
Pipeline #1404 passed with stages
in 58 seconds
......@@ -3,22 +3,27 @@
pkgname=gyp
pkgver=20190707
_commit=aca1e2c3d346d704adfa60944e6b4dd06f4728be
pkgrel=0
pkgrel=1
pkgdesc="Generate Your Projects Meta-Build system"
options="!check" # Tests currently fail
options="!check"
url="https://gyp.gsrc.io"
arch="noarch"
license="BSD-3-Clause"
depends="py-setuptools ninja"
source="https://github.com/chromium/gyp/archive/$_commit.tar.gz"
depends="py3-setuptools ninja"
source="https://github.com/chromium/gyp/archive/$_commit.tar.gz
fix-cmake.patch
python3.patch
"
builddir="$srcdir/$pkgname-$_commit"
build() {
python2 setup.py build
python3 setup.py build
}
package() {
python2 setup.py install --root="$pkgdir"
python3 setup.py install --root="$pkgdir"
}
sha512sums="bfe8484290e7216888c001638a5b6e42fc254ecf13320c9398a1c2a71e968f8338aebe2fe6edc64de3fe75203ad704bd8976caef21affe21f97430b838fefc52 aca1e2c3d346d704adfa60944e6b4dd06f4728be.tar.gz"
sha512sums="bfe8484290e7216888c001638a5b6e42fc254ecf13320c9398a1c2a71e968f8338aebe2fe6edc64de3fe75203ad704bd8976caef21affe21f97430b838fefc52 aca1e2c3d346d704adfa60944e6b4dd06f4728be.tar.gz
13d71acb086ccae584e0748a0775eab76f83a49f770f534c957ed9fbc5e4c0ab0377152cc5f32523bcd56ce1eac257370a10bba49e13557a3af0262b817f68a5 fix-cmake.patch
f6fc881656b71e317759397a1ad6e804be04af4b22af5bd348a7419a0d42e325732e8094c7b35e31a5d169532f94372d8ed5dc6212ea43fda7824a92c4af6259 python3.patch"
--- a/pylib/gyp/generator/cmake.py
+++ b/pylib/gyp/generator/cmake.py
@@ -40,9 +40,9 @@
try:
# maketrans moved to str in python3.
+ _maketrans = str.maketrans
+except NameError:
_maketrans = string.maketrans
-except NameError:
- _maketrans = str.maketrans
generator_default_variables = {
'EXECUTABLE_PREFIX': '',
@@ -281,7 +281,7 @@
dirs = set(dir for dir in (os.path.dirname(o) for o in outputs) if dir)
if int(action.get('process_outputs_as_sources', False)):
- extra_sources.extend(zip(cmake_outputs, outputs))
+ extra_sources.extend(list(zip(cmake_outputs, outputs)))
# add_custom_command
output.write('add_custom_command(OUTPUT ')
@@ -987,7 +987,7 @@
# XCode settings
xcode_settings = config.get('xcode_settings', {})
- for xcode_setting, xcode_value in xcode_settings.viewitems():
+ for xcode_setting, xcode_value in xcode_settings.items():
SetTargetProperty(output, cmake_target_name,
"XCODE_ATTRIBUTE_%s" % xcode_setting, xcode_value,
'' if isinstance(xcode_value, str) else ' ')
diff -pruN gyp-0.1-gitfcd686f1.orig/gyp gyp-0.1-gitfcd686f1/gyp
--- gyp-0.1-gitfcd686f1.orig/gyp 2015-04-30 09:48:21.000000000 +0000
+++ gyp-0.1-gitfcd686f1/gyp 2019-08-14 09:41:05.343208034 +0000
@@ -5,4 +5,4 @@
set -e
base=$(dirname "$0")
-exec python "${base}/gyp_main.py" "$@"
+exec python3 "${base}/gyp_main.py" "$@"
diff -pruN gyp-0.1-gitfcd686f1.orig/gyp_main.py gyp-0.1-gitfcd686f1/gyp_main.py
--- gyp-0.1-gitfcd686f1.orig/gyp_main.py 2016-10-17 02:00:37.000000000 +0000
+++ gyp-0.1-gitfcd686f1/gyp_main.py 2019-08-14 09:41:43.380207320 +0000
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) 2009 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
diff -pruN gyp-0.1-gitfcd686f1.orig/gyptest.py gyp-0.1-gitfcd686f1/gyptest.py
--- gyp-0.1-gitfcd686f1.orig/gyptest.py 2019-08-14 09:05:50.000000000 +0000
+++ gyp-0.1-gitfcd686f1/gyptest.py 2019-08-14 09:41:48.578208719 +0000
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
diff -pruN gyp-0.1-gitfcd686f1.orig/setup.py gyp-0.1-gitfcd686f1/setup.py
--- gyp-0.1-gitfcd686f1.orig/setup.py 2015-04-30 09:48:21.000000000 +0000
+++ gyp-0.1-gitfcd686f1/setup.py 2019-08-14 09:41:53.510210046 +0000
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) 2009 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment