[arch-commits] Commit in gyp/repos/extra-any (4 files)

Jan Steffens heftig at archlinux.org
Sat Sep 28 21:57:34 UTC 2019


    Date: Saturday, September 28, 2019 @ 21:57:34
  Author: heftig
Revision: 363524

archrelease: copy trunk to extra-any

Added:
  gyp/repos/extra-any/PKGBUILD
    (from rev 363523, gyp/trunk/PKGBUILD)
  gyp/repos/extra-any/gyp-fix-cmake.patch
    (from rev 363523, gyp/trunk/gyp-fix-cmake.patch)
  gyp/repos/extra-any/gyp-python38.patch
    (from rev 363523, gyp/trunk/gyp-python38.patch)
Deleted:
  gyp/repos/extra-any/PKGBUILD

---------------------+
 PKGBUILD            |   75 ++++++++++++++++++++++++++++----------------------
 gyp-fix-cmake.patch |   33 ++++++++++++++++++++++
 gyp-python38.patch  |   63 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 139 insertions(+), 32 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2019-09-28 21:57:25 UTC (rev 363523)
+++ PKGBUILD	2019-09-28 21:57:34 UTC (rev 363524)
@@ -1,32 +0,0 @@
-# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens at gmail.com>
-
-pkgname=gyp
-pkgver=20190716.fcd686f1
-pkgrel=1
-pkgdesc='"Generate Your Projects" Meta-Build system'
-arch=(any)
-url="https://gyp.gsrc.io/"
-license=(custom:BSD)
-depends=(python-setuptools ninja)
-makedepends=(git)
-_commit=fcd686f1880fa52a1ee78d3e98af1b88cb334528  # changes/82/1701782/5
-source=("git+https://chromium.googlesource.com/external/gyp#commit=$_commit")
-sha256sums=('SKIP')
-
-pkgver() {
-  cd $pkgname
-
-  # Commit date + short rev
-  echo $(TZ=UTC git show -s --pretty=%cd --date=format-local:%Y%m%d HEAD).$(git rev-parse --short HEAD)
-}
-
-build() {
-  cd $pkgname
-  python setup.py build
-}
-
-package() {
-  cd $pkgname
-  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
-  install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 LICENSE
-}

Copied: gyp/repos/extra-any/PKGBUILD (from rev 363523, gyp/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2019-09-28 21:57:34 UTC (rev 363524)
@@ -0,0 +1,43 @@
+# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens at gmail.com>
+
+pkgname=gyp
+pkgver=20190716.fcd686f1
+pkgrel=2
+pkgdesc='"Generate Your Projects" Meta-Build system'
+arch=(any)
+url="https://gyp.gsrc.io/"
+license=(custom:BSD)
+depends=(python-setuptools ninja)
+makedepends=(git)
+_commit=fcd686f1880fa52a1ee78d3e98af1b88cb334528  # changes/82/1701782/5
+source=("git+https://chromium.googlesource.com/external/gyp#commit=$_commit"
+        gyp-fix-cmake.patch gyp-python38.patch)
+sha256sums=('SKIP'
+            '8610250f946ee070c5182cc87cd23cdd9f66a47ec57a98049bb2aaae4a1e09e6'
+            '6580f0f02f430f1ba4aa7e8e2d32203dcb3d6f07f1de5287d0fb33ab2ed1cc30')
+
+pkgver() {
+  cd $pkgname
+
+  # Commit date + short rev
+  echo $(TZ=UTC git show -s --pretty=%cd --date=format-local:%Y%m%d HEAD).$(git rev-parse --short HEAD)
+}
+
+prepare() {
+  cd $pkgname
+
+  # Python 3 fixes from Fedora
+  patch -Np1 -i ../gyp-fix-cmake.patch
+  patch -Np1 -i ../gyp-python38.patch
+}
+
+build() {
+  cd $pkgname
+  python setup.py build
+}
+
+package() {
+  cd $pkgname
+  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+  install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 LICENSE
+}

Copied: gyp/repos/extra-any/gyp-fix-cmake.patch (from rev 363523, gyp/trunk/gyp-fix-cmake.patch)
===================================================================
--- gyp-fix-cmake.patch	                        (rev 0)
+++ gyp-fix-cmake.patch	2019-09-28 21:57:34 UTC (rev 363524)
@@ -0,0 +1,33 @@
+--- 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 AttributeError:
+   _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 ' ')
+

Copied: gyp/repos/extra-any/gyp-python38.patch (from rev 363523, gyp/trunk/gyp-python38.patch)
===================================================================
--- gyp-python38.patch	                        (rev 0)
+++ gyp-python38.patch	2019-09-28 21:57:34 UTC (rev 363524)
@@ -0,0 +1,63 @@
+commit 7b0a3fd85beb67c990da3fb1b690444a27a6ee42
+Author: Tom Hughes <tom at compton.nu>
+Date:   Fri Aug 23 09:33:14 2019 +0100
+
+    Fix python 3.8 warnings
+
+diff --git a/pylib/gyp/input.py b/pylib/gyp/input.py
+index 42c279cf..013231dc 100644
+--- a/pylib/gyp/input.py
++++ b/pylib/gyp/input.py
+@@ -1181,7 +1181,7 @@ def LoadVariablesFromVariablesDict(variables, the_dict, the_dict_key):
+       if variable_name in variables:
+         # If the variable is already set, don't set it.
+         continue
+-      if the_dict_key is 'variables' and variable_name in the_dict:
++      if the_dict_key == 'variables' and variable_name in the_dict:
+         # If the variable is set without a % in the_dict, and the_dict is a
+         # variables dict (making |variables| a varaibles sub-dict of a
+         # variables dict), use the_dict's definition.
+diff --git a/test/lib/TestCmd.py b/test/lib/TestCmd.py
+index 1ec50933..457694c8 100644
+--- a/test/lib/TestCmd.py
++++ b/test/lib/TestCmd.py
+@@ -283,7 +283,7 @@ if os.name in ('posix', 'nt'):
+ else:
+     tempfile.template = 'testcmd.'
+ 
+-re_space = re.compile('\s')
++re_space = re.compile(r'\s')
+ 
+ _Cleanup = []
+ 
+@@ -882,7 +882,7 @@ class TestCmd(object):
+                 #self.diff_function = difflib.unified_diff
+         self._dirlist = []
+         self._preserve = {'pass_test': 0, 'fail_test': 0, 'no_result': 0}
+-        if 'PRESERVE' in os.environ and os.environ['PRESERVE'] is not '':
++        if 'PRESERVE' in os.environ and os.environ['PRESERVE'] != '':
+             self._preserve['pass_test'] = os.environ['PRESERVE']
+             self._preserve['fail_test'] = os.environ['PRESERVE']
+             self._preserve['no_result'] = os.environ['PRESERVE']
+@@ -1103,7 +1103,7 @@ class TestCmd(object):
+         the temporary working directories to be preserved for all
+         conditions.
+         """
+-        if conditions is ():
++        if len(conditions) == 0:
+             conditions = ('pass_test', 'fail_test', 'no_result')
+         for cond in conditions:
+             self._preserve[cond] = 1
+diff --git a/test/lib/TestGyp.py b/test/lib/TestGyp.py
+index cba2d3cc..43865ee1 100644
+--- a/test/lib/TestGyp.py
++++ b/test/lib/TestGyp.py
+@@ -742,7 +742,7 @@ def FindVisualStudioInstallation():
+           build_tool = None
+       if not build_tool:
+         args1 = ['reg', 'query',
+-                    'HKLM\Software\Microsoft\VisualStudio\SxS\VS7',
++                    r'HKLM\Software\Microsoft\VisualStudio\SxS\VS7',
+                     '/v', '15.0', '/reg:32']
+         build_tool = subprocess.check_output(args1).decode(
+             'utf-8', 'ignore').strip().split(b'\r\n').pop().split(b' ').pop()


More information about the arch-commits mailing list